From 724be4ead55a5c5a277a5a2968ae42dc07813da8 Mon Sep 17 00:00:00 2001 From: mathusummut Date: Sun, 29 Apr 2018 02:18:05 +0200 Subject: [PATCH] Changed Map Editor from MG to ZG and improved build on Windows --- mk/windows/build-zg+deps-2015-32.bat | 5 +++++ mk/windows/build-zg+deps-2015-64.bat | 5 +++++ mk/windows/build-zg+deps-2017-32.bat | 5 +++++ mk/windows/build-zg+deps-2017-64.bat | 5 +++++ mk/windows/build-zg-2015-32.bat | 2 +- mk/windows/build-zg-2015-64.bat | 2 +- mk/windows/build-zg-2017-32.bat | 2 +- mk/windows/build-zg-2017-64.bat | 2 +- mk/windows/build-zg.bat | 19 ++++++++++++++++--- mk/windows/setup.bat | 4 ++-- source/glest_map_editor/main.cpp | 4 ++-- 11 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 mk/windows/build-zg+deps-2015-32.bat create mode 100644 mk/windows/build-zg+deps-2015-64.bat create mode 100644 mk/windows/build-zg+deps-2017-32.bat create mode 100644 mk/windows/build-zg+deps-2017-64.bat diff --git a/mk/windows/build-zg+deps-2015-32.bat b/mk/windows/build-zg+deps-2015-32.bat new file mode 100644 index 000000000..7cc0c0e97 --- /dev/null +++ b/mk/windows/build-zg+deps-2015-32.bat @@ -0,0 +1,5 @@ +@echo off +Echo Compiling for 32-bit using Visual Studio 2015... +SET VCVARS_PLATFORM=amd64_x86 +SET FOLDER_NAME=vs2015-32 +call .\build-zg.bat 2015-32 deps \ No newline at end of file diff --git a/mk/windows/build-zg+deps-2015-64.bat b/mk/windows/build-zg+deps-2015-64.bat new file mode 100644 index 000000000..247e19e0f --- /dev/null +++ b/mk/windows/build-zg+deps-2015-64.bat @@ -0,0 +1,5 @@ +@echo off +Echo Compiling for 64-bit using Visual Studio 2015... +SET VCVARS_PLATFORM=amd64 +SET FOLDER_NAME=vs2015-64 +call .\build-zg.bat 2015-64 deps \ No newline at end of file diff --git a/mk/windows/build-zg+deps-2017-32.bat b/mk/windows/build-zg+deps-2017-32.bat new file mode 100644 index 000000000..e9b92828d --- /dev/null +++ b/mk/windows/build-zg+deps-2017-32.bat @@ -0,0 +1,5 @@ +@echo off +Echo Compiling for 32-bit using Visual Studio 2017... +SET VCVARS_PLATFORM=amd64_x86 +SET FOLDER_NAME=vs2017-32 +call .\build-zg.bat 2017-32 deps \ No newline at end of file diff --git a/mk/windows/build-zg+deps-2017-64.bat b/mk/windows/build-zg+deps-2017-64.bat new file mode 100644 index 000000000..0c039694b --- /dev/null +++ b/mk/windows/build-zg+deps-2017-64.bat @@ -0,0 +1,5 @@ +@echo off +Echo Compiling for 64-bit using Visual Studio 2017... +SET VCVARS_PLATFORM=amd64 +SET FOLDER_NAME=vs2017-64 +call .\build-zg.bat 2017-64 deps \ No newline at end of file diff --git a/mk/windows/build-zg-2015-32.bat b/mk/windows/build-zg-2015-32.bat index a9162f15f..884c4a28a 100644 --- a/mk/windows/build-zg-2015-32.bat +++ b/mk/windows/build-zg-2015-32.bat @@ -2,4 +2,4 @@ Echo Compiling for 32-bit using Visual Studio 2015... SET VCVARS_PLATFORM=amd64_x86 SET FOLDER_NAME=vs2015-32 -call .\build-zg.bat 2015-32 \ No newline at end of file +call .\build-zg.bat 2015-32 nodeps \ No newline at end of file diff --git a/mk/windows/build-zg-2015-64.bat b/mk/windows/build-zg-2015-64.bat index 675c82095..342d0d72e 100644 --- a/mk/windows/build-zg-2015-64.bat +++ b/mk/windows/build-zg-2015-64.bat @@ -2,4 +2,4 @@ Echo Compiling for 64-bit using Visual Studio 2015... SET VCVARS_PLATFORM=amd64 SET FOLDER_NAME=vs2015-64 -call .\build-zg.bat 2015-64 \ No newline at end of file +call .\build-zg.bat 2015-64 nodeps \ No newline at end of file diff --git a/mk/windows/build-zg-2017-32.bat b/mk/windows/build-zg-2017-32.bat index 51edd5a22..412a56714 100644 --- a/mk/windows/build-zg-2017-32.bat +++ b/mk/windows/build-zg-2017-32.bat @@ -2,4 +2,4 @@ Echo Compiling for 32-bit using Visual Studio 2017... SET VCVARS_PLATFORM=amd64_x86 SET FOLDER_NAME=vs2017-32 -call .\build-zg.bat 2017-32 \ No newline at end of file +call .\build-zg.bat 2017-32 nodeps \ No newline at end of file diff --git a/mk/windows/build-zg-2017-64.bat b/mk/windows/build-zg-2017-64.bat index d207ced57..68781ac2c 100644 --- a/mk/windows/build-zg-2017-64.bat +++ b/mk/windows/build-zg-2017-64.bat @@ -2,4 +2,4 @@ Echo Compiling for 64-bit using Visual Studio 2017... SET VCVARS_PLATFORM=amd64 SET FOLDER_NAME=vs2017-64 -call .\build-zg.bat 2017-64 \ No newline at end of file +call .\build-zg.bat 2017-64 nodeps \ No newline at end of file diff --git a/mk/windows/build-zg.bat b/mk/windows/build-zg.bat index 2578e1cac..46a0800e1 100644 --- a/mk/windows/build-zg.bat +++ b/mk/windows/build-zg.bat @@ -5,6 +5,7 @@ SET /P PLATFORM_SELECT=Compile ZetaGlest for 64-bit Windows ('n' for 32-bit)? ([ IF /I "%PLATFORM_SELECT%"=="y" GOTO SIXTYFOUR IF /I "%PLATFORM_SELECT%"=="Y" GOTO SIXTYFOUR IF /I "%PLATFORM_SELECT%"=="" GOTO SIXTYFOUR +GOTO THIRTYTWO :THIRTYTWO SET VCVARS_PLATFORM=amd64_x86 @@ -44,14 +45,23 @@ IF /I "%QUERY%" NEQ "1" ( ) ) -GOTO START +GOTO CHECKDEPS :SETENV SET TEMPLOL=%~1 call .\set-env-%TEMPLOL:~0,4%.bat -GOTO START +GOTO CHECKDEPS -:START +:CHECKDEPS +if "%~2"=="deps" GOTO COMPILEDEPS +if "%~2"=="nodeps" GOTO COMPILEZG +Echo. +SET /P BUILD_DEPS=Compile dependencies as well? If first time, choose 'y' ([y]/n): +IF /I "%BUILD_DEPS%"=="n" GOTO COMPILEZG +IF /I "%BUILD_DEPS%"=="N" GOTO COMPILEZG +GOTO COMPILEDEPS + +:COMPILEDEPS ECHO -------------------------------- Echo Compiling dependencies (this will take a long time)... @@ -144,6 +154,9 @@ cd ..\..\.. cd ..\.. +GOTO COMPILEZG + +:COMPILEZG ECHO -------------------------------- Echo Building ZetaGlest... cd .\%FOLDER_NAME%\ diff --git a/mk/windows/setup.bat b/mk/windows/setup.bat index 0af4cbc22..3b834414f 100644 --- a/mk/windows/setup.bat +++ b/mk/windows/setup.bat @@ -1,3 +1,3 @@ @echo off -.\clone-deps.bat -.\build-zg.bat \ No newline at end of file +call .\clone-deps.bat +call .\build-zg.bat \ No newline at end of file diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index 69a3a241c..0500afa5b 100644 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -59,7 +59,7 @@ string getGameReadWritePath(const string &lookupKey) { namespace MapEditor { const string mapeditorVersionString = "v0.8.01"; -const string MainWindow::winHeader = "MegaGlest Map Editor " + mapeditorVersionString; +const string MainWindow::winHeader = "ZetaGlest Map Editor " + mapeditorVersionString; // =============================================== // class Global functions @@ -1655,7 +1655,7 @@ bool App::OnInit() { string fileparam; if(argc==2){ if(argv[1][0]=='-') { // any flag gives help and exits program. - std::cout << std::endl << "MegaGlest map editor " << mapeditorVersionString << " [Using " << (const char *)wxConvCurrent->cWX2MB(wxVERSION_STRING) << "]" << std::endl << std::endl; + std::cout << std::endl << "ZetaGlest map editor " << mapeditorVersionString << " [Using " << (const char *)wxConvCurrent->cWX2MB(wxVERSION_STRING) << "]" << std::endl << std::endl; //std::cout << "\nglest_map_editor [MGM FILE]" << std::endl << std::endl; std::cout << "Creates or edits megaglest/glest maps. [.mgm/.gbm]" << std::endl << std::endl; std::cout << "Draw with left mouse button." << std::endl;