Page 3 of 3 FirstFirst 1 2 3
Results 21 to 27 of 27

Thread: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils

  
  1. #21

    Default Re: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils

    Quote Originally Posted by YourMaster View Post
    Which branch/version are you trying to build? Because to me it does not look like a problem with your build environment, but one with the code instead.
    The error is from https://github.com/Loobinex/keeperfx-unofficial/ master branch

    Quote Originally Posted by Trass3r View Post
    Well either #include <assert.h> is missing or your compiler is too old.
    It looks like assert.h is in globals.h.

    It is presumably on my end.

    I am using mingw32-gcc-g++ 6.3.0-1 (I have just set up the tool chain today from this tutorial and the text file at https://github.com/dkfans/keeperfx-s...structions.txt)

    What would you suggest I use for building the latest version?
    Last edited by eddebaby; July 28th, 2020 at 04:31. Reason: forgot to add question

  2. #22

    Default Re: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils

    Trass3r advised a while back to use WSL instead, and indeed that was a lot easier to get working. Follow these instructions for that:

    Open Powershell as Administrator and type: "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux". Restart.
    Click here: https://www.microsoft.com/store/apps/9N9TNGVNDL3Q to install Ubuntu 18.04 from windows store.

    Type: "sudo apt update && sudo apt upgrade" and confirm

    sudo apt install make
    sudo apt install unzip
    sudo apt install gcc
    sudo apt install g++
    sudo apt-get install gcc-mingw-w64-i686
    sudo apt-get install g++-mingw-w64-i686
    Although there's probably something you can do to get your version to work, but I'm no expert.

  3. #23
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    183

    Default Re: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils


  4. #24

    Default Re: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils

    Unfortunately, I am on Windows 7 so I can't use WSL.

    I tried mingw32-gcc-g++ ver 9.2.0-2, but no luck. mingw32-base and msys-base are ancient (ver 2013072200).

    I am trying MSYS2 to see if I can get further.

  5. #25
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    183

    Default Re: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils

    Maybe the header is too old then and doesn't contain the macro: https://en.cppreference.com/w/c/language/_Static_assert
    Btw I think the Windows 10 Upgrade is still possible.

  6. #26

    Default Re: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils

    I think there's just one static_assert in the entire code. So perhaps simply removing line 72 of thing_creature.h is enough to fix all your issues.

  7. #27

    Default Re: [Tutorial] Recompiling KeeperFX - MinGW, MSYS and Coreutils

    Quote Originally Posted by Trass3r View Post
    Btw I think the Windows 10 Upgrade is still possible.
    Thanks Trass3r, but I want to stay on Windows 7, it is unfortunate WSL doesn't work on it. I should upgrade soon, but not today!

    Quote Originally Posted by eddebaby View Post
    I am trying MSYS2 to see if I can get further.
    I can now compile with MYS2 and mingw32, thanks to Real_Gecko (https://github.com/Loobinex/keeperfx...icial/pull/168) and some googling for setting up MSYS2. Quick tutorial below.

    The compiled exe seems to have broken nocd music though (installing mingw-w64-i686-libogg didn't make a difference, and no build errors either way).

    Quote Originally Posted by Trass3r View Post
    Maybe the header is too old then and doesn't contain the macro: https://en.cppreference.com/w/c/language/_Static_assert
    Quote Originally Posted by YourMaster View Post
    I think there's just one static_assert in the entire code. So perhaps simply removing line 72 of thing_creature.h is enough to fix all your issues.
    That did allow the build to complete (png2ico needs libstdc++-6.dll in the root dir of the project though...).

    I haven't found another way around the issue yet.






    Guide for MinGW and MSYS
    =================

    Download MinGW Installation Manager: mingw-get-setup.exe
    Latest for me is: Version 0.6.3 (Beta)

    Run it and install these:
    mingw32-base (latest for me is 2013072200)
    mingw32-gcc-g++ (latest for me is 9.2.0-2)
    msys-base (latest for me is 2013072200)

    Add "C:\MinGW\bin;C:\MinGW\msys\1.0\bin" to "Path" Windows Environmental Variable (need to restart to get effect), this allows you to run programs without entering the path each time

    Run sh (type sh in Windows command line)

    from sh, install core-utils and unzip

    mingw-get update
    mingw-get upgrade (does nothing for me, all up to date)
    mingw-get install msys-coreutils
    mingw-get install msys-unzip

    you also need curl, easy method (haven't got a hard one working yet! - build through source inmake clean sh)

    download curl-7.xx.x from https://curl.haxx.se/windows/ (latest for me is curl-7.71.1 64-bit)

    copy the contents of bin folder to C:/MinGW/bin

    png2ico needs libstdc++-6.dll in the root dir of the project (Copy from C:/mingw)



    change to root dir of the KeeperFX project (the one with Makefile in it) and build source:


    make clean (use to start fresh - empty tools, objects and sdl folder for full clean) [need to run if have changed constants - and prob more]
    make standard (build normal exe and dll)



    Guide for MSYS2 with MinGW32
    ===================

    Download MSYS2 installer from https://www.msys2.org/
    Install and the run through instructions on above page (about using pacman)

    in the "MSYS2" window

    pacman -S mingw-w64-i686-gcc
    pacman -S mingw-w64-i686-make
    pacman -S unzip
    pacman -S tar


    in the "MSYS2 MinGW 32-Bit" window

    change to root dir of the KeeperFX project (the one with Makefile in it) and build source:

    make-mingw32 clean (use to start fresh - empty tools, objects and sdl folder for full clean) [need to run if have changed constants - and prob more]
    make-mingw32 standard (build normal exe and dll)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •