user:draugthewhopper:windowsbuild
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:draugthewhopper:windowsbuild [2021/01/03 11:59] – draugthewhopper | user:draugthewhopper:windowsbuild [2025/04/18 13:08] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Windows client builds ====== | ====== Windows client builds ====== | ||
- | Throughout 2019 and 2020, I've been able to build the GTK2 client | + | As of Aug 2021, I finally got a stable Windows GTK client |
+ | The script and instructions are specifically for x86_64 builds. Suites like MSYS2 and MinGW are deprecating support for pure 32-bit x86, so producing 32-bit binaries maybe not be feasible moving forward. Regardless, if you can get the MinGW/MSYS2 toolchain working, the powershell script can probably be adapted to work. | ||
====== Links ====== | ====== Links ====== | ||
Line 8: | Line 9: | ||
to various Windows build instructions: | to various Windows build instructions: | ||
- | [[wiki: | + | [[: |
[[user: | [[user: | ||
Line 18: | Line 19: | ||
====== My Notes ====== | ====== My Notes ====== | ||
- | loosely based on the makegho 2018 instructions: | + | If trying to adapt between |
- | + | ||
- | These instructions assume a fresh, clean 32-bit | + | |
- | + | ||
- | Install compiler tools: | + | |
- | + | ||
- | Go to http:// | + | |
- | + | ||
- | Download | + | |
- | + | ||
- | Start an msys2 32-bit shell (“MSYS2 MinGW 32-bit” in the start menu) and type: | + | |
pacman -S mingw-w64-i686-gcc | pacman -S mingw-w64-i686-gcc | ||
Line 37: | Line 28: | ||
pacman -S mingw-w64-i686-SDL_mixer | pacman -S mingw-w64-i686-SDL_mixer | ||
- | Alternatively, | ||
- | |||
- | pacman -S mingw-w64-i686-gcc mingw-w64-i686-make mingw-w64-i686-pkg-config mingw-w64-i686-vala mingw-w64-i686-SDL_image mingw-w64-i686-SDL_mixer | ||
- | |||
- | Add c: | ||
- | Install PERL: | + | I recommend using perl from MSYS2, rather than a third party Perl. If you want to anyway, a few tips: |
- | http:// | + | < |
- | Download portable 32 bit edition | + | < |
- | Extract to C:\perl | + | < |
- | Add C:\perl\perl\bin to path. | + | < |
- | Note that this can cause some issues, especially if CMake tries to use perl-supplied components instead of those from MSYS/MinGW. But, perl is still needed "for def-keys and msgtypes generation" | + | < |
- | Download and extract CrossFire source | + | < |
- | https:// | + | < |
- | Install latest CMake 32-bit: | + | Other misc bits: |
- | + | ||
- | https:// | + | |
- | + | ||
- | Run CMake gui: | + | |
- | + | ||
- | Set source code directory, e.g. c:/ | + | |
- | + | ||
- | Set binary directory, e.g. c:/ | + | |
- | + | ||
- | Click ' | + | |
- | + | ||
- | Change CMAKE_INSTALL_PREFIX to something reasonable | + | |
- | + | ||
- | (C:\Program Files (x86)\... is probably read only). | + | |
- | + | ||
- | (Nothing seems to be put in this folder anyway?) | + | |
- | + | ||
- | (I use " | + | |
- | + | ||
- | < | + | |
- | + | ||
- | If CMake fails near a pkgconfig or gtk/gio item, check to make sure that it hasn’t defaulted the PKG_CONFIG_EXECUTABLE to a perl directory. If so, revert it to the msys32 one, probably C: | + | |
- | + | ||
- | Click “Configure” again, hope no errors occur. | + | |
- | + | ||
- | Once it finally doesn’t have warnings or errors, Click ' | + | |
- | + | ||
- | If configuring goes wrong, delete the contents of C:\cfbuild\ and try again. | + | |
- | + | ||
- | Compile: | + | |
- | + | ||
- | Open msys32 32-bit shell (“MSYS2 MinGW 32-bit” in the Start Menu) | + | |
- | + | ||
- | cd / | + | |
- | + | ||
- | run mingw32-make.exe | + | |
- | + | ||
- | Create release package: | + | |
- | + | ||
- | Run ' | + | |
- | + | ||
- | Make directory ' | + | |
- | + | ||
- | Copy cfbuild\bin\crossfire-client-gtk2.exe to release\ | + | |
- | + | ||
- | < | + | |
- | + | ||
- | Copy directory cfbuild\share to release\ | + | |
- | + | ||
- | < | + | |
- | - Ordered List Item | + | |
- | In release, create a folder called “lib”, and copy “gdk-pixbuf-2.0” and “gtk-2.0” from “C: | + | |
- | + | ||
- | This fixes some xpm warnings, and makes a few GUI icons render correctly, apparently a very few gui elements are xpm? | + | |
- | + | ||
- | Fetch “msys32\mingw32\share\themes” and place it in “release\share\”. This fixes an issue that breaks the GTK theme. | + | |
- | + | ||
- | Find sounds from somewhere, and put them in release\share\crossfire-client\sounds\ | + | |
- | + | ||
- | Find the DLLs, and put them in release\ | + | |
- | + | ||
- | Most of the DLLs can be found in c: | + | |
- | + | ||
- | libatk-1.0-0.dll | + | |
- | libbrotlicommon.dll | + | |
- | libbrotlidec.dll | + | |
- | libbz2-1.dll | + | |
- | libcairo-2.dll | + | |
- | libcrypto-1_1.dll | + | |
- | libcurl-4.dll | + | |
- | libdatrie-1.dll | + | |
- | libexpat-1.dll | + | |
- | libffi-6.dll | + | |
- | libfontconfig-1.dll | + | |
- | libfreetype-6.dll | + | |
- | libfribidi-0.dll | + | |
- | libgcc_s_dw2-1.dll | + | |
- | libgdk-win32-2.0-0.dll | + | |
- | libgdk_pixbuf-2.0-0.dll < | + | |
- | libgio-2.0-0.dll | + | |
- | libglib-2.0-0.dll < | + | |
- | libgmodule-2.0-0.dll | + | |
- | libgobject-2.0-0.dll | + | |
- | libgraphite2.dll | + | |
- | libgtk-win32-2.0-0.dll Adding this breaks the GTK theme. Fetch “msys32\mingw32\share\themes” and place it in “release\share\”. This only works if you have also copied the above items into " | + | |
- | libharfbuzz-0.dll | + | |
- | libiconv-2.dll | + | |
- | libidn2-0.dll | + | |
- | libintl-8.dll | + | |
- | libmikmod-3.dll (skipping this doesn' | + | |
- | libnghttp2-14.dll | + | |
- | libopenal-1.dll (skipping this doesn' | + | |
- | libpango-1.0-0.dll | + | |
- | libpangocairo-1.0-0.dll | + | |
- | libpangoft2-1.0-0.dll | + | |
- | libpangowin32-1.0-0.dll | + | |
- | libpcre-1.dll (skipping this doesn' | + | |
- | libpixman-1-0.dll | + | |
- | libpng16-16.dll | + | |
- | libpsl-5.dll | + | |
- | libssl-1_1.dll | + | |
- | libstdc++-6.dll | + | |
- | libthai-0.dll | + | |
- | libunistring-2.dll | + | |
- | libwinpthread-1.dll | + | |
- | SDL.dll | + | |
- | zlib1.dll | + | |
- | + | ||
- | < | + | |
- | Since r21700, these dlls go with all the others. | + | |
- | + | ||
- | libmad-0.dll | + | |
- | libSDL_mixer-1-2-0.dll | + | |
- | libogg-0.dll | + | |
- | libvorbis-0.dll | + | |
- | libvorbisfile-3.dll | + | |
- | + | ||
- | < | + | |
- | + | ||
- | At this point, the client runs in your dev environs, no warnings, sound works, etc | + | |
< | < | ||
- | |||
- | Pull the release\ folder to another machine, and run. | ||
- | |||
- | Weep because everything' | ||
- | * Sound works in the dev environs, but not once you bring it to another machine. | ||
- | * If client.ini exists, then it will barf errors about gtk_scrolled_window_add_with_viewport() and accelgroup1. But, these are not fatal. | ||
- | |||
- | There are various non-fatal build warnings: | ||
- | |||
- | * \script.c: | ||
- | * / | ||
- | * / | ||
- | * \crossfire-code-r21708-client-trunk\gtk-v2\src\sdl.c: |
user/draugthewhopper/windowsbuild.1609696783.txt.gz · Last modified: (external edit)