2022-10-06 16:44:28 -03:00
|
|
|
# Building from source
|
|
|
|
|
## Linux (Ubuntu)
|
2022-10-10 07:42:18 -03:00
|
|
|
Install cmake:
|
2022-10-06 16:44:28 -03:00
|
|
|
|
2022-10-10 07:42:18 -03:00
|
|
|
$ sudo apt install cmake
|
2022-10-06 16:44:28 -03:00
|
|
|
|
|
|
|
|
Install dependencies for the interface:
|
|
|
|
|
|
|
|
|
|
$ sudo apt install build-essential qtcreator qt5-default
|
|
|
|
|
|
2022-10-07 04:39:45 -03:00
|
|
|
On ubuntu 22.04 it's:
|
|
|
|
|
|
|
|
|
|
$ apt install build-essential qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
|
|
|
|
|
|
2022-10-06 16:44:28 -03:00
|
|
|
Build & run it:
|
|
|
|
|
|
|
|
|
|
$ mkdir build
|
|
|
|
|
$ cd build
|
2022-10-10 07:42:18 -03:00
|
|
|
$ cmake ..
|
|
|
|
|
$ cmake --build .
|
|
|
|
|
$ ./samplebrain
|
2022-10-06 16:44:28 -03:00
|
|
|
|
|
|
|
|
## Mac
|
2022-10-10 07:42:18 -03:00
|
|
|
Install cmake:
|
2022-10-06 16:44:28 -03:00
|
|
|
|
2022-10-10 07:42:18 -03:00
|
|
|
$ brew install cmake
|
2022-10-06 16:44:28 -03:00
|
|
|
|
|
|
|
|
Install dependencies for the interface:
|
|
|
|
|
|
|
|
|
|
$ brew install qt
|
|
|
|
|
$ brew link qt
|
|
|
|
|
|
|
|
|
|
Build & run it:
|
|
|
|
|
|
|
|
|
|
$ mkdir build
|
|
|
|
|
$ cd build
|
2022-10-10 07:42:18 -03:00
|
|
|
$ cmake ..
|
|
|
|
|
$ cmake --build .
|
2022-10-06 16:44:28 -03:00
|
|
|
|
2022-10-10 07:42:18 -03:00
|
|
|
`samplebrain.app` should then be in the build folder for you to run.
|
2022-10-06 16:44:28 -03:00
|
|
|
|
|
|
|
|
# Mac build additions
|
|
|
|
|
|
|
|
|
|
To make a mac app bundle:
|
|
|
|
|
|
|
|
|
|
Run `macdeployqt` which copies all dependencies inside the app.
|
|
|
|
|
|
|
|
|
|
$ cd build
|
|
|
|
|
$ macdeployqt
|
|
|
|
|
|
|
|
|
|
If the icon is not visible, you might need to copy desktop/samplebrain.icns (the icon) to the Resources directory in the app bundle.
|
|
|
|
|
|
|
|
|
|
$ cp ../desktop/samplebrain.icns samplebrain.app/Contents/Resources
|
|
|
|
|
|
|
|
|
|
Then edit Info.plist to add samplebrain.icns to CFBundleIconFile. Key `CFBundleIconFile` should match:
|
|
|
|
|
|
|
|
|
|
<key>CFBundleIconFile</key>
|
|
|
|
|
<string>samplebrain.icns</string>
|
|
|
|
|
|
|
|
|
|
You might also need to resign the app bundle after making any changes
|
|
|
|
|
|
|
|
|
|
$ codesign --force --deep --sign - samplebrain.app
|
2022-10-07 04:39:45 -03:00
|
|
|
|
|
|
|
|
# Windows (Work in progress)
|
|
|
|
|
|
|
|
|
|
* Install [MSYS2](https://www.msys2.org/)
|
|
|
|
|
* Install dependances via pacman
|
|
|
|
|
* Build with qmake as usual
|
|
|
|
|
* Run `windeployqt` and copy missing .dll files into release directory
|
|
|
|
|
|
|
|
|
|
|