From 12102f87911e31453714cabb56f53c3fa7c97455 Mon Sep 17 00:00:00 2001 From: titison Date: Sun, 8 Mar 2015 01:36:16 +0100 Subject: [PATCH 1/8] Specific Tileset on map-preview option Tell the game a specific tileset to use together with the --preview-map option. The Tileset is optional. Default is forest. ! EVEN IF FOREST DOES NOT EXIST ! (like before) ./start_megaglest --preview-map=Map,Tileset --- source/glest_game/main/main.cpp | 10 ++++++++-- source/shared_lib/include/platform/sdl/platform_main.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/glest_game/main/main.cpp b/source/glest_game/main/main.cpp index 82118f11..380afbcb 100644 --- a/source/glest_game/main/main.cpp +++ b/source/glest_game/main/main.cpp @@ -5044,11 +5044,17 @@ int glestMain(int argc, char** argv) { vector paramPartTokens; Tokenize(mapName,paramPartTokens,"="); if(paramPartTokens.size() >= 2 && paramPartTokens[1].length() > 0) { - string autoloadMapName = paramPartTokens[1]; + vector paramPartTokens2; + string tileset="forest"; + Tokenize(paramPartTokens[1],paramPartTokens2,","); + if(paramPartTokens2.size() >= 2 && paramPartTokens2[1].length() > 0) { + tileset = paramPartTokens2[1]; + } + string autoloadMapName = paramPartTokens2[0]; GameSettings *gameSettings = &startupGameSettings; gameSettings->setMap(autoloadMapName); - gameSettings->setTileset("forest"); + gameSettings->setTileset(tileset); gameSettings->setTech("megapack"); gameSettings->setDefaultUnits(false); gameSettings->setDefaultResources(false); diff --git a/source/shared_lib/include/platform/sdl/platform_main.h b/source/shared_lib/include/platform/sdl/platform_main.h index 70a3eda0..9fb65886 100644 --- a/source/shared_lib/include/platform/sdl/platform_main.h +++ b/source/shared_lib/include/platform/sdl/platform_main.h @@ -251,7 +251,7 @@ void printParameterHelp(const char *argv0, bool foundInvalidArgs) { printf("\n%s=x\t\t\tAuto load a mod by mod pathname.",GAME_ARGS[GAME_ARG_MOD]); // "================================================================================" - printf("\n%s=x\t\t\tAuto Preview a map by map name.",GAME_ARGS[GAME_ARG_PREVIEW_MAP]); + printf("\n%s=Map,Tileset\tAuto Preview a map by map name. (tileset is optional)",GAME_ARGS[GAME_ARG_PREVIEW_MAP]); printf("\n%s\t\t\tdisplays the version string of this program.",GAME_ARGS[GAME_ARG_VERSION]); printf("\n%s\t\t\tdisplays your video driver's OpenGL info.",GAME_ARGS[GAME_ARG_OPENGL_INFO]); printf("\n%s\t\t\tdisplays your SDL version information.",GAME_ARGS[GAME_ARG_SDL_INFO]); From 1ed6b6b83586795618b61b277be0b9e17954988a Mon Sep 17 00:00:00 2001 From: filux Date: Sat, 9 Jan 2016 08:38:51 +0100 Subject: [PATCH 2/8] few fixes for .nsi script [ci skip] --- mk/windoze/Installer/MegaGlestInstaller.nsi | 48 ++++++++++----------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/mk/windoze/Installer/MegaGlestInstaller.nsi b/mk/windoze/Installer/MegaGlestInstaller.nsi index 3ca73433..82d6eb49 100644 --- a/mk/windoze/Installer/MegaGlestInstaller.nsi +++ b/mk/windoze/Installer/MegaGlestInstaller.nsi @@ -13,7 +13,7 @@ Name "${APNAME} ${APVER}" SetCompressor /FINAL /SOLID lzma SetCompressorDictSize 64 -OutFile "${APNAME}-Installer-${APVER}_i386_win32.exe" +OutFile "${APNAME}-Installer-${APVER}_windows_XXbit.exe" Icon "..\..\shared\megaglest.ico" UninstallIcon "..\..\shared\megaglest.ico" !define MUI_ICON "..\..\shared\megaglest.ico" @@ -226,9 +226,9 @@ Section "${APNAME} (required)" ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there - File /NONFATAL "..\megaglest.exe" - File /NONFATAL "..\megaglest_editor.exe" - File /NONFATAL "..\megaglest_g3dviewer.exe" + File /NONFATAL "..\..\..\data\glest_game\megaglest.exe" + File /NONFATAL "..\..\..\data\glest_game\megaglest_editor.exe" + File /NONFATAL "..\..\..\data\glest_game\megaglest_g3dviewer.exe" File /NONFATAL "..\megaglestx64.exe" File /NONFATAL "..\megaglest_editorx64.exe" @@ -240,39 +240,37 @@ Section "${APNAME} (required)" File "..\glest.ini" File "..\..\shared\glestkeys.ini" File "..\..\shared\servers.ini" - File /NONFATAL "..\openal32.dll" + File /NONFATAL "..\..\..\data\glest_game\openal32.dll" File /NONFATAL "..\openal64.dll" File "..\NetworkThrottleFix.reg" - File /NONFATAL "..\libvlccore.dll" - File /NONFATAL "..\libvlc.dll" - File /NONFATAL /r /x .git /x .svn /x mydata "..\plugins" - File /NONFATAL /r /x .git /x .svn /x mydata "..\lua" + #File /NONFATAL "..\libvlccore.dll" + #File /NONFATAL "..\libvlc.dll" + #File /NONFATAL /r /x .gitignore /x .svn /x mydata "..\plugins" + #File /NONFATAL /r /x .gitignore /x .svn /x mydata "..\lua" SetOutPath "$INSTDIR\blender\" - File /NONFATAL "..\xml2g.exe" - File /NONFATAL "..\g2xml.exe" + #File /NONFATAL "..\..\..\data\glest_game\xml2g.exe" + #File /NONFATAL "..\..\..\data\glest_game\g2xml.exe" - File /NONFATAL "..\xml2gx64.exe" - File /NONFATAL "..\g2xmlx64.exe" + #File /NONFATAL "..\xml2gx64.exe" + #File /NONFATAL "..\g2xmlx64.exe" - File /r /x .git /x .svn /x mydata /x g2xml /x xml2g "..\..\..\source\tools\glexemel\*.*" + File /r /x .gitignore /x .svn /x mydata /x g2xml /x xml2g "..\..\..\source\tools\glexemel\*.py" SetOutPath $INSTDIR - File /r /x .git /x .svn /x mydata /x cegui "..\..\..\data\glest_game\data" - File /r /x .git /x .svn /x mydata "..\..\..\data\glest_game\docs" - File /r /x .git /x .svn /x mydata "..\..\..\data\glest_game\maps" - File /r /x .git /x .svn /x mydata "..\..\..\data\glest_game\scenarios" - File /r /x .git /x .svn /x mydata "..\..\..\data\glest_game\techs" - File /r /x .git /x .svn /x mydata "..\..\..\data\glest_game\tilesets" - File /r /x .git /x .svn /x mydata "..\..\..\data\glest_game\tutorials" + File /r /x .gitignore /x .svn /x mydata "..\..\..\data\glest_game\data" + File /r /x .gitignore /x .svn /x mydata "..\..\..\data\glest_game\docs" + File /r /x .gitignore /x .svn /x mydata "..\..\..\data\glest_game\maps" + File /r /x .gitignore /x .svn /x mydata "..\..\..\data\glest_game\scenarios" + File /r /x .gitignore /x .svn /x mydata "..\..\..\data\glest_game\techs" + File /r /x .gitignore /x .svn /x mydata "..\..\..\data\glest_game\tilesets" + File /r /x .gitignore /x .svn /x mydata "..\..\..\data\glest_game\tutorials" SetOutPath "$INSTDIR\docs\" - File /r /x .git /x .svn /x mydata "..\..\..\docs\*.*" - - SetOutPath "$INSTDIR\data\core\misc_textures\flags" - File /r /x .git /x .svn /x mydata "..\..\..\data\glest_game\data\core\misc_textures\flags\*.*" + File /r /x .gitignore /x .svn /x mydata "..\..\..\docs\*.*" + SetOutPath $INSTDIR ; Write the installation path into the registry From a7d2ca99e16c05370c643d823efb5037399ae9f9 Mon Sep 17 00:00:00 2001 From: filux Date: Sat, 9 Jan 2016 13:38:27 +0100 Subject: [PATCH 3/8] let's try to follow upstream's method [ci skip] --- mk/linux/tools-for-standalone-client/installer/make.sh | 1 - mk/linux/tools-for-standalone-client/installer/mojosetup | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mk/linux/tools-for-standalone-client/installer/make.sh b/mk/linux/tools-for-standalone-client/installer/make.sh index 99d04907..8c343cac 100755 --- a/mk/linux/tools-for-standalone-client/installer/make.sh +++ b/mk/linux/tools-for-standalone-client/installer/make.sh @@ -178,7 +178,6 @@ cmake \ -DMOJOSETUP_INPUT_XZ=TRUE \ -DMOJOSETUP_BUILD_LUAC=TRUE \ -DMOJOSETUP_GUI_GTKPLUS2=TRUE \ - -DMOJOSETUP_GUI_GTKPLUS2_STATIC=TRUE \ -DMOJOSETUP_GUI_NCURSES=TRUE \ -DMOJOSETUP_GUI_NCURSES_STATIC=TRUE \ -DMOJOSETUP_GUI_STDIO=TRUE \ diff --git a/mk/linux/tools-for-standalone-client/installer/mojosetup b/mk/linux/tools-for-standalone-client/installer/mojosetup index 56568ec2..0bc05130 160000 --- a/mk/linux/tools-for-standalone-client/installer/mojosetup +++ b/mk/linux/tools-for-standalone-client/installer/mojosetup @@ -1 +1 @@ -Subproject commit 56568ec29653c07334c149ab4f7c2b312ae8213b +Subproject commit 0bc051300e71b01d332f03e6e7acb7d066052052 From b30d6f948390c757589ea95087acfcc300f272cd Mon Sep 17 00:00:00 2001 From: filux Date: Sat, 9 Jan 2016 13:42:31 +0100 Subject: [PATCH 4/8] let's try to live without those odd duplicates [ci skip] --- mk/linux/makerelease.sh | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/mk/linux/makerelease.sh b/mk/linux/makerelease.sh index 4be7dcfc..2d952607 100755 --- a/mk/linux/makerelease.sh +++ b/mk/linux/makerelease.sh @@ -39,26 +39,6 @@ cd docs git archive --remote ${REPODIR} HEAD:docs | tar x cd "$RELEASEDIR" -echo "Exporting files in mk/linux ..." -git archive --remote ${REPODIR} HEAD:mk/linux/ glest.ini | tar x -git archive --remote ${REPODIR} HEAD:mk/shared/ glestkeys.ini | tar x -git archive --remote ${REPODIR} HEAD:mk/shared/ servers.ini | tar x -git archive --remote ${REPODIR} HEAD:mk/shared/ glest.ico | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.bmp | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.png | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.xpm | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest.desktop | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest_editor.desktop | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ megaglest_g3dviewer.desktop | tar x - -echo "Exporting files in data/glest_game ..." -git archive --remote ${REPODIR} HEAD:mk/shared/ megaglest.ico | tar x -git archive --remote ${REPODIR} HEAD:mk/shared/ g3dviewer.ico | tar x -git archive --remote ${REPODIR} HEAD:mk/shared/ editor.ico | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ start_megaglest | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ start_megaglest_g3dviewer | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ start_megaglest_mapeditor | tar x -git archive --remote ${REPODIR} HEAD:mk/linux/ setupBuildDeps.sh | tar x git archive --remote ${REPODIR} HEAD: CMakeLists.txt | tar x # exit 1 From e611dfe4a56e7ba0eaba18d825c36047b56b216e Mon Sep 17 00:00:00 2001 From: filux Date: Sat, 9 Jan 2016 13:54:34 +0100 Subject: [PATCH 5/8] this may help for C:\megaglestinstallscreen.jpg left after uninstall & reverse order may help for wrong 'last installed app' issues [ci skip] --- mk/windoze/Installer/MegaGlestInstaller.nsi | 25 ++++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/mk/windoze/Installer/MegaGlestInstaller.nsi b/mk/windoze/Installer/MegaGlestInstaller.nsi index 82d6eb49..d957b909 100644 --- a/mk/windoze/Installer/MegaGlestInstaller.nsi +++ b/mk/windoze/Installer/MegaGlestInstaller.nsi @@ -68,6 +68,10 @@ Function .onInit InitPluginsDir FunctionEnd +Function un.onInit + InitPluginsDir +FunctionEnd + Function myGUIInit SetOutPath '$PLUGINSDIR' File megaglestinstallscreen.jpg @@ -304,20 +308,19 @@ Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\${APNAME}" CreateDirectory "$APPDATA\megaglest" CreateShortCut "$SMPROGRAMS\${APNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 - - ${If} ${FileExists} "$INSTDIR\megaglest.exe" - CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglest.exe" "" "$INSTDIR\megaglest.exe" 0 "" "" "${APNAME}" - CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editor.exe" "" "$INSTDIR\megaglest_editor.exe" 0 "" "" "${APNAME} MegaGlest Map Editor" - CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewer.exe" "" "$INSTDIR\megaglest_g3dviewer.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer" - ${ElseIf} ${FileExists} "$INSTDIR\megaglestx64.exe" - CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglestx64.exe" "" "$INSTDIR\megaglestx64.exe" 0 "" "" "${APNAME}" - CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editorx64.exe" "" "$INSTDIR\megaglest_editorx64.exe" 0 "" "" "${APNAME} MegaGlest Map Editor" - CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewerx64.exe" "" "$INSTDIR\megaglest_g3dviewerx64.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer" - ${EndIf} - CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Main.lnk" "$INSTDIR" "" "" 0 "" "" "This folder is the ${APNAME} installation folder" CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} User Data.lnk" "$APPDATA\megaglest" "" "" 0 "" "" "This folder contains downloaded data (such as mods) and your personal ${APNAME} configuration" + ${If} ${FileExists} "$INSTDIR\megaglest.exe" + CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewer.exe" "" "$INSTDIR\megaglest_g3dviewer.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer" + CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editor.exe" "" "$INSTDIR\megaglest_editor.exe" 0 "" "" "${APNAME} MegaGlest Map Editor" + CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglest.exe" "" "$INSTDIR\megaglest.exe" 0 "" "" "${APNAME}" + ${ElseIf} ${FileExists} "$INSTDIR\megaglestx64.exe" + CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} G3D Viewer.lnk" "$INSTDIR\megaglest_g3dviewerx64.exe" "" "$INSTDIR\megaglest_g3dviewerx64.exe" 0 "" "" "${APNAME} MegaGlest G3D Viewer" + CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME} Map Editor.lnk" "$INSTDIR\megaglest_editorx64.exe" "" "$INSTDIR\megaglest_editorx64.exe" 0 "" "" "${APNAME} MegaGlest Map Editor" + CreateShortCut "$SMPROGRAMS\${APNAME}\${APNAME}.lnk" "$INSTDIR\megaglestx64.exe" "" "$INSTDIR\megaglestx64.exe" 0 "" "" "${APNAME}" + ${EndIf} + SectionEnd ;-------------------------------- From 8689c6bf691bee212047e15af7763fd1f52213c6 Mon Sep 17 00:00:00 2001 From: titiger Date: Sat, 9 Jan 2016 19:37:41 +0100 Subject: [PATCH 6/8] changelog updated --- docs/CHANGELOG.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 3b8855ef..5cfaaa4c 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -3,6 +3,13 @@ MEGAGLEST CHANGELOG To see a timeline of detail changes please visit: https://github.com/MegaGlest/megaglest-source/commits/master + +v3.12.2 +- MegaGlest uses SDL2 now +- glowing meshes. ( models can glow like particles do ) +- console message for finished upgrades +- new parameter to set servers titles + v3.11.1 - no more false clicks when commanding via mini map - map editor has a more useful and powerful map height randomizer From bf6f7874c0f116fae12bdb3907c2670886afc9c7 Mon Sep 17 00:00:00 2001 From: titiger Date: Sat, 9 Jan 2016 20:00:04 +0100 Subject: [PATCH 7/8] fix for wrong version number in changelog --- docs/CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 5cfaaa4c..eb81f040 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -4,7 +4,7 @@ MEGAGLEST CHANGELOG To see a timeline of detail changes please visit: https://github.com/MegaGlest/megaglest-source/commits/master -v3.12.2 +v3.12.0 - MegaGlest uses SDL2 now - glowing meshes. ( models can glow like particles do ) - console message for finished upgrades From bf1ef05531fdebe59503f95c4c8575ff3e6e42f1 Mon Sep 17 00:00:00 2001 From: filux Date: Sun, 10 Jan 2016 00:57:57 +0100 Subject: [PATCH 8/8] fixed linux installer --- data/glest_game | 2 +- mk/linux/make-data-archive.sh | 3 +- .../installer/make.sh | 31 ++++++++++--------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/data/glest_game b/data/glest_game index 0ebb6df9..a1e6be21 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit 0ebb6df9491841a83a872d2a95291e6ee6f17750 +Subproject commit a1e6be21823b1c597129e3c81f4301177c32fba7 diff --git a/mk/linux/make-data-archive.sh b/mk/linux/make-data-archive.sh index f3220ab5..1405533d 100755 --- a/mk/linux/make-data-archive.sh +++ b/mk/linux/make-data-archive.sh @@ -85,8 +85,7 @@ cd "$RELEASEDIR" mkdir -p "$RELEASEDIR/docs/" cd "$RELEASEDIR/docs/" git archive --remote ${REPODIR}/data/glest_game/ HEAD:docs | tar x -git archive --remote ${REPODIR} HEAD:docs/ CHANGELOG.txt | tar x -git archive --remote ${REPODIR} HEAD:docs/ README.txt | tar x +git archive --remote ${REPODIR} HEAD:docs | tar x cd "$RELEASEDIR" mkdir -p "$RELEASEDIR/maps/" diff --git a/mk/linux/tools-for-standalone-client/installer/make.sh b/mk/linux/tools-for-standalone-client/installer/make.sh index 8c343cac..2ffd63bb 100755 --- a/mk/linux/tools-for-standalone-client/installer/make.sh +++ b/mk/linux/tools-for-standalone-client/installer/make.sh @@ -219,8 +219,9 @@ for feh in *.so *.dll *.dylib ; do done # Compile the Lua scripts, put them in the base archive. -for feh in ../scripts/*.lua ; do - ./mojoluac $LUASTRIPOPT -o ../image/scripts/${feh}c $feh +for feh in ../mojosetup/scripts/*.lua ; do + feh_b="$(basename $feh)" + ./mojoluac $LUASTRIPOPT -o ../image/scripts/${feh_b}c $feh done # Don't want the example config...use our's instead. @@ -234,20 +235,22 @@ rm -f ../image/scripts/app_localization.luac # Fill in the rest of the Base Archive... cd .. -# Compress the main data archive -cd data -#${megaglest_archiver_app_data} ${megaglest_archivefilename_data} -tar -cf - * | xz > ../$megaglest_archivefilename_data -# now remove everything except for the docs folder and the data archive shopt -s extglob -rm -rf !(docs|$megaglest_archivefilename_data) -# now remove everything in the docs except files listed in config.lua -cd docs -rm -rf !(gnu_gpl_*.txt|cc-by-sa-*-unported.txt|README.txt) -cd .. +if [ $REPACKONLY -eq 0 ]; then + # Compress the main data archive + cd data + #${megaglest_archiver_app_data} ${megaglest_archivefilename_data} + tar -cf - * | xz > ../$megaglest_archivefilename_data + # now remove everything except for the docs folder and the data archive + rm -rf !(docs|${megaglest_archivefilename_data}) + # now remove everything in the docs except files listed in config.lua + cd docs + rm -rf !(gnu_gpl_*.txt|cc-by-sa-*-unported.txt|README.txt) + cd .. -cd .. -mv -f $megaglest_archivefilename_data data/ + cd .. + mv -f $megaglest_archivefilename_data data/ +fi cp -R data/* image/data/ cp meta/* image/meta/