The simplest way of getting the source code is to use git
.
-
Go to some directory where the GrandOgue source subdirectory will be created
-
Clone the main GrandOrgue repository
git clone --recurse-submodules https://github.com/GrandOrgue/grandorgue.git
The source code will be fetched in the GrandOrgue subdirectory of the current directory
You can download the source code archive from GitHub
-
Download archive
- For getting the last sources from
master
branch go to the Download ZIP on GitHub - For getting sourcecode of a certain GrandOrgue release go to the Releases page, select the particular release, scroll down to
Assets
and download theSource code (zip)
orSource code (tar.gz)
- For getting the last sources from
-
Unpack this archive to some directory
-
Download external submodules
RtAudio
: Download the source archive end extract it's contents to thesubmodules/RtAudio
subdirectory of GrandOrgue source tree.RtMidi
: Download the source archive and extract it's contents to thesubmodules/RtMidi
subdirectory of GrandOrgue source tree.
- Make sure that GrandOrgue source tree has been extracted to some subdirectory
<GO source tree>
- Install required software
- Manually
- Install gcc C++ compiler, make, cmake and the development packages of wxWigets, jack (libjack), pkg-config, fftw (fftw3), wavpack and alsa (libasound) from your distribution
- Install docbook-xsl, xsltproc, zip, gettext and po4a (if present on your distribution)
- Or run the prepared scripts for certain linux distributions by a sudoer user:
- on Fedora run
<GO source tree>/build-scripts/for-linux/prepare-fedora.sh
- on OpenSuse run
<GO source tree>/build-scripts/for-linux/prepare-opensuse.sh
- on Debian 9+ or on Ubuntu 18+ run
<GO source tree>/build-scripts/for-linux/prepare-debian-ubuntu.sh
- on Fedora run
- Manually
- Build
-
Manually
-
Create an empty build directory, eg:
mkdir $HOME/gobuild
-
Run cmake
cd /home/user/gobuild cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" <GO source tree>
Hint: For debugging a build, add the -DCMAKE_CXX_FLAGS=-g -DCMAKE_C_FLAGS=-g option to cmake.
-
Run make
make
-
For making tar.gz, rpm and deb packages, run
make package
-
For making rpm source package, run
cpack -G RPM --config ./CPackSourceConfig.cmake
-
-
Or run the prepared build script
<GO source tree>/build-scripts/for-linux/build-on-linux.sh
The built packages will appear in the build-for/linux subdirectory of current directory, the executables - in build-for/linux/bin
-
- Make sure that GrandOrgue source tree has been extracted to some subdirectory
<GO source tree>
- Install required software
- Manually
- Install gcc C++ compiler, make, cmake, imagemagic and the development packages of wxWigets, pkg-config, fftw (fftw3), wavpack and alsa (libasound) from your distribution
- Install docbook-xsl, xsltproc, zip, gettext and po4a (if present on your distribution)
- Install patchelf, libgtk-3-dev and librsvg2-dev from your distribution (if you want to use linuxdeploy-plugin-gtk, otherwise you don't need them and can ignore all the plugin related commands below)
- Install linuxdeploy, linuxdeploy-plugin-gtk and appimagetool somewhere in path like /usr/local/bin
(or $HOME/bin in which case the use of sudo below should be ommitted and the patch changed accordingly)
sudo wget -P /usr/local/bin https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh sudo wget -P /usr/local/bin https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage sudo wget -P /usr/local/bin https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage sudo chmod +x /usr/local/bin/linuxdeploy-plugin-gtk.sh sudo chmod +x /usr/local/bin/linuxdeploy-x86_64.AppImage sudo chmod +x /usr/local/bin/appimagetool-x86_64.AppImage
- Or run the prepared script by a sudoer user:
- on Debian 9+ or on Ubuntu 18+ run
<GO source tree>/build-scripts/for-appimage-x86_64/prepare-debian-ubuntu.sh
- on Debian 9+ or on Ubuntu 18+ run
- Manually
- Build
-
Manually
-
Create an empty build directory, eg:
mkdir $HOME/gobuild
-
Run cmake
cd /home/user/gobuild cmake -DCMAKE_INSTALL_PREFIX=/usr -DRTAUDIO_USE_JACK=OFF -DRTMIDI_USE_JACK=OFF -DGO_USE_JACK=OFF -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" <GO source tree>
-
Run make
make
-
For installing into AppDir
make install DESTDIR=AppDir
-
For initializing AppDir and building AppImage
linuxdeploy-x86_64.AppImage --appdir AppDir --plugin gtk appimagetool-x86_64.AppImage --no-appstream AppDir grandorgue-<version_number>-<build_number>.x86_64.AppImage
Note: On a local AppImage build you might get better results by ommitting the linuxdeploy-plugin-gtk completely, and you can ommit specifying the appimage output name like so
linuxdeploy-x86_64.AppImage --appdir AppDir appimagetool-x86_64.AppImage --no-appstream AppDir
The appimage will in any way appear in the build directory.
-
-
Or run the prepared build script
<GO source tree>/build-scripts/for-appimage-x86_64/build-on-linux.sh
The built appimage will appear in the build-for/appimage-x86_64 subdirectory of current directory
-
-
Prequisites:
- OS X >= 10.11
- Xcode >= 7.3
- homebrew
-
Extract the GO sources somewhere, eg: /home/user/gosources
-
Install the required software
-
Manually
brew update brew install gettext jack docbook-xsl wxmac cmake pkg-config fftw wavpack brew link gettext --force
-
Or run the prepared scripts by a sudoer user:
<GO source tree>/build-scripts/for-osx/prepare-osx.sh
-
-
Build
-
Manually
-
Create an empty build directory, eg: mkdir /home/user/gobuild
-
Run cmake:
cd /home/user/gobuild cmake -G "Unix Makefiles" -DDOCBOOK_DIR=/usr/local/opt/docbook-xsl/docbook-xsl <GO source tree>
Hint: For debugging a build, add the
-DCMAKE_CXX_FLAGS=-g -DCMAKE_C_FLAGS=-g
option to cmake. -
Run make
make
-
For making tar.gz package, run
make -k package VERBOSE=1
-
-
Or run the prepared build script
<GO source tree>/build-scripts/for-osx/build-on-osx.sh
The built package will appear in the build-for/osx subdirectory of current directory,
-
-
Install mingw-w64 (On Debian/Ubuntu, install the package mingw-w64) and all packages needed to build GO under Linux.
-
Prepare 5 directores:
- extracted wxWidgets sources [use the lastest release] to a directory (/wxsrc)
- extract GO trunk sources to a directory (/gosrc)
- create empty install directory (/inst)
- create empty win build directory (/buildwin)
- create empty linux build directory (/buildlinux)
In the following, I use the short path from above - normally you would put them somewhere under $HOME and use something like /home/user/GO/wxsrc.
-
Build wxWidgets
cd /wxsrc ./configure --host=i686-w64-mingw32 --prefix=/inst --enable-unicode git apply /gosrc/wxWidgets/wxWidgets-fix-build-3.0.2.patch (cd locale && make allmo) make make install
-
Build the tools for linux
cd /buildlinux cmake -G "Unix Makefiles" /gosrc/src/build make
-
Create toolchain definition for windows, file /inst/toolchain.def:
# the name of the target operating system SET(CMAKE_SYSTEM_NAME Windows) SET(MSYS 1) # which compilers to use for C and C++ SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc) SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres) SET(PKG_CONFIG_EXECUTABLE i686-w64-mingw32-pkg-config) # here is the target environment located SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 /inst) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-
Build GO for windows
cd /buildwin cmake -DCMAKE_TOOLCHAIN_FILE=/inst/toolchain.def /gosrc -DCMAKE_INSTALL_PREFIX=/inst -DSTATIC=1 -DIMPORT_EXECUTABLES=/buildlinux/ImportExecutables.cmake -DRTAUDIO_USE_ASIO=OFF make
-DRTAUDIO_USE_ASIO=OFF turns building ASIO off - else you need to put the ASIO SDK into the sources
-
If you have installed NSIS too, run
make package
to create an installer
- If you want to build a 64bit version, replace everywhere in this instruction i686-w64-mingw32 with x86_64-w64-mingw32.
There are some ready-to use bash scripts that allow to build windows executables on linux. Assume you have the GrandOrgue source extracted to GrandOrgue directory
-
Install the necessary software running a prepare-script by root or a sudoer-user
-
If you have OpenSuse, run
GrandOrgue/build-scripts/for-win64/prepare-opensuse.sh
-
If you have Ubuntu 20.04+, run
GrandOrgue/build-scripts/for-win64/prepare-ubuntu-20.sh
-
-
run build:
GrandOrgue/build-scripts/for-win64/build-on-linux.sh
Windows executables will appear in the build-for/win64 subdirectory of the current directory