From c52464d2278660cbfe6c23ea48d31d82882d205b Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 15 Sep 2019 00:47:07 +0200 Subject: [PATCH] Promote 64bit builds to stable --- CMakeLists.txt | 5 --- README.md | 100 +++++++++++++------------------------------------ 2 files changed, 25 insertions(+), 80 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e3070997..c402374dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,11 +59,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE) -if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4) - message(WARNING "sizeof(void*) == ${CMAKE_SIZEOF_VOID_P}.") - message(WARNING [[Not 32-bit, highly experimental!]]) -endif() - find_package(Threads REQUIRED) find_package(SDL2 CONFIG QUIET) if (NOT SDL2_FOUND) diff --git a/README.md b/README.md index 8c247089c..f7fb91949 100644 --- a/README.md +++ b/README.md @@ -18,57 +18,53 @@ Status | Platform Please keep in mind that this is still being worked on and is missing parts of UI and some minor bugs, see [milestone 1](https://github.com/diasurgical/devilutionX/milestone/1) for a full list of known issues. # Building from Source -## 32-bit building on 64-bit platforms
Linux ### Installing dependencies on Debian and Ubuntu ``` -sudo apt-get install cmake g++-multilib libsdl2-mixer-dev:i386 libsdl2-ttf-dev:i386 libsodium-dev libsodium-dev:i386 +sudo apt-get install cmake g++ libsdl2-mixer-dev libsdl2-ttf-dev libsodium-dev ``` ### Installing dependencies on Fedora ``` -sudo dnf install cmake glibc-devel.i686 SDL2-devel.i686 SDL2_ttf-devel.i686 SDL2_mixer-devel.i686 libsodium-devel.i686 libasan.i686 +sudo dnf install cmake glibc-devel SDL2-devel SDL2_ttf-devel SDL2_mixer-devel libsodium-devel libasan ``` ### Compiling ``` mkdir build cd build -linux32 cmake -DCMAKE_TOOLCHAIN_FILE=../CMake/32bit.cmake .. -linux32 make -j$(nproc) +cmake .. +make -j$(nproc) ``` -
-
macOS - -### Installing dependencies -Install [Xcode 9.4.1 and Xcode Command Line tools](https://developer.apple.com/download/more/?=xcode%209.4.1), this is the last version with **32 bits** support. +
-Note: Be sure that your to select the command line Xcode if you have more then one installed: -``` -$ sudo xcode-select --switch /Applications/Xcode.app -``` +
macOS -Verify that you don't have FreeType and HarfBuzz installed from -[Homebrew](https://brew.sh/), which will cause build errors for SDL2_ttf: +Make sure you have [Homebrew](https://brew.sh/) installed, then run: ``` -brew info freetype -brew info harfbuzz +brew bundle +mkdir build +cd build +cmake .. +make -j$(sysctl -n hw.physicalcpu) ``` +
+
FreeBSD +*Note: At the moment this only appears to work from a 32bit system.* -If you do have those installed, you'll have to temporarily uninstall them: - +### Installing dependencies ``` -brew uninstall --ignore-dependencies freetype -brew uninstall --ignore-dependencies harfbuzz +pkg install cmake gcc8 sdl2_mixer sdl2_ttf libsodium ``` - -You can install FreeType and HarfBuzz from Homebrew again after devilutionX builds successfully. - -Now you can run the build script: +### Compiling ``` -./macos-build.sh --build-all-x86 +mkdir build +cd build +cmake -DCMAKE_C_COMPILER=/usr/local/bin/gcc8 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++8 .. +make -j$(sysctl -n hw.ncpu) ```
+
Windows via MinGW ### Installing dependencies on Debian and Ubuntu @@ -122,55 +118,8 @@ Make sure to install the `C++ CMake tools for Windows` component for Visual Stud 5. In case you need to select any paths to dependencies manually do this right in cmake-gui window. 6. Press `Generate` and open produced `.sln` file using Visual Studio. 7. Use build/debug etc. commands inside Visual Studio Solution like with any normal Visual Studio project. -
- -## Building for the native platform -*Note: Since 64-bit builds are currently not in a playable state, it is advised to build in a 32-bit environment. Another possibility is a 32-bit build on a 64-bit system (see above).* -
Linux - -### Installing dependencies on Debian and Ubuntu -``` -sudo apt-get install cmake g++ libsdl2-mixer-dev libsdl2-ttf-dev libsodium-dev -``` -### Installing dependencies on Fedora -``` -sudo dnf install cmake glibc-devel SDL2-devel SDL2_ttf-devel SDL2_mixer-devel libsodium-devel libasan -``` -### Compiling -``` -mkdir build -cd build -cmake .. -make -j$(nproc) -``` -
-
macOS - -Make sure you have [Homebrew](https://brew.sh/) installed, then run: - -``` -brew bundle -mkdir build -cd build -cmake .. -make -j$(sysctl -n hw.physicalcpu) -``` -
-
FreeBSD -*Note: At the moment this only appears to work from a 32bit system.* +
-### Installing dependencies -``` -pkg install cmake gcc8 sdl2_mixer sdl2_ttf libsodium -``` -### Compiling -``` -mkdir build -cd build -cmake -DCMAKE_C_COMPILER=/usr/local/bin/gcc8 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++8 .. -make -j$(sysctl -n hw.ncpu) -``` -
Haiku ### Installing dependencies on 32 bit Haiku @@ -200,6 +149,7 @@ make -j$(nproc) ## CMake arguments ### General The default build type is `Debug`. This can be changed with `-DBINARY_RELEASE=ON`. Independently of this, the debug mode of the Diablo engine is always enabled by default. It can be disabled with `-DDEBUG=OFF`. Finally, in debug builds the address sanitizer is enabled by default. This can be disabled with `-DASAN=OFF`. +You can also generate 32bit builds on 64bit platforms by setting `-DCMAKE_TOOLCHAIN_FILE=../CMake/32bit.cmake` (remember to use the `linux32` command if on Linux). ### mingw32 Use `-DCROSS_PREFIX=/path/to/prefix` if the `i686-w64-mingw32` directory is not in `/usr`.