From 9f847f78974375389e674b5ec6bfc19c63a510f9 Mon Sep 17 00:00:00 2001 From: malte_langkabel Date: Thu, 27 Oct 2016 11:38:36 +0200 Subject: [PATCH] build: structure of windows deploy project * moved installer dlls to lib folder * updated .gitignore to be more specific * added notes on cleaning the installer project to readme * made rebuilding of databases optional in windows deploy script * removed local paths for devenv.com from windows deploy script --- .gitignore | 29 ++------- deployment/windows/wixSetup/build.bat | 7 +++ .../api-ms-win-crt-heap-l1-1-0.dll | Bin .../api-ms-win-crt-locale-l1-1-0.dll | Bin .../api-ms-win-crt-math-l1-1-0.dll | Bin .../api-ms-win-crt-runtime-l1-1-0.dll | Bin .../api-ms-win-crt-stdio-l1-1-0.dll | Bin .../wixSetup/{build => lib}/msvcp140.dll | Bin .../wixSetup/{build => lib}/vcruntime140.dll | Bin deployment/windows/wixSetup/readme.txt | 6 ++ script/deploy_windows.sh | 57 +++++++++++------- 11 files changed, 55 insertions(+), 44 deletions(-) rename deployment/windows/wixSetup/{build => lib}/api-ms-win-crt-heap-l1-1-0.dll (100%) rename deployment/windows/wixSetup/{build => lib}/api-ms-win-crt-locale-l1-1-0.dll (100%) rename deployment/windows/wixSetup/{build => lib}/api-ms-win-crt-math-l1-1-0.dll (100%) rename deployment/windows/wixSetup/{build => lib}/api-ms-win-crt-runtime-l1-1-0.dll (100%) rename deployment/windows/wixSetup/{build => lib}/api-ms-win-crt-stdio-l1-1-0.dll (100%) rename deployment/windows/wixSetup/{build => lib}/msvcp140.dll (100%) rename deployment/windows/wixSetup/{build => lib}/vcruntime140.dll (100%) diff --git a/.gitignore b/.gitignore index d0173bcf..2b233164 100644 --- a/.gitignore +++ b/.gitignore @@ -49,26 +49,9 @@ compile_commands.json Makefile /__pycache__/ -/deployment/windows/CoatiAppSetup/CoatiSetup/Debug -/deployment/windows/CoatiAppSetup/CoatiSetup/Release -/deployment/windows/CoatiAppSetup/SetupApplicationSettingsLib/bin/ -/deployment/windows/CoatiAppSetup/SetupApplicationSettingsLib/obj/ -/deployment/windows/CoatiAppSetup/SetupCreateDesktopShortcutLib/bin/ -/deployment/windows/CoatiAppSetup/SetupCreateDesktopShortcutLib/obj/ -/deployment/windows/CoatiAppSetup/SetupCreateStartMenuShortcutLib/bin/ -/deployment/windows/CoatiAppSetup/SetupCreateStartMenuShortcutLib/obj/ -/deployment/windows/CoatiAppSetup/SetupRemoveCacheFiles/bin/ -/deployment/windows/CoatiAppSetup/SetupRemoveCacheFiles/obj/ - -/deployment/windows/CoatiTrialSetup/CoatiSetup/Debug -/deployment/windows/CoatiTrialSetup/CoatiSetup/Release -/deployment/windows/CoatiTrialSetup/SetupApplicationSettingsLib/bin/ -/deployment/windows/CoatiTrialSetup/SetupApplicationSettingsLib/obj/ -/deployment/windows/CoatiTrialSetup/SetupCreateDesktopShortcutLib/bin/ -/deployment/windows/CoatiTrialSetup/SetupCreateDesktopShortcutLib/obj/ -/deployment/windows/CoatiTrialSetup/SetupCreateStartMenuShortcutLib/bin/ -/deployment/windows/CoatiTrialSetup/SetupCreateStartMenuShortcutLib/obj/ -/deployment/windows/CoatiTrialSetup/SetupRemoveCacheFiles/bin/ -/deployment/windows/CoatiTrialSetup/SetupRemoveCacheFiles/obj/ - -/deployment/windows/wixSetup/ +/deployment/windows/wixSetup/bin +/deployment/windows/wixSetup/build +/deployment/windows/wixSetup/CustomActions/SetupAppSettings/obj/x86/Release +/deployment/windows/wixSetup/CustomActions/UninstallRemoveLogFolder/obj/x86/Release +/deployment/windows/wixSetup/Setup/build/Setup/Release +/deployment/windows/wixSetup/Setup/build/Setup.VC.db \ No newline at end of file diff --git a/deployment/windows/wixSetup/build.bat b/deployment/windows/wixSetup/build.bat index 7c77a3b2..6b99d0ae 100644 --- a/deployment/windows/wixSetup/build.bat +++ b/deployment/windows/wixSetup/build.bat @@ -12,3 +12,10 @@ light.exe -ext WixUIExtension build/coati.wixobj build/customActions.wixobj buil cp -u -r build/coati.msi bin cp -u -r build/Setup.exe bin +cp -u -r lib/api-ms-win-crt-heap-l1-1-0.dll bin +cp -u -r lib/api-ms-win-crt-locale-l1-1-0.dll bin +cp -u -r lib/api-ms-win-crt-math-l1-1-0.dll bin +cp -u -r lib/api-ms-win-crt-runtime-l1-1-0.dll bin +cp -u -r lib/api-ms-win-crt-stdio-l1-1-0.dll bin +cp -u -r lib/msvcp140.dll bin +cp -u -r lib/vcruntime140.dll bin diff --git a/deployment/windows/wixSetup/build/api-ms-win-crt-heap-l1-1-0.dll b/deployment/windows/wixSetup/lib/api-ms-win-crt-heap-l1-1-0.dll similarity index 100% rename from deployment/windows/wixSetup/build/api-ms-win-crt-heap-l1-1-0.dll rename to deployment/windows/wixSetup/lib/api-ms-win-crt-heap-l1-1-0.dll diff --git a/deployment/windows/wixSetup/build/api-ms-win-crt-locale-l1-1-0.dll b/deployment/windows/wixSetup/lib/api-ms-win-crt-locale-l1-1-0.dll similarity index 100% rename from deployment/windows/wixSetup/build/api-ms-win-crt-locale-l1-1-0.dll rename to deployment/windows/wixSetup/lib/api-ms-win-crt-locale-l1-1-0.dll diff --git a/deployment/windows/wixSetup/build/api-ms-win-crt-math-l1-1-0.dll b/deployment/windows/wixSetup/lib/api-ms-win-crt-math-l1-1-0.dll similarity index 100% rename from deployment/windows/wixSetup/build/api-ms-win-crt-math-l1-1-0.dll rename to deployment/windows/wixSetup/lib/api-ms-win-crt-math-l1-1-0.dll diff --git a/deployment/windows/wixSetup/build/api-ms-win-crt-runtime-l1-1-0.dll b/deployment/windows/wixSetup/lib/api-ms-win-crt-runtime-l1-1-0.dll similarity index 100% rename from deployment/windows/wixSetup/build/api-ms-win-crt-runtime-l1-1-0.dll rename to deployment/windows/wixSetup/lib/api-ms-win-crt-runtime-l1-1-0.dll diff --git a/deployment/windows/wixSetup/build/api-ms-win-crt-stdio-l1-1-0.dll b/deployment/windows/wixSetup/lib/api-ms-win-crt-stdio-l1-1-0.dll similarity index 100% rename from deployment/windows/wixSetup/build/api-ms-win-crt-stdio-l1-1-0.dll rename to deployment/windows/wixSetup/lib/api-ms-win-crt-stdio-l1-1-0.dll diff --git a/deployment/windows/wixSetup/build/msvcp140.dll b/deployment/windows/wixSetup/lib/msvcp140.dll similarity index 100% rename from deployment/windows/wixSetup/build/msvcp140.dll rename to deployment/windows/wixSetup/lib/msvcp140.dll diff --git a/deployment/windows/wixSetup/build/vcruntime140.dll b/deployment/windows/wixSetup/lib/vcruntime140.dll similarity index 100% rename from deployment/windows/wixSetup/build/vcruntime140.dll rename to deployment/windows/wixSetup/lib/vcruntime140.dll diff --git a/deployment/windows/wixSetup/readme.txt b/deployment/windows/wixSetup/readme.txt index 4d2277b5..171ad84c 100644 --- a/deployment/windows/wixSetup/readme.txt +++ b/deployment/windows/wixSetup/readme.txt @@ -18,6 +18,12 @@ Build the installer -setup.exe checks whether coati is installed and will either start the initial installation or the upgrade installation +--------------------- +Clean the project +--------------------- +-Just delete the "bin" and "build" folders + + --------------------- Update Version Number --------------------- diff --git a/script/deploy_windows.sh b/script/deploy_windows.sh index 0661915f..6ae58eac 100644 --- a/script/deploy_windows.sh +++ b/script/deploy_windows.sh @@ -1,6 +1,7 @@ # FLAGS REBUILD=true OBFUSCATE=true +UPDATE_DATABASES=true # USEFUL VARIABLES @@ -26,6 +27,11 @@ if [ $OBFUSCATE = false ]; then read -p "Press [Enter] key to continue" fi +if [ $UPDATE_DATABASES = false ]; then + echo -e "$INFO UPDATE_DATABASES flag is set to false. Do you want to proceed?" + read -p "Press [Enter] key to continue" +fi + echo -e "$INFO Did you set the correct version number for the installers?" read -p "Press [Enter] key to continue" @@ -49,40 +55,42 @@ echo "#define DEPLOY" >src/lib_gui/platform_includes/deploy.h # CLEANING THE PROJECT if [ $REBUILD = true ]; then echo -e "$INFO cleaning the project" - "D:/programme/Microsoft Visual Studio14/Common7/IDE/devenv.com" build/Coati.sln //clean Release + "devenv.com" build/Coati.sln //clean Release fi # BUILDING THE EXECUTABLE echo -e "$INFO building the executable (app)" -"D:/programme/Microsoft Visual Studio14/Common7/IDE/devenv.com" build/Coati.sln //build Release //project build/Coati.vcxproj +"devenv.com" build/Coati.sln //build Release //project build/Coati.vcxproj -# CREATING TRAIL DATABASES´ -echo -e "$INFO creating databases" +# CREATING DATABASES +if [ $UPDATE_DATABASES = true ]; then + echo -e "$INFO creating databases" -rm bin/app/data/projects/tictactoe/tictactoe.coatidb -rm bin/app/data/projects/tutorial/tutorial.coatidb -rm bin/app/data/projects/javaparser/javaparser.coatidb -rm -rf temp + rm bin/app/data/projects/tictactoe/tictactoe.coatidb + rm bin/app/data/projects/tutorial/tutorial.coatidb + rm bin/app/data/projects/javaparser/javaparser.coatidb + rm -rf temp -mkdir -p temp -cd temp + mkdir -p temp + cd temp -echo -e "$INFO saving license key" -../bin/app/Release/Coati.exe -z ../script/license.txt + echo -e "$INFO saving license key" + ../bin/app/Release/Coati.exe -z ../script/license.txt -echo -e "$INFO creating database for tictactie" -../bin/app/Release/Coati.exe -p ../bin/app/data/projects/tictactoe/tictactoe.coatiproject -d + echo -e "$INFO creating database for tictactie" + ../bin/app/Release/Coati.exe -p ../bin/app/data/projects/tictactoe/tictactoe.coatiproject -d -echo -e "$INFO creating database for tutorial" -../bin/app/Release/Coati.exe -p ../bin/app/data/projects/tutorial/tutorial.coatiproject -d + echo -e "$INFO creating database for tutorial" + ../bin/app/Release/Coati.exe -p ../bin/app/data/projects/tutorial/tutorial.coatiproject -d -echo -e "$INFO creating database for javaparser" -../bin/app/Release/Coati.exe -p ../bin/app/data/projects/javaparser/javaparser.coatiproject -d + echo -e "$INFO creating database for javaparser" + ../bin/app/Release/Coati.exe -p ../bin/app/data/projects/javaparser/javaparser.coatiproject -d -cd .. -rm -rf temp + cd .. + rm -rf temp +fi # OBFUSCATING THE EXECUTABLE @@ -117,6 +125,13 @@ mkdir -p $APP_PACKAGE_DIR cp -u -r deployment/windows/wixSetup/bin/Coati.msi $APP_PACKAGE_DIR/ cp -u -r deployment/windows/wixSetup/bin/setup.exe $APP_PACKAGE_DIR/ +cp -u -r deployment/windows/wixSetup/bin/api-ms-win-crt-heap-l1-1-0.dll $APP_PACKAGE_DIR/ +cp -u -r deployment/windows/wixSetup/bin/api-ms-win-crt-locale-l1-1-0.dll $APP_PACKAGE_DIR/ +cp -u -r deployment/windows/wixSetup/bin/api-ms-win-crt-math-l1-1-0.dll $APP_PACKAGE_DIR/ +cp -u -r deployment/windows/wixSetup/bin/api-ms-win-crt-runtime-l1-1-0.dll $APP_PACKAGE_DIR/ +cp -u -r deployment/windows/wixSetup/bin/api-ms-win-crt-stdio-l1-1-0.dll $APP_PACKAGE_DIR/ +cp -u -r deployment/windows/wixSetup/bin/msvcp140.dll $APP_PACKAGE_DIR/ +cp -u -r deployment/windows/wixSetup/bin/vcruntime140.dll $APP_PACKAGE_DIR/ mkdir -p $APP_PACKAGE_DIR/plugins/atom/ cp -u -r ide_plugins/atom/* $APP_PACKAGE_DIR/plugins/atom/ @@ -148,7 +163,7 @@ rm -rf $APP_PACKAGE_DIR # UNSETTING THE DEPLOY FLAG rm -rf src/lib_gui/platform_includes/deploy.h -echo "// #define DEPLOY" >src/lib_gui/platform_includes/deploy.h +echo $'// #define DEPLOY' >src/lib_gui/platform_includes/deploy.h echo -e "$SUCCESS packaging complete!"