diff options
author | Pär Björklund <per@ohmy.nu> | 2016-10-23 20:05:07 +0200 |
---|---|---|
committer | Pär Björklund <per@ohmy.nu> | 2016-10-23 20:05:07 +0200 |
commit | 1e90c3de2bb38617583a6a8bf3ffeabb3b4c6f34 (patch) | |
tree | 6a265766d3d0d38ea94406962184793f051e82ca | |
parent | d7fa42eb1bc3d6403c8c7afaa65b306e910f4a86 (diff) |
Build addons with debug info on Windows
Change buildsetup to bundle all our PDB files into an
archive, should hopefully make it easier to look at addon
crashes
-rw-r--r-- | project/Win32BuildSetup/BuildSetup.bat | 10 | ||||
-rw-r--r-- | project/Win32BuildSetup/copy-pdb.ps1 | 6 | ||||
-rw-r--r-- | tools/buildsteps/win32/make-addons.bat | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/project/Win32BuildSetup/BuildSetup.bat b/project/Win32BuildSetup/BuildSetup.bat index 49b6c42066..2f26ea2464 100644 --- a/project/Win32BuildSetup/BuildSetup.bat +++ b/project/Win32BuildSetup/BuildSetup.bat @@ -58,7 +58,7 @@ FOR %%b in (%1, %2, %3, %4, %5, %6) DO ( IF %%b==sh SET useshell=sh ) -SET buildconfig=Release +SET buildconfig=RelWithDebInfo set WORKSPACE=%CD%\..\..\kodi-build @@ -218,6 +218,7 @@ set WORKSPACE=%CD%\..\..\kodi-build CALL extract_git_rev.bat > NUL SET APP_SETUPFILE=%APP_NAME%Setup-%GIT_REV%-%BRANCH%.exe SET APP_PDBFILE=%APP_NAME%Setup-%GIT_REV%-%BRANCH%.pdb + SET APP_PDB_BUNDLE=%APP_NAME%Setup-%GIT_REV%-%BRANCH%-PDB.7z ECHO Creating installer %APP_SETUPFILE%... IF EXIST %APP_SETUPFILE% del %APP_SETUPFILE% > NUL rem get path to makensis.exe from registry, first try tab delim @@ -261,7 +262,12 @@ set WORKSPACE=%CD%\..\..\kodi-build set DIETEXT=Failed to create %APP_SETUPFILE%. NSIS installed? goto DIE ) - copy %PDB% %APP_PDBFILE% > nul + REM copy %PDB% %APP_PDBFILE% > nul + + rmdir /S /Q PDB > nul + md PDB > nul + powershell -ExecutionPolicy Unrestricted -File .\copy-pdb.ps1 + tools\7z\7za.exe a -bd -r %APP_PDB_BUNDLE% PDB ECHO ------------------------------------------------------------ ECHO Done! ECHO Setup is located at %CD%\%APP_SETUPFILE% diff --git a/project/Win32BuildSetup/copy-pdb.ps1 b/project/Win32BuildSetup/copy-pdb.ps1 new file mode 100644 index 0000000000..f421bcbc9c --- /dev/null +++ b/project/Win32BuildSetup/copy-pdb.ps1 @@ -0,0 +1,6 @@ +Get-ChildItem -Recurse -Include *.pdb -Exclude vc140.pdb,'kodi-test.pdb',gtest.pdb,CMakeCCompilerId.pdb,CMakeCXXCompilerId.pdb,example.pdb ..\.. | +foreach { + if (-not $_.DirectoryName.EndsWith('PDB')) { + Copy-Item $_.FullName (join-path PDB $_.Name) + } +}
\ No newline at end of file diff --git a/tools/buildsteps/win32/make-addons.bat b/tools/buildsteps/win32/make-addons.bat index efad84a9cf..473e73a871 100644 --- a/tools/buildsteps/win32/make-addons.bat +++ b/tools/buildsteps/win32/make-addons.bat @@ -104,7 +104,7 @@ IF "%addon%" NEQ "" ( rem execute cmake to generate makefiles processable by nmake cmake "%ADDONS_PATH%" -G "NMake Makefiles" ^ - -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_BUILD_TYPE=RelWithDebInfo ^ -DCMAKE_USER_MAKE_RULES_OVERRIDE="%SCRIPTS_PATH%/CFlagOverrides.cmake" ^ -DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX="%SCRIPTS_PATH%/CXXFlagOverrides.cmake" ^ -DCMAKE_INSTALL_PREFIX=%ADDONS_INSTALL_PATH% ^ |