Easiest way to convert exe to dmg

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
crazyjim
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Jun 23, 2022 12:04 am

Easiest way to convert exe to dmg

Post by crazyjim »

I am very sorry if this post seems confusing or sounds stupid. I'm very new to wxWidgets and I've heard that it creates applications capable of running on both Windows and MacOS. I have completed the software I have designed on my windows laptop, and have an exe file that correctly runs, however I now must convert it to a dmg (or app?) file to get it to run on MacOS, as the people I created it for use Mac. I thought this would be rather easy, but it seems like I am wrong. Does anyone have any experience with how to do this? I tried looking at articles online however most seem out-dated or confusing. Sorry if this post makes no sense.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Easiest way to convert exe to dmg

Post by doublemax »

Unfortunately it's not that easy. If you used wxWidgets to write your application, then you can compile the same source code to build a Windows, Linux, or OSX application on the respective platform. But it doesn't let you convert a Windows binary to another platform.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Easiest way to convert exe to dmg

Post by ONEEYEMAN »

Hi,
I presume you own a Mac or you can get a hold on the Mac owns b y your customers.

The easiest would be to do the following:

Mae sure that the Max you will be working on have the version of Xcode installed (its free)
Also make sure you have a "Command-Line Tools" installed
Download latest release of wxWidgets on the Mac.
Unpack it in e.g. ~/wxWidgets

Open the Terminal and do the following:
cd ~/wxWidgets && mkdir build-cocoa && cd build-cocoa && ../configure --enable-debug && make
Now copy you source code over.
Open an Xcode and create Cocoa application from the template.
Add the source code to the project.
Back in the Terminal execute:

wx-config --cxxflags
wx-config --libs

Use the output from the above command in the Xcode project.
Build and run.

You will have you app folder.

I don't now how familiar you are with Mac development, but you will probably need to copy wx libraries over to the app folder and use install_name_tool for the relinking.

If you need more info on that - let us know.

Thank you.
Post Reply