FrogComposband: configure save files location, libraries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arch
    Rookie
    • Aug 2020
    • 5

    FrogComposband: configure save files location, libraries

    Hello.

    On Debian 9, I have compiled frogcompostband with the following configuration:

    Configuration:

    Install path: /tmp/frog
    binary path: /tmp/frog/games
    config path: /tmp/frog/etc/frogcomposband/
    lib path: /tmp/frog/share/frogcomposband/
    doc path: /tmp/frog/share/doc/frogcomposband/
    var path: (not used)
    (with private save and score files in ~/.angband/FrogComposband/)

    This results in a working game, but save files are saved in the wrong location -
    /tmp/frog/var/games/frogcomposband/save , not ~/.angband/FrogComposband/

    Which configure option enables private save files?

    I'd like to link the game against static curses and X11 libraries. Is this possible with configure options?
  • Sideways
    Knight
    • Nov 2008
    • 896

    #2
    I'll try to look into this in more detail later, don't have much time (or energy) right now, sorry. --with-private-dirs is the configure option for using private paths; but it should be implicitly assumed to be on. I don't think there's any more specific configure option for save directories specifically, but "./frogcomposband -ds=<path>" should at least in theory run the game with a custom save path of your choice (this might not work on every platform).

    It's likely that configure is simply lying about the savefile path, so don't worry too much about that.

    If a high-energy Debian user can weigh in, that would be great
    The Complainer worries about the lack of activity here these days.

    Comment

    • backwardsEric
      Knight
      • Aug 2019
      • 531

      #3
      Debian 10 and 7.1.salmiak have similar behavior to what's in the original post,
      Code:
      ./configure --with-private-paths --prefix=/tmp ; make ; make install
      , generates an executable that puts the save files in /tmp/var.

      As a bit of a hack, you can use

      Code:
      ./configure --prefix=/tmp CFLAGS=-DPRIVATE_USER_PATH=\\\"~/.angband\\\"
      for the configure step so the game will put the save files within ~/.angband/FrogComposband.


      For the static libraries (I'll trust you have a good reason for wanting to bother), I don't see an option. You can use

      Code:
      ./configure <other_config_options_here> LDFLAGS=-static
      if you want everything statically linked. To have only libncursesw and libX11 statically linked, this hack works on Debian 10:

      Code:
      ./configure <your_config_options_here>
      make LIBS="/usr/lib/x86_64-linux-gnu/libncursesw.a -ltinfo -ldl -lSM -lICE /usr/lib/x86_64-linux-gnu/libX11.a -lxcb -lm"
      make install
      In other words, look at what LIBS is set to in mk/buildsys.mk. Pass that to make but with -l<lib> replaced by the path to the archive library for the libraries you want to link statically. Some iteration may be required to add extra libraries that will satisfy the indirect dependencies.


      For Sideways or whomever else might be interested in getting configure to set PRIVATE_USER_PATH appropriately on Debian (and perhaps elsewhere, I'm not sure if the above issues are Debian-specific):

      The part for setting PRIVATE_USER_PATH in z-config.h is commented out so one would have to edit z-config.h or set it manually via -D.
      The --with-private-paths option for configure causes USE_PRIVATE_PATHS to be set, but it doesn't appear anywhere else besides autoconf.h so it doesn't do anything.
      Last edited by backwardsEric; August 19, 2020, 23:02. Reason: PRIVATE_USER_PATH commented out in z-config.h; duh

      Comment

      • arch
        Rookie
        • Aug 2020
        • 5

        #4
        Thanks for the help guys.

        Comment

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