aboutsummaryrefslogtreecommitdiff
path: root/project/Win32BuildSetup
diff options
context:
space:
mode:
authorPär Björklund <per@ohmy.nu>2016-10-23 20:05:07 +0200
committerPär Björklund <per@ohmy.nu>2016-10-23 20:05:07 +0200
commit1e90c3de2bb38617583a6a8bf3ffeabb3b4c6f34 (patch)
tree6a265766d3d0d38ea94406962184793f051e82ca /project/Win32BuildSetup
parentd7fa42eb1bc3d6403c8c7afaa65b306e910f4a86 (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
Diffstat (limited to 'project/Win32BuildSetup')
-rw-r--r--project/Win32BuildSetup/BuildSetup.bat10
-rw-r--r--project/Win32BuildSetup/copy-pdb.ps16
2 files changed, 14 insertions, 2 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