Updated INSTALL-MXE instructions

dev-ui
Piotr Dziwinski 2013-11-23 00:50:20 +01:00
parent 29b1f9e4c6
commit 405db2d70c
1 changed files with 12 additions and 9 deletions

View File

@ -29,7 +29,6 @@ To cross-compile Colobot using MXE:
* check-requirements * check-requirements
* expat * expat
* flac * flac
* flac
* freetype * freetype
* gcc * gcc
* gcc-gmp * gcc-gmp
@ -55,13 +54,15 @@ To cross-compile Colobot using MXE:
* xz * xz
* zlib * zlib
4. Now `cd` to directory with colobot sources. To cross-compile a CMake project, 4. Now `cd` to directory with colobot sources.
you have to specify a CMake toolchain file. MXE has such file in MXE's directory: It is recommended that you create a separate directory for out-of-source build:
`usr/i686-pc-mingw32/share/cmake/mxe-conf.cmake` `mkdir build-mxe && cd build-mxe`
Toolchain file is specified that way: `cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe-conf.cmake .`
In order to cross-compile a CMake project, you have to specify a CMake toolchain file.
MXE has such file in MXE's directory: `usr/i686-pc-mingw32/share/cmake/mxe-conf.cmake`
So you should use the following cmake command: `cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe-conf.cmake ..`
CMake files in Colobot should detect that MXE is being used and they will CMake files in Colobot should detect that MXE is being used and they will
modify flags, paths, etc. as required. You should not run into any problems. modify flags, paths, etc. as required. You should not run into any problems.
*Note:* you may also want to use a separate out-of-source build directory for MXE.
5. `make` should now compile the game with the resulting executable as `colobot.exe`. 5. `make` should now compile the game with the resulting executable as `colobot.exe`.
The exe is linked against all libraries *statically*, so there are no dependencies The exe is linked against all libraries *statically*, so there are no dependencies
@ -70,6 +71,8 @@ To cross-compile Colobot using MXE:
6. If you want to create a Colobot installer, you need to additionally build 'nsis' 6. If you want to create a Colobot installer, you need to additionally build 'nsis'
in MXE. Then you can create the NSIS installer that way: in MXE. Then you can create the NSIS installer that way:
`PATH=/path/to/mxe/binaries/:$PATH make package` This will create a versionned `PATH=/path/to/mxe/binaries:$PATH make package`
colobot-$version.exe installer that will install Colobot in system directories, where `/path/to/mxe/binaries` is path to cross-compiled MXE binaries available
add a shortcut in the start menu and setup an uninstaller. in MXE's directory under `usr/i686-pc-mingw32/bin`.
This will create a versioned colobot-$version.exe installer that will install Colobot
in system directories, add a shortcut in the start menu and setup an uninstaller.