Would someone please simplify compiling?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OmniNegro
    Scout
    • Jul 2014
    • 44

    Would someone please simplify compiling?

    People have recently been asking about how to compile. I am too lazy to bother myself. But if anyone can make it easy for a player to follow your steps and have an up to date compile on Windows, I am sure they would be grateful.

    The user who was asking was GenjiHikari, and they confirm they are on Windows 10. I have no idea what software to suggest they use, nor how exactly to do it. The game they want is Frogcomposband.

    I did say that the best way to get the most up to date source is to go to the Github page, click Code in the upper right, and click Download Zip.


    Thanks in advance.
    Last edited by OmniNegro; July 5, 2023, 07:46. Reason: Was distracted. Left important details out.
  • GenjiHikari
    Rookie
    • Aug 2022
    • 4

    #2
    Thank you for creating the thread.

    So what I tried so far:

    Installed MSYS2 (msys2-x86_64-20230526.exe)
    Run MSYS terminal and entered the command
    pacman -S automake libtool autoconf make
    then went to a directory where the fcb's source is, using the command
    cd C:/MyPrograms/Roguelike/frogcomposband-master
    and tried the commands
    ./autogen.sh
    ./configure --enable-win
    got an error message what I dont have a compiler
    installed the compiler
    pacman -S gcc
    then run the commands
    ./configure --enable-win
    make
    got many warnings and in the end an error message:

    init2.c: In function ‘init_angband’:
    init2.c:1531:42: warning: ‘%s’ directive writing up to 1023 bytes into a region of size 1005 [-Wformat-overflow=]
    1531 | sprintf(why, "Cannot access the '%s' file!", buf);
    | ^~ ~~~
    init2.c:1531:9: note: ‘sprintf’ output between 27 and 1050 bytes into a destination of size 1024
    1531 | sprintf(why, "Cannot access the '%s' file!", buf);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Failed to compile init2.c

    Comment

    • GenjiHikari
      Rookie
      • Aug 2022
      • 4

      #3
      Actual error reads as:

      init2.c: In function ‘dir_create’:
      init2.c:268:21: warning: array subscript has type ‘char’ [-Wchar-subscripts]
      268 | if (isalpha(path[0]) && path[1] == ':') path += 2;
      | ~~~~^~~
      init2.c:29:32: error: too few arguments to function ‘mkdir’
      29 | # define my_mkdir(path, perms) mkdir(path)
      | ^~~~~
      init2.c:294:17: note: in expansion of macro ‘my_mkdir’
      294 | if (my_mkdir(buf, 0755) != 0) return FALSE;

      Comment

      • MITZE
        Swordsman
        • Jan 2017
        • 306

        #4
        No guarantees it'll help, but I can get Frog to compile using the instructions given in readme.txt (it uses MinGW as a presumption, but personally I use Cygwin), making minimal code changes so the compiler will stop throwing errors.

        Copy the contents of the .zip into the source directory, and then try compiling (note to compile for 32-bit, not 64-bit...I had to use a different compiler than the one I tried first because of this):
        FrogSourceChanges.zip
        Everything you need to know about my roguelike playstyle:

        I took nearly two years to win with a single character in PosChengband.

        Comment

        • GenjiHikari
          Rookie
          • Aug 2022
          • 4

          #5
          Was able to compile the source using mingw from https://sourceforge.net/projects/mingw/

          Here are the list of packages I have had selected (not sure if you need all of them)

          mingw-developer-toolkit
          mingw32-base
          mingw32-gcc-g++
          mingw32-gcc-objc
          msys-base


          after installing I started a msys.bat file from the C:\MinGW\msys\1.0 directory and in the terminal entered commands:
          cd c:/myprograms/rl/fcb
          where "c:/myprograms/rl/fcb" is a directory with source files
          ./autogen.sh
          ./configure --enable-win
          make


          if everything is all right then the executable file "frogcomposband.exe" will will appear in a "src" directory. Place it in the frogcomposband directory and it should work.

          Comment

          • emar
            Apprentice
            • Jul 2019
            • 50

            #6
            Originally posted by OmniNegro
            People have recently been asking about how to compile. I am too lazy to bother myself. But if anyone can make it easy for a player to follow your steps and have an up to date compile on Windows, I am sure they would be grateful.

            The user who was asking was GenjiHikari, and they confirm they are on Windows 10. I have no idea what software to suggest they use, nor how exactly to do it. The game they want is Frogcomposband.

            I did say that the best way to get the most up to date source is to go to the Github page, click Code in the upper right, and click Download Zip.


            Thanks in advance.
            Are they looking for the latest dev version or the latest release? If they're looking for binaries for the latest release, it's automatically compiled into binaries on GitHub:
            A variant of PosChengband and Composband with more stuff, more humor and fewer bugs - sulkasormi/frogcomposband

            Comment

            • OmniNegro
              Scout
              • Jul 2014
              • 44

              #7
              We play on angband.live but some folks want to play the Nightly locally. There is no release for Nightly. Nightly is available as source as I commented above. So compiling is required.

              Comment

              • Chryana
                Scout
                • May 2007
                • 26

                #8
                compilation using MSYS2

                Thanks for these instructions. I managed to compile frogcomposband using MSYS2 successfully. (The MinGW version referred to in GenjiHikari's comment is quite old, so I didn't want to make a compilation using that). I will write a list of instructions to do this if anyone is interested.

                Comment

                • OmniNegro
                  Scout
                  • Jul 2014
                  • 44

                  #9
                  Originally posted by Chryana
                  Thanks for these instructions. I managed to compile frogcomposband using MSYS2 successfully. (The MinGW version referred to in GenjiHikari's comment is quite old, so I didn't want to make a compilation using that). I will write a list of instructions to do this if anyone is interested.
                  When you have some spare time, if you would please do this, I will keep it bookmarked for the people who ask for step by step instructions.

                  I play on Linux, so I cannot test your solution. But I do appreciate the help.

                  Comment

                  • OmniNegro
                    Scout
                    • Jul 2014
                    • 44

                    #10
                    Damnit. I tried to add to the reputation for Chryana and accidentally tagged "I disapprove." instead of "I approve." Would someone kindly offset my misclick by adding to their reputation? Thanks in advance.

                    *Edit* Thank you GenjiHikari for fixing my screwup of the day.
                    Last edited by OmniNegro; July 13, 2023, 17:32.

                    Comment

                    • Chryana
                      Scout
                      • May 2007
                      • 26

                      #11
                      frogcomposband compilation instructions with MSYS2

                      Short version
                      The compilation of frogcomposband can be done by installing the following two packages in MSYS2.
                      • make
                      • mingw-w64-i686-toolchain


                      Step by step instructions
                      Code:
                      # Download and run the MSYS2 installer from https://www.msys2.org/
                      # The installation will create several shortcuts in the start menu. Start the shell MSYS2 MINGW32, and then run this command.
                      
                      $  pacman -S git make mingw-w64-i686-toolchain # this command installs the required packages.
                      
                      # pacman will ask to make a selection of packages to install. I simply press Enter twice to make the default selection and start the download.
                      
                      # these commands download the frogcomposband repo, compile the binary and move it in the correct directory to play the game.
                      
                      $ git clone https://github.com/sulkasormi/frogcomposband.git
                      $ cd frogcomposband
                      $ ./configure --enable-win --with-no-install
                      $ make
                      $ mv src/frogcomposband.exe .
                      $ make clean # optional cleanup
                      
                      # The game can now be found under the MSYS2 home directory, which is probably somewhere under C:\msys2\home\, and can be moved elsewhere.
                      # Running "git pull" from the frogcomposband directory at a later time will allow the game to be updated with minimal effort.
                      Let me know if you have any comments regarding these instructions. I didn't use autotools since the compilation works without it for me.

                      Comment

                      Working...
                      😀
                      😂
                      🥰
                      😘
                      🤢
                      😎
                      😞
                      😡
                      👍
                      👎