Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 31

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

  
  1. #11

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

    I'm resurrecting this thread to say it's not working for me, I tried only the second method since the third link necessary for the first method doesn't work anymore. Anyway, I get the same error when compiling with all the releases: Stable, Unofficial and Official; and that is 'unknown type name at typedef 'time_t'' in one of the header files, I suspect this has to do with a missing library somewhere that has the definition for the time_t variable. Ignoring all error gives me only one file at the bin folder, and that is a .dll

    Just wondering if anybody encountered this problem and how to solve it.

  2. #12

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

    It was a while since I did this, and just following the steps did not work for me either and I asked some help and had to mess around a bit to get it to work.

    I had to install mingw32-base, mingw32-gcc-g++ and msys-base, and I believe the coreutils also didn't update with the steps above and I did that manually. Finally I had a problem with the curl command, and I googled that and downloaded a tool for that as well. But you're better of waiting for people who actually know their stuff here.

  3. #13

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

    Thank you, YourMaster. I was finally able to compile, I had to add the curl command, Open SSL and the unzip command, which was included in cygwin64.

  4. #14
    Troll
    Join Date
    Jul 2016
    Location
    United Kingdom
    Posts
    257

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

    Hi,

    I am having trouble compiling KeeperFX (not that I really know what to do: half of the links in the first post don't work, including the guide). I assume https://github.com/dkfans/keeperfx-stable is the source?

    I am interested in making the change I described at https://keeperklan.com/threads/5168-...-revived/page4

    Quote Originally Posted by AdamP View Post
    Well, I looked at https://github.com/dkfans/keeperfx-s...bflib_sndlib.c and saw this:

    Code:
    int __stdcall LoadAwe32Soundfont(const char *fname)
    {
        HMODULE hModule;
        hModule=GetModuleHandle("WSND7R");
        FARPROC proc;
        proc=GetProcAddress(hModule,"_LoadAwe32Soundfont@4");
        if (proc==NULL)
        { ERRORLOG("Can't get address of LoadAwe32Soundfont function; skipped."); return 0; }
        return ((FARPROCS)proc)(fname);
    }
    It looks like LoadAwe32Soundfont is part of WSND7R.DLL. I looked at it, and from what I can tell, all the SoundFont loading stuff is AWE32/64-specific. I tried updating (I think) the WSND7R.DLL and AWEMAN32.DLL files, but it still doesn't work . The game also doesn't seem to load the midi unless a SoundFont is successfully loaded (I'm no expert in C, but from what I can tell looking at the randomize_sound_font procedure, it only plays the midi if the loading of the SoundFont is successful, which it of course won't be on modern systems (those also appear to be the only calls to StartMusic)); maybe the calls to LoadAwe32Soundfont should be removed so the game just plays the midi anyway? Then, hopefully it'll work if a SoundFont is manually loaded.
    I installed MiniGW, typed "gcc main.cpp -o keeperfx.exe" (I don't know if that's what I'm supposed to do or not) and got:

    In file included from globals.h:46:0,
    from keeperfx.hpp:22,
    from main.cpp:6:
    version.h :31:29: fatal error: ../obj/ver_defs.h: No such file or directory
    #include "../obj/ver_defs.h"

    Compilation terminated.

    What am I doing wrong?

    Thanks.

  5. #15

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

    If you've just the one thing you're wanting to change, I'm happy to build it for you and provide you with an exe to test. (If so, send me the details over PM).

    The links in the OP still go to google code, but the project has been migrated to github, so look at this document instead: https://github.com/dkfans/keeperfx-s...structions.txt

    There you'll find the correct make command (Go to the source directory with 'cd' and type 'make standard').

    Finally, I think you'd be better of working from the unofficial project instead, can't say that's very active, but the official one is dead. If you get it working you can make a pull request and I'll merge your change into that branch.

  6. #16
    Troll
    Join Date
    Jul 2016
    Location
    United Kingdom
    Posts
    257

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

    Quote Originally Posted by YourMaster View Post
    If you've just the one thing you're wanting to change, I'm happy to build it for you and provide you with an exe to test. (If so, send me the details over PM).

    The links in the OP still go to google code, but the project has been migrated to github, so look at this document instead: https://github.com/dkfans/keeperfx-s...structions.txt

    There you'll find the correct make command (Go to the source directory with 'cd' and type 'make standard').

    Finally, I think you'd be better of working from the unofficial project instead, can't say that's very active, but the official one is dead. If you get it working you can make a pull request and I'll merge your change into that branch.
    PM sent. I'm hoping it will make the game behave like the original game with the -usersfont switch.

  7. #17
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

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

    Looks like you can now build it in WSL with :
    wsl sudo apt-get -y install mingw-w64
    wsl CROSS_COMPILE=i686-w64-mingw32- make -j8
    WSL setup: https://docs.microsoft.com/en-us/win.../install-win10

    Also see https://github.com/Trass3r/keeperfx-.../.appveyor.yml
    Last edited by Trass3r; January 19th, 2019 at 03:56.

  8. #18

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

    I'm getting an error when trying to build with MinGW and MSYS (coreutils, curl, and unzip installed):
    Code:
    sh-3.1$ make standard
    Building file: src/actionpt.c
    gcc -I"sdl/include" -c -std=gnu11 -fmessage-length=0 -Wall -W -Wshadow -Wno-sign
    -compare -Wno-unused-parameter -Wno-strict-aliasing -Wno-unknown-pragmas -Werror
    =implicit -MMD -MP -MF"obj/std/actionpt.d" -MT"obj/std/actionpt.d" -march=i686 -
    fno-omit-frame-pointer -O3   -DBFDEBUG_LEVEL=0  -o"obj/std/actionpt.o" "src/acti
    onpt.c"
    In file included from src/dungeon_data.h:26:0,
                     from src/game_legacy.h:27,
                     from src/actionpt.c:26:
    src/thing_creature.h:72:15: error: expected declaration specifiers or '...' before 'sizeof'
     static_assert(sizeof(struct CreatureStorage) == 2, "");
                   ^~~~~~
    src/thing_creature.h:72:52: error: expected declaration specifiers or '...' before string constant
     static_assert(sizeof(struct CreatureStorage) == 2, "");
                                                        ^~
    make: *** [obj/std/actionpt.o] Error 1
    This line is a recent change.

    I can build an earlier branch (https://github.com/Loobinex/keeperfx...tree/zoomContd) without issue.

  9. #19

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

    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.

  10. #20
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

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

    Well either #include <assert.h> is missing or your compiler is too old.

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
  •