-
Notifications
You must be signed in to change notification settings - Fork 4
Getting started on macOS
MoloVol will be distributed by providing download links to .dmg files. These files should be familiar to anyone who experience installing applications on macOS. If such file is available for your platform and you just want to use the software then this article is not for you.
This article provides a detailed explanation of how to set up a command line development environment on macOS and compile MoloVol. You may want to do this if the installation file is not available for your platform or macOS version or if you would like to contribute to the project.
This guide has been tested with Catalina and Big Sur.
You may need to first install Xcode command line tools, if you haven't already. This should be as easy as running the following command in the terminal.
$ xcode-select --install
Afterwards you should have gcc installed. You can check whether gcc is installed by requesting the version.
$ gcc -v
Configured with: ...
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: ...
Thread model: ...
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
To install wxWidgets visit https://www.wxwidgets.org and download the appropriate source files for macOS. Unzip the download file and place it in a directory of your choice, such as your user directory Users/myname/wx
. Then enter that directory.
myname:~$ cd wx/wxWidgets-3.1.5
In order to compile wxWidgets and not risk overwriting it upon recompilation, create a new directory and enter it.
myname:wxWidgets-3.1.5$ mkdir build-debug
myname:wxWidgets-3.1.5$ cd build-debug
Afterwards run the configuration executable in the parent folder with the following flags: Enable building for debugging, disable "shared" to obtain a static library, enable unicode support, and build a universal library for 64 bit and ARM architectures. The latter flag is needed for compiling the code on CPU chips with ARM architecture such as Apple M1.
myname:build-debug$ ../configure --enable-debug --disable-shared --enable-unicode --enable-universal_binary=arm64,x86_64
Now you're ready to compile. Simply run:
myname:build-debug$ make
This step will take a while. Once compilation has finished, you can place the library files in your system's default library folder.
myname:build-debug$ make install
You can check whether your installation was successful by running the wx-config
command.
$ wx-config --list
Default config is osx_cocoa-unicode-static-3.1
Default config will be used for output
Finally, you can remove the build files. They are no longer needed and take up disk space.
myname:build-debug$ make clean
If you ever wish to remove the installation, run the following command from your build folder.
myname:build-debug$ make clean
You will need to install Git if you haven't already. Visit https://git-scm.com. Once you have Git installed on your computer you can clone the repository to download all files to your local machine.
myname:~$ git clone https://github.com/jmaglic/MoloVol
myname:~$ cd MoloVol
If you have all dependencies installed, you should be able to easily compile the program by running:
myname:MoloVol$ make
The compiled app will be placed in the bin
folder.
myname:MoloVol$ bin/MoloVol
You can create your own .dmg file with which to easily install MoloVol. First make sure that there are no binaries or build files left anywhere.
myname:MoloVol$ make cleanall
Then simply run the following command and a .dmg file should be created inside the bin/
folder.
myname:MoloVol$ make dmg
In order to open the newly created file from the command line use the open
command.
myname:MoloVol$ open bin/MoloVol_macOS_version.dmg