mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 23:21:05 +00:00
appveyor: Generate PDBs for mingw build
This commit is contained in:
parent
d823759e49
commit
75fa1b2cde
39
.appveyor/ProcessPdb.ps1
Normal file
39
.appveyor/ProcessPdb.ps1
Normal file
@ -0,0 +1,39 @@
|
||||
# Generate pdb files for mingw
|
||||
if ($env:BUILD_TYPE -eq 'mingw') {
|
||||
Invoke-WebRequest -Uri https://raw.githubusercontent.com/citra-emu/ext-windows-bin/master/cv2pdb/cv2pdb.exe -OutFile cv2pdb.exe
|
||||
foreach ($exe in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "citra*.exe") {
|
||||
.\cv2pdb $exe.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Specify source locations in pdb via srcsrv.ini
|
||||
$srcsrv = "SRCSRV: ini ------------------------------------------------`r`n"
|
||||
$srcsrv += "VERSION=2`r`n"
|
||||
$srcsrv += "VERCTRL=http`r`n"
|
||||
$srcsrv += "SRCSRV: variables ------------------------------------------`r`n"
|
||||
$srcsrv += "SRCSRVTRG=https://raw.githubusercontent.com/%var2%/%var3%/%var4%`r`n"
|
||||
$srcsrv += "SRCSRV: source files ---------------------------------------`r`n"
|
||||
foreach ($repo in @{
|
||||
"citra-emu/citra" = ""
|
||||
"citra-emu/ext-boost" = "externals/boost"
|
||||
"citra-emu/ext-soundtouch" = "externals/soundtouch"
|
||||
"fmtlib/fmt" = "externals/fmt"
|
||||
"herumi/xbyak" = "externals/xbyak"
|
||||
"lsalzman/enet" = "externals/enet"
|
||||
"MerryMage/dynarmic" = "externals/dynarmic"
|
||||
"neobrain/nihstro" = "externals/nihstro"
|
||||
}.GetEnumerator()) {
|
||||
pushd
|
||||
cd $repo.Value
|
||||
$rev = git rev-parse HEAD
|
||||
$files = git ls-tree --name-only --full-tree -r HEAD
|
||||
foreach ($file in $files) {
|
||||
$srcsrv += "$(pwd)\$($file -replace '/','\')*$($repo.Name)*$rev*$file`r`n"
|
||||
}
|
||||
popd
|
||||
}
|
||||
$srcsrv += "SRCSRV: end ------------------------------------------------`r`n"
|
||||
Set-Content -Path srcsrv.ini -Value $srcsrv
|
||||
foreach ($pdb in Get-ChildItem "$RELEASE_DIST" -Recurse -Filter "*.pdb") {
|
||||
& "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:srcsrv.ini -p:$pdb.FullName -s:srcsrv
|
||||
}
|
@ -91,6 +91,7 @@ if (NOT MSVC)
|
||||
|
||||
if (MINGW)
|
||||
add_definitions(-DMINGW_HAS_SECURE_API)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gdwarf")
|
||||
|
||||
if (MINGW_STATIC_BUILD)
|
||||
add_definitions(-DQT_STATICPLUGIN)
|
||||
|
23
appveyor.yml
23
appveyor.yml
@ -82,26 +82,26 @@ after_build:
|
||||
$env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
|
||||
$env:BUILD_UPDATE = $MSVC_SEVENZIP
|
||||
|
||||
7z a -tzip $MSVC_BUILD_PDB .\msvc_build\bin\release\*.pdb
|
||||
rm .\msvc_build\bin\release\*.pdb
|
||||
|
||||
mkdir $RELEASE_DIST
|
||||
Copy-Item .\msvc_build\bin\release\* -Destination $RELEASE_DIST -Recurse
|
||||
Copy-Item .\license.txt -Destination $RELEASE_DIST
|
||||
Copy-Item .\README.md -Destination $RELEASE_DIST
|
||||
|
||||
# process PDBs
|
||||
. "./.appveyor/ProcessPdb.ps1"
|
||||
7z a -tzip $MSVC_BUILD_PDB $RELEASE_DIST\*.pdb
|
||||
rm $RELEASE_DIST\*.pdb
|
||||
|
||||
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
|
||||
7z a $MSVC_SEVENZIP $RELEASE_DIST
|
||||
} else {
|
||||
$MINGW_BUILD_ZIP = "citra-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
|
||||
$MINGW_BUILD_PDB = "citra-windows-mingw-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
||||
$MINGW_SEVENZIP = "citra-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
|
||||
# not going to bother adding separate debug symbols for mingw, so just upload a README for it
|
||||
# if someone wants to add them, change mingw to compile with -g and use objdump and strip to separate the symbols from the binary
|
||||
$MINGW_NO_DEBUG_SYMBOLS = "README_No_Debug_Symbols.txt"
|
||||
Set-Content -Path $MINGW_NO_DEBUG_SYMBOLS -Value "This is a workaround for Appveyor since msvc has debug symbols but mingw doesnt" -Force
|
||||
|
||||
# store the build information in env vars so we can use them as artifacts
|
||||
$env:BUILD_ZIP = $MINGW_BUILD_ZIP
|
||||
$env:BUILD_SYMBOLS = $MINGW_NO_DEBUG_SYMBOLS
|
||||
$env:BUILD_SYMBOLS = $MINGW_BUILD_PDB
|
||||
$env:BUILD_UPDATE = $MINGW_SEVENZIP
|
||||
|
||||
$CMAKE_SOURCE_DIR = "$env:APPVEYOR_BUILD_FOLDER"
|
||||
@ -117,7 +117,7 @@ after_build:
|
||||
Copy-Item -path "$CMAKE_SOURCE_DIR/README.md" -destination $RELEASE_DIST
|
||||
|
||||
# copy all the dll dependencies to the release folder
|
||||
. "./.appveyor/UtilityFunctions.ps1"
|
||||
. "./.appveyor/FindDependencies.ps1"
|
||||
$DLLSearchPath = "C:\msys64\mingw64\bin;$env:PATH"
|
||||
$MingwDLLs = RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra.exe"
|
||||
$MingwDLLs += RecursivelyGetDeps $DLLSearchPath "$RELEASE_DIST\citra-qt.exe"
|
||||
@ -130,6 +130,11 @@ after_build:
|
||||
# copy the qt windows plugin dll to platforms
|
||||
Copy-Item -path "C:/msys64/mingw64/share/qt5/plugins/platforms/qwindows.dll" -force -destination "$RELEASE_DIST/platforms"
|
||||
|
||||
# process PDBs
|
||||
. "./.appveyor/ProcessPdb.ps1"
|
||||
7z a -tzip $MINGW_BUILD_PDB $RELEASE_DIST\*.pdb
|
||||
rm $RELEASE_DIST\*.pdb
|
||||
|
||||
7z a -tzip $MINGW_BUILD_ZIP $RELEASE_DIST\*
|
||||
7z a $MINGW_SEVENZIP $RELEASE_DIST
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user