From 476e731b9eb7273b1d9d84bc75c50a47e71d4dd3 Mon Sep 17 00:00:00 2001 From: malte_langkabel Date: Fri, 3 Mar 2017 19:49:39 +0100 Subject: [PATCH] build: building windows releases with .pdb files now to debug customer crashes with .dmp files --- CMakeLists.txt | 4 +++ deployment/windows/wixSetup/installDir.wxs | 2 +- script/deploy_windows.sh | 32 +++++++--------------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd2306f7..4e6d1b6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -425,6 +425,10 @@ if (WIN32) set_target_properties(${APP_PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/ENTRY:\"mainCRTStartup\" /SUBSYSTEM:WINDOWS") set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") + + # generate pdb for release build + set_target_properties(${APP_PROJECT_NAME} PROPERTIES LINK_FLAGS_RELEASE "/DEBUG") + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") else () add_executable(${APP_PROJECT_NAME} ${APP_FILES}) endif () diff --git a/deployment/windows/wixSetup/installDir.wxs b/deployment/windows/wixSetup/installDir.wxs index bf72e92a..75ff848e 100644 --- a/deployment/windows/wixSetup/installDir.wxs +++ b/deployment/windows/wixSetup/installDir.wxs @@ -13,7 +13,7 @@ - + diff --git a/script/deploy_windows.sh b/script/deploy_windows.sh index 4eae9cd4..c94e494d 100644 --- a/script/deploy_windows.sh +++ b/script/deploy_windows.sh @@ -1,7 +1,6 @@ # FLAGS CLEAN_AND_SETUP=true REBUILD=true -OBFUSCATE=true UPDATE_DATABASES=true @@ -27,11 +26,6 @@ if [ $REBUILD = false ]; then read -p "Press [Enter] key to continue" fi -if [ $OBFUSCATE = false ]; then - echo -e "$INFO OBFUSCATE flag is set to false. Do you want to proceed?" - 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" @@ -90,7 +84,7 @@ if [ $UPDATE_DATABASES = true ]; then echo -e "$INFO saving license key" ../build/win32/Release/app/Coati.exe -z ../script/license.txt - echo -e "$INFO creating database for tictactie" + echo -e "$INFO creating database for tictactoe" ../build/win32/Release/app/Coati.exe -p ../bin/app/user/projects/tictactoe/tictactoe.coatiproject -d echo -e "$INFO creating database for tutorial" @@ -104,21 +98,6 @@ if [ $UPDATE_DATABASES = true ]; then fi -# OBFUSCATING THE EXECUTABLES -if [ $OBFUSCATE = true ]; then - echo -e "$INFO obfuscating the executable (32 bit)" - rm build/win32/Release/app/Coati_obfuscated.exe - upx --brute -o build/win32/Release/app/Coati_obfuscated.exe build/win32/Release/app/Coati.exe - - echo -e "$INFO obfuscating the executable (64 bit)" - rm build/win64/Release/app/Coati_obfuscated.exe - upx --brute -o build/win64/Release/app/Coati_obfuscated.exe build/win64/Release/app/Coati.exe -else - cp build/win32/Release/app/Coati.exe build/win32/Release/app/Coati_obfuscated.exe - cp build/win64/Release/app/Coati.exe build/win64/Release/app/Coati_obfuscated.exe -fi - - # BUILDING THE INSTALLER cd deployment/windows/wixSetup build_win32.sh @@ -185,8 +164,17 @@ cp -u -r ide_plugins/vs/coati_plugin_vs.vsix $APP_PACKAGE_DIR_WIN64/plugins/visu # PACKAGING COATI echo -e "$INFO packaging coati" cd ./release/ + winrar a -afzip Coati_${VERSION_STRING}_Windows_32bit.zip $APP_PACKAGE_NAME_WIN32 winrar a -afzip Coati_${VERSION_STRING}_Windows_64bit.zip $APP_PACKAGE_NAME_WIN64 + + +# STORING PDB FILES +mkdir PDB_${APP_PACKAGE_NAME_WIN32} +cp -u -r ../build/win32/Release/app/Coati.pdb PDB_${APP_PACKAGE_NAME_WIN32}/ +mkdir PDB_${APP_PACKAGE_NAME_WIN64} +cp -u -r ../build/win64/Release/app/Coati.pdb PDB_${APP_PACKAGE_NAME_WIN64}/ + cd ../