diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2016-10-24 08:12:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-24 08:12:11 +0200 |
commit | 36bda85db8ee65575dca186d83170cf5fba6678f (patch) | |
tree | 69b7cb9dcb19ee5ca6bd3aebead52353974ad343 | |
parent | 3d0e630b253904a49a3417dca3c37bbda5008caa (diff) | |
parent | 1e90c3de2bb38617583a6a8bf3ffeabb3b4c6f34 (diff) |
Merge pull request #10760 from Paxxi/more_debug
[xbmc][win]Build addons with debug info on Windows
-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% ^ |