[freeciv-dev] Re: Freeciv for macOS

  • From: Dean <ddeanbrown@xxxxxxxxxxx>
  • To: freeciv-dev@xxxxxxxxxxxxx
  • Date: Sat, 16 Apr 2022 19:43:05 -0400

On 4/16/22 3:25 AM, Marko Lindqvist wrote:

  Actually, dealing with the *installation* of that icon still needs to
be set up. It's currently only provided as part of the tarball.

Just need to copy the freeciv-client.icns file into freeciv.app/Contents/Resources. If using a prebuilt infrastructure freeciv.app bundle it would be part of that.

  --enable-fcmp=qt

  Should you also build gtk3 fcmp, to match gtk3.22-client you're providing?

Could, but I don't think we need to provide both. Mod pack installer not going to used often.

  (and one more step - moving
2 executables from the "bin" folder to the "MacOS" folder)

  That should probably be --bindir parameter in the configure line
already, so that any paths baked into the freeciv build would be
correct. (Actually, how does your client find the server to launch as
you move it away from where it's expected?)

The client(s) expects to find the server in the bin folder by default already, doesn't matter where the client is.

Looking at ticket 44399, you're thinking freeciv-<version>.app, e.g. freeciv-3.2.app. I have just been using freeciv.app for every version. Putting the version number in the name may be better, and I can change the way I'm doing it. What that means is we would have to do a fresh Homebrew install whenever the freeciv version changes. Which is what the macOS/homebrew/hbinstall.sh would do.

Here's what my current process looks like, some of this is unique to my machine setup.

1 Start with "freeciv 3.0 deploy-HB-Bundle.app" and "freeciv 3.0 master-HB-Bundle.app" in Applications folder,
and "freeciv3.x.xroot" folder in "...freeciv/builds" folder.
2 Put tarball in "freeciv3.x.xroot" folder and un-zip, rename resulting folder to "source", create new "build" folder in "freeciv3.x.xroot" folder, next to "source" folder.
3 Save a backup copy of Applications/freeciv.app, then delete freeciv.app.
4 Duplicate "freeciv 3.0 master-HB-Bundle.app" in Applications folder, rename to "freeciv.app"
5 In terminal window -

cd /Volumes/Hogwarts2/freeciv/builds/freeciv3.x.xroot/build

../source/configure --disable-gtktest --disable-sdltest --disable-sdl2test --disable-sdl2framework --enable-fcdb=sqlite3 --prefix=/Applications/freeciv.app/Contents/ --enable-fcmp=qt --enable-client=qt,gtk3.22 CXXFLAGS=-std=c++11 PATH=/Applications/freeciv.app/Contents/Resources/bin:/Applications/freeciv.app/Contents/Resources/opt/qt5/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin LDFLAGS="-L/Applications/freeciv.app/Contents/Resources/opt/qt5/lib -L/Applications/freeciv.app/Contents/Resources/lib" PKG_CONFIG_PATH="/Applications/freeciv.app/Contents/Resources/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH"

6 delete "freeciv.app", duplicate "freeciv 3.0 deploy-HB-Bundle.app" in Applications folder, rename to "freeciv.app"
7 In terminal window -

make
make install
cd /Applications
touch freeciv.app

8 update version strings in "Info.plist"
9 move "freeciv-gtk3.22" & "freeciv-qt" from bin folder to MacOS folder
10 test "freeciv.app", if OK can delete backup copy of freeciv.app

Other related posts: