From 6b3d244a5ec147caa8ddd71e854964fc6515c49f Mon Sep 17 00:00:00 2001 From: Ricardo Subtil Date: Fri, 1 Sep 2023 20:02:55 +0100 Subject: [PATCH] Fix some release issues !build !macos --- cmake/FreecivInstall.cmake | 2 +- demo_run.sh | 33 +++++++++---- dist/net.longturn.freeciv21.client.desktop.in | 46 +++++++++---------- .../net.longturn.freeciv21.ruledit.desktop.in | 2 +- 4 files changed, 48 insertions(+), 35 deletions(-) diff --git a/cmake/FreecivInstall.cmake b/cmake/FreecivInstall.cmake index 62ddf6fa8a..a0612fe1fb 100644 --- a/cmake/FreecivInstall.cmake +++ b/cmake/FreecivInstall.cmake @@ -262,7 +262,7 @@ if(FREECIV_ENABLE_CLIENT AND FREECIV_DOWNLOAD_FONTS) else() install( DIRECTORY ${CMAKE_BINARY_DIR}/src/Libertinus - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/freeciv21/fonts + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/lunar_gambit/fonts COMPONENT lunar_gambit FILES_MATCHING PATTERN *.otf PATTERN *.txt ) diff --git a/demo_run.sh b/demo_run.sh index e19083abce..2ed83e49ac 100755 --- a/demo_run.sh +++ b/demo_run.sh @@ -1,17 +1,30 @@ #!/bin/sh -logdir=$1 -if [ -z "$logdir" ]; then - echo "Usage: $0 " +match=alpha + +# Test if savefiles and logs directory exists +if [ ! -d "savefiles" ]; then + echo "Savefiles directory not found" + exit 1 +fi +if [ ! -d "logs" ]; then + echo "Logs directory not found" exit 1 fi +if [ -z "$1" ]; then + if [ "$(ls -A savefiles)" ]; then + echo "Savefiles directory not empty! Specify last save_file" + exit 1 + fi + echo "No scenario file specified, using scenario.sav" + scenario=scenario.sav +else + scenario=$1 +fi -logfile=$logdir/$(date +%d_%m___%H_%M_%S).log -echo "Storing logfile at $logfile" - -# Run the demo -echo "Server running... (type q and enter to quit, or end from game)" -./build/freeciv21-server -f demoScenario.sav --saves ../spaceRaceScenario/backups > $logfile 2>&1 +# We are in the right place +lunar_gambit-server -f "$scenario" --saves savefiles --log ../logs/$(date +%d_%m___%H_%M_%S).log --read setup_commands -echo "Server closed. Logfile at $logfile" +# Send an email everytime this script leaves, to warn us +echo "Lunar Gambit server stopped" diff --git a/dist/net.longturn.freeciv21.client.desktop.in b/dist/net.longturn.freeciv21.client.desktop.in index b055ee878f..eb0350e620 100644 --- a/dist/net.longturn.freeciv21.client.desktop.in +++ b/dist/net.longturn.freeciv21.client.desktop.in @@ -1,26 +1,26 @@ [Desktop Entry] -Name=Freeciv21 -Name[af]=Freeciv21 -Name[ca]=Freeciv21 -Name[cs]=Freeciv21 -Name[de]=Freeciv21 -Name[dk]=Freeciv21 -Name[es]=Freeciv21 -Name[eu]=Freeciv21 -Name[fi]=Freeciv21 -Name[fr]=Freeciv21 -Name[gl]=Freeciv21 -Name[he]=Freeciv21 -Name[hu]=Freeciv21 -Name[it]=Freeciv21 -Name[lt]=Freeciv21 -Name[pt]=Freeciv21 -Name[ru]=Freeciv21 -Name[sk]=Freeciv21 -Name[sr]=Freeciv21 -Name[sr@latin]=Freeciv21 -Name[tr]=Freeciv21 -Name[vi]=Freeciv21 +Name=LunarGambit +Name[af]=LunarGambit +Name[ca]=LunarGambit +Name[cs]=LunarGambit +Name[de]=LunarGambit +Name[dk]=LunarGambit +Name[es]=LunarGambit +Name[eu]=LunarGambit +Name[fi]=LunarGambit +Name[fr]=LunarGambit +Name[gl]=LunarGambit +Name[he]=LunarGambit +Name[hu]=LunarGambit +Name[it]=LunarGambit +Name[lt]=LunarGambit +Name[pt]=LunarGambit +Name[ru]=LunarGambit +Name[sk]=LunarGambit +Name[sr]=LunarGambit +Name[sr@latin]=LunarGambit +Name[tr]=LunarGambit +Name[vi]=LunarGambit GenericName=Strategy Game GenericName[af]=Strategie-spel GenericName[ca]=Joc d'estrategia @@ -53,7 +53,7 @@ Comment[pt]=Jogo de estratégia por turnos inspirado na História da civilizaç Comment[ru]=Пошаговая стратегическая игра, вдохновлённая историей человеческой цивилизации Comment[sv]=Turordningsbaserat strategispel inspirerat av den mänskliga historien Exec=@CMAKE_INSTALL_FULL_BINDIR@/lunar_gambit-client %u -Icon=@CMAKE_INSTALL_FULL_DATAROOTDIR@/freeciv21/misc/civicon.png +Icon=@CMAKE_INSTALL_FULL_DATAROOTDIR@/lunar_gambit/misc/civicon.png StartupNotify=true MimeType=x-scheme-handler/fc21; X-KDE-Protocols=fc21; diff --git a/dist/net.longturn.freeciv21.ruledit.desktop.in b/dist/net.longturn.freeciv21.ruledit.desktop.in index 9bf7ca8314..591df096b1 100644 --- a/dist/net.longturn.freeciv21.ruledit.desktop.in +++ b/dist/net.longturn.freeciv21.ruledit.desktop.in @@ -10,7 +10,7 @@ GenericName[ru]=Стратегическая игра Comment=Edit Lunar Gambit game rules Comment[ru]=Меняйте любые правила Lunar Gambit и создавайте новые Exec=@CMAKE_INSTALL_FULL_BINDIR@/lunar_gambit-ruledit -Icon=@CMAKE_INSTALL_FULL_DATAROOTDIR@/freeciv21/misc/civicon.png +Icon=@CMAKE_INSTALL_FULL_DATAROOTDIR@/lunar_gambit/misc/civicon.png StartupNotify=true Terminal=false Type=Application