mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
Creating *.pdb files when building Greenshot, which we will package in a .ZIP so we can supply them when needed.
This commit is contained in:
parent
0d59072bc1
commit
6bf1ebf4f4
3 changed files with 60 additions and 16 deletions
|
@ -27,7 +27,7 @@
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<FileAlignment>4096</FileAlignment>
|
<FileAlignment>4096</FileAlignment>
|
||||||
<DebugType>None</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -363,9 +363,8 @@ namespace GreenshotPlugin.Core {
|
||||||
/// <param name="uri">Uri</param>
|
/// <param name="uri">Uri</param>
|
||||||
/// <returns>DateTime</returns>
|
/// <returns>DateTime</returns>
|
||||||
public static DateTime GetLastModified(Uri uri) {
|
public static DateTime GetLastModified(Uri uri) {
|
||||||
HttpWebRequest webRequest;
|
|
||||||
try {
|
try {
|
||||||
webRequest = (HttpWebRequest)CreateWebRequest(uri);
|
HttpWebRequest webRequest = CreateWebRequest(uri);
|
||||||
webRequest.Method = "HEAD";
|
webRequest.Method = "HEAD";
|
||||||
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
|
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
|
||||||
LOG.DebugFormat("RSS feed was updated at {0}", webResponse.LastModified);
|
LOG.DebugFormat("RSS feed was updated at {0}", webResponse.LastModified);
|
||||||
|
|
71
build.ps1
71
build.ps1
|
@ -134,36 +134,36 @@ Function PackagePortable {
|
||||||
Function PackageZip {
|
Function PackageZip {
|
||||||
$sourcebase = "$(get-location)\Greenshot\bin\Release"
|
$sourcebase = "$(get-location)\Greenshot\bin\Release"
|
||||||
$destbase = "$(get-location)\Greenshot\releases"
|
$destbase = "$(get-location)\Greenshot\releases"
|
||||||
$destinstaller = "$destbase\NO-INSTALLER"
|
$destzip = "$destbase\NO-INSTALLER"
|
||||||
|
|
||||||
# Only remove the zip we are going to create, to prevent adding but keeping the history
|
# Only remove the zip we are going to create, to prevent adding but keeping the history
|
||||||
if (Test-Path ("$destbase\Greenshot-NO-INSTALLER-$fileversion.zip")) {
|
if (Test-Path ("$destbase\Greenshot-NO-INSTALLER-$fileversion.zip")) {
|
||||||
Remove-Item "$destbase\Greenshot-NO-INSTALLER-$fileversion.zip" -Confirm:$false
|
Remove-Item "$destbase\Greenshot-NO-INSTALLER-$fileversion.zip" -Confirm:$false
|
||||||
}
|
}
|
||||||
# Remove the directory to create the files in
|
# Remove the directory to create the files in
|
||||||
if (Test-Path ("$destinstaller")) {
|
if (Test-Path ("$destzip")) {
|
||||||
Remove-Item "$destinstaller" -recurse -Confirm:$false
|
Remove-Item "$destzip" -recurse -Confirm:$false
|
||||||
}
|
}
|
||||||
New-Item -ItemType directory -Path "$destinstaller" | Out-Null
|
New-Item -ItemType directory -Path "$destzip" | Out-Null
|
||||||
|
|
||||||
echo ";dummy config, used to make greenshot store the configuration in this directory" | Set-Content "$destinstaller\greenshot.ini" -encoding UTF8
|
echo ";dummy config, used to make greenshot store the configuration in this directory" | Set-Content "$destzip\greenshot.ini" -encoding UTF8
|
||||||
echo ";In this file you should add your default settings" | Set-Content "$destinstaller\greenshot-defaults.ini" -encoding UTF8
|
echo ";In this file you should add your default settings" | Set-Content "$destzip\greenshot-defaults.ini" -encoding UTF8
|
||||||
echo ";In this file you should add your fixed settings" | Set-Content "$destinstaller\greenshot-fixed.ini" -encoding UTF8
|
echo ";In this file you should add your fixed settings" | Set-Content "$destzip\greenshot-fixed.ini" -encoding UTF8
|
||||||
|
|
||||||
$INCLUDE=@("*.gsp", "*.dll", "*.exe", "*.config")
|
$INCLUDE=@("*.gsp", "*.dll", "*.exe", "*.config")
|
||||||
Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach {
|
Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach {
|
||||||
$path = $_.fullname -replace ".*\\Plugins\\", "$destinstaller\Plugins\"
|
$path = $_.fullname -replace ".*\\Plugins\\", "$destzip\Plugins\"
|
||||||
New-Item -ItemType File -Path "$path" -Force | Out-Null
|
New-Item -ItemType File -Path "$path" -Force | Out-Null
|
||||||
Copy-Item -Path $_ -Destination "$path" -Force
|
Copy-Item -Path $_ -Destination "$path" -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
$INCLUDE=@("help-*.html","language-*.xml")
|
$INCLUDE=@("help-*.html","language-*.xml")
|
||||||
Get-ChildItem -Path "$(get-location)\Greenshot\Languages\" -Recurse -Include $INCLUDE -Exclude "*installer*","*website*" | foreach {
|
Get-ChildItem -Path "$(get-location)\Greenshot\Languages\" -Recurse -Include $INCLUDE -Exclude "*installer*","*website*" | foreach {
|
||||||
$path = $_.fullname -replace ".*\\Languages\\", "$destinstaller\Languages\"
|
$path = $_.fullname -replace ".*\\Languages\\", "$destzip\Languages\"
|
||||||
New-Item -ItemType File -Path "$path" -Force | Out-Null
|
New-Item -ItemType File -Path "$path" -Force | Out-Null
|
||||||
Copy-Item -Path $_ -Destination "$path" -Force
|
Copy-Item -Path $_ -Destination "$path" -Force
|
||||||
}
|
}
|
||||||
Copy-Item -Path "$sourcebase\Languages\Plugins\" -Destination "$destinstaller\Languages\Plugins\" -Recurse
|
Copy-Item -Path "$sourcebase\Languages\Plugins\" -Destination "$destzip\Languages\Plugins\" -Recurse
|
||||||
|
|
||||||
@( "$sourcebase\checksum.MD5",
|
@( "$sourcebase\checksum.MD5",
|
||||||
"$sourcebase\Greenshot.exe",
|
"$sourcebase\Greenshot.exe",
|
||||||
|
@ -171,11 +171,11 @@ Function PackageZip {
|
||||||
"$sourcebase\GreenshotPlugin.dll",
|
"$sourcebase\GreenshotPlugin.dll",
|
||||||
"$sourcebase\log4net.dll",
|
"$sourcebase\log4net.dll",
|
||||||
"$sourcebase\log4net.xml",
|
"$sourcebase\log4net.xml",
|
||||||
"$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destinstaller\" }
|
"$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destzip\" }
|
||||||
|
|
||||||
$zipOutput = "$(get-location)\zip"
|
$zipOutput = "$(get-location)\zip"
|
||||||
$zip7 = "$(get-location)\greenshot\tools\7zip\7za.exe"
|
$zip7 = "$(get-location)\greenshot\tools\7zip\7za.exe"
|
||||||
$arguments = @('a', '-mx9', '-tzip', '-r', "$destbase\Greenshot-NO-INSTALLER-$fileversion.zip", "$destinstaller\*")
|
$arguments = @('a', '-mx9', '-tzip', '-r', "$destbase\Greenshot-NO-INSTALLER-$fileversion.zip", "$destzip\*")
|
||||||
Write-Host "Starting $zip7 $arguments"
|
Write-Host "Starting $zip7 $arguments"
|
||||||
$zipResult = Start-Process -wait -PassThru "$zip7" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$zipOutput.log" -RedirectStandardError "$zipOutput.error"
|
$zipResult = Start-Process -wait -PassThru "$zip7" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$zipOutput.log" -RedirectStandardError "$zipOutput.error"
|
||||||
Write-Host "Log output:"
|
Write-Host "Log output:"
|
||||||
|
@ -186,7 +186,49 @@ Function PackageZip {
|
||||||
exit -1
|
exit -1
|
||||||
}
|
}
|
||||||
Start-Sleep -m 1500
|
Start-Sleep -m 1500
|
||||||
Remove-Item "$destinstaller" -Recurse -Confirm:$false
|
Remove-Item "$destzip" -Recurse -Confirm:$false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# This function creates the debug symbols .zip
|
||||||
|
Function PackageDbgSymbolsZip {
|
||||||
|
$sourcebase = "$(get-location)\Greenshot\bin\Release"
|
||||||
|
$destbase = "$(get-location)\Greenshot\releases"
|
||||||
|
$destdbgzip = "$destbase\DEBUGSYMBOLS"
|
||||||
|
|
||||||
|
# Only remove the zip we are going to create, to prevent adding but keeping the history
|
||||||
|
if (Test-Path ("$destbase\Greenshot-DEBUGSYMBOLS-$fileversion.zip")) {
|
||||||
|
Remove-Item "$destbase\Greenshot-DEBUGSYMBOLS-$fileversion.zip" -Confirm:$false
|
||||||
|
}
|
||||||
|
# Remove the directory to create the files in
|
||||||
|
if (Test-Path ("$destdbgzip")) {
|
||||||
|
Remove-Item "$destdbgzip" -recurse -Confirm:$false
|
||||||
|
}
|
||||||
|
New-Item -ItemType directory -Path "$destdbgzip" | Out-Null
|
||||||
|
|
||||||
|
$INCLUDE=@("*.pdb")
|
||||||
|
Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach {
|
||||||
|
$path = $_.fullname -replace ".*\\Plugins\\", "$destdbgzip\Plugins\"
|
||||||
|
New-Item -ItemType File -Path "$path" -Force | Out-Null
|
||||||
|
Copy-Item -Path $_ -Destination "$path" -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
@( "$sourcebase\*.pdb") | foreach { Copy-Item $_ "$destdbgzip\" }
|
||||||
|
|
||||||
|
$zipOutput = "$(get-location)\dbgzip"
|
||||||
|
$zip7 = "$(get-location)\greenshot\tools\7zip\7za.exe"
|
||||||
|
$arguments = @('a', '-mx9', '-tzip', '-r', "$destbase\Greenshot-DEBUGSYMBOLS-$fileversion.zip", "$destdbgzip\*")
|
||||||
|
Write-Host "Starting $zip7 $arguments"
|
||||||
|
$zipResult = Start-Process -wait -PassThru "$zip7" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$zipOutput.log" -RedirectStandardError "$zipOutput.error"
|
||||||
|
Write-Host "Log output:"
|
||||||
|
Get-Content "$zipOutput.log"| Write-Host
|
||||||
|
if ($zipResult.ExitCode -ne 0) {
|
||||||
|
Write-Host "Error output:"
|
||||||
|
Get-Content "$zipOutput.error"| Write-Host
|
||||||
|
exit -1
|
||||||
|
}
|
||||||
|
Start-Sleep -m 1500
|
||||||
|
Remove-Item "$destdbgzip" -Recurse -Confirm:$false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,5 +287,8 @@ PackageZip
|
||||||
echo "Generating Portable"
|
echo "Generating Portable"
|
||||||
PackagePortable
|
PackagePortable
|
||||||
|
|
||||||
|
echo "Generating Debug Symbols ZIP"
|
||||||
|
PackageDbgSymbolsZip
|
||||||
|
|
||||||
echo "build successful, tagging with $fileversion"
|
echo "build successful, tagging with $fileversion"
|
||||||
TagCode
|
TagCode
|
Loading…
Add table
Add a link
Reference in a new issue