diff --git a/.gitignore b/.gitignore index c81ecdc90..9e40da7c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ .svn/ *.gsp *.bak -*INSTALLER*.exe -*INSTALLER*.zip +Greenshot*INSTALLER*.exe +Greenshot*INSTALLER*.zip *.paf.exe *-SVN.* -bin/ +/Greenshot*/bin/ obj/ fugue/ *Credentials.private.cs @@ -16,9 +16,7 @@ upgradeLog.XML /Greenshot/releases/additional_files/readme.txt /*.error /Greenshot/releases/innosetup/setup.iss -/Greenshot/tools/PortableApps.comInstaller/Data -/Greenshot/releases/portable/Greenshot.exe -/Greenshot/releases/portable/help.html -/Greenshot/releases/portable/App/AppInfo /Greenshot/packages /Greenshot/releases/appinfo.ini + +/Greenshot/tools/PortableApps.comInstaller/Data/PortableApps.comInstallerLog.txt diff --git a/Greenshot/AssemblyInfo.cs.template b/Greenshot/AssemblyInfo.cs.template index b49b02b8a..30315b395 100644 --- a/Greenshot/AssemblyInfo.cs.template +++ b/Greenshot/AssemblyInfo.cs.template @@ -20,7 +20,6 @@ */ using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; // Information about this assembly is defined by the following // attributes. // diff --git a/Greenshot/tools/PortableApps.comInstaller/Data/settings.ini b/Greenshot/tools/PortableApps.comInstaller/Data/settings.ini new file mode 100644 index 000000000..8a4e3981d --- /dev/null +++ b/Greenshot/tools/PortableApps.comInstaller/Data/settings.ini @@ -0,0 +1 @@ +[InstallerWizard] diff --git a/GreenshotBoxPlugin/Properties/AssemblyInfo.cs.template b/GreenshotBoxPlugin/Properties/AssemblyInfo.cs.template index 4732a0ddb..1e0a0fa49 100644 --- a/GreenshotBoxPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotBoxPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotConfluencePlugin/Properties/AssemblyInfo.cs.template b/GreenshotConfluencePlugin/Properties/AssemblyInfo.cs.template index 52fd887fe..cab48af1a 100644 --- a/GreenshotConfluencePlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotConfluencePlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs.template b/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs.template index b003caf15..1a7933eef 100644 --- a/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotDropboxPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotExternalCommandPlugin/Properties/AssemblyInfo.cs.template b/GreenshotExternalCommandPlugin/Properties/AssemblyInfo.cs.template index 209065827..f59f9a077 100644 --- a/GreenshotExternalCommandPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotExternalCommandPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs.template b/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs.template index ed4e760a7..25d13e603 100644 --- a/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotFlickrPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotImgurPlugin/Properties/AssemblyInfo.cs.template b/GreenshotImgurPlugin/Properties/AssemblyInfo.cs.template index 44c576eb6..91f675a5d 100644 --- a/GreenshotImgurPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotImgurPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotJiraPlugin/Properties/AssemblyInfo.cs.template b/GreenshotJiraPlugin/Properties/AssemblyInfo.cs.template index 0988f6c2e..665b809a6 100644 --- a/GreenshotJiraPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotJiraPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotOCRCommand/Properties/AssemblyInfo.cs.template b/GreenshotOCRCommand/Properties/AssemblyInfo.cs.template index c6c9ee5e2..89226496b 100644 --- a/GreenshotOCRCommand/Properties/AssemblyInfo.cs.template +++ b/GreenshotOCRCommand/Properties/AssemblyInfo.cs.template @@ -1,4 +1,24 @@ -using System.Reflection; +/* + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2013 Thomas Braun, Jens Klingen, Robin Krom + * + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/GreenshotOCRPlugin/Properties/AssemblyInfo.cs.template b/GreenshotOCRPlugin/Properties/AssemblyInfo.cs.template index e5b0144a4..4499ec44f 100644 --- a/GreenshotOCRPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotOCRPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotOfficePlugin/Properties/AssemblyInfo.cs.template b/GreenshotOfficePlugin/Properties/AssemblyInfo.cs.template index 2d8329eb5..93bf54024 100644 --- a/GreenshotOfficePlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotOfficePlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs.template b/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs.template index 0d80ffc0d..2005e7be4 100644 --- a/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotPhotobucketPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs.template b/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs.template index ba789faf1..4a01be3fc 100644 --- a/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotPicasaPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/GreenshotPlugin/Properties/AssemblyInfo.cs.template b/GreenshotPlugin/Properties/AssemblyInfo.cs.template index ddb620139..5988009c1 100644 --- a/GreenshotPlugin/Properties/AssemblyInfo.cs.template +++ b/GreenshotPlugin/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following @@ -50,10 +49,3 @@ using System.Windows.Markup; // Build Numbers by using the '*' as shown below: [assembly: AssemblyVersion("@GITVERSION@")] [assembly: AssemblyInformationalVersion("@GITDETAILVERSION@")] - -// Definitions for XAML namespaces -[assembly: XmlnsPrefix("http://schemas.getgreenshot.net/plugin/", "greenshotplugin")] -[assembly: XmlnsDefinition("http://schemas.getgreenshot.net/plugin/", "GreenshotPlugin")] -[assembly: XmlnsDefinition("http://schemas.getgreenshot.net/plugin/", "GreenshotPlugin.Core")] -[assembly: XmlnsDefinition("http://schemas.getgreenshot.net/plugin/", "GreenshotPlugin.Core.Settings")] -[assembly: XmlnsDefinition("http://schemas.getgreenshot.net/plugin/", "GreenshotPlugin.WPF")] \ No newline at end of file diff --git a/PluginExample/Properties/AssemblyInfo.cs.template b/PluginExample/Properties/AssemblyInfo.cs.template index db58e5ab4..3e3d381e0 100644 --- a/PluginExample/Properties/AssemblyInfo.cs.template +++ b/PluginExample/Properties/AssemblyInfo.cs.template @@ -23,7 +23,6 @@ using System; using System.Reflection; using System.Runtime.InteropServices; -using System.Windows.Markup; #endregion // General Information about an assembly is controlled through the following diff --git a/build.ps1 b/build.ps1 index 23eff7ba8..e717086d0 100644 --- a/build.ps1 +++ b/build.ps1 @@ -95,9 +95,9 @@ Function FillTemplates { } Function Build { - $msBuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild" + $msBuild = "C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild" if (-not (Test-Path("$msBuild"))) { - $msBuild = "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild" + $msBuild = "C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild" } $parameters = @('Greenshot\Greenshot.sln', '/t:Clean;Build', '/p:Configuration="Release"', '/p:Platform="Any CPU"') $buildOutput = "$(get-location)\build.log" @@ -119,42 +119,56 @@ Function MD5Checksums { } Function PackagePortable { -#del /q releases\GreenshotPortable*.paf.exe -#del /q releases\portable\App\Greenshot\* -#rmdir /s /q releases\portable\App\Greenshot\Languages -#rmdir /s /q releases\portable\App\Greenshot\Plugins -#del /q releases\portable\*.* - -#pause -#mkdir releases\portable\App\Greenshot\Plugins -#xcopy /S bin\Release\Plugins\* releases\portable\App\Greenshot\Plugins\ -#mkdir releases\portable\App\Greenshot\Languages -#xcopy /S Languages\language*.xml releases\portable\App\Greenshot\Languages -#xcopy /S Languages\help*.html releases\portable\App\Greenshot\Languages -#copy Languages\help-en-US.html releases\portable\help.html -#xcopy /S bin\Release\Languages\Plugins\* releases\portable\App\Greenshot\Languages\Plugins\ - -#copy /B bin\Release\checksum.MD5 releases\portable\App\Greenshot -#copy /B bin\Release\GreenshotPlugin.dll releases\portable\App\Greenshot -#copy /B bin\Release\Greenshot.exe releases\portable\ -#copy /B bin\Release\Greenshot.exe.config releases\portable\App\Greenshot -#xcopy /S releases\additional_files\*.txt releases\portable\App\Greenshot -#del releases\portable\App\Greenshot\readme.template.txt - -#pause -#tools\PortableApps.comInstaller\PortableApps.comInstaller.exe %CD%\releases\portable -#pause + $sourcebase = "$(get-location)\Greenshot\bin\Release" $destbase = "$(get-location)\Greenshot\releases" + # Only remove the paf we are going to create, to prevent adding but keeping the history + if (Test-Path ("$destbase\GreenshotPortable-$version.paf.exe")) { + Remove-Item "$destbase\GreenshotPortable-$version.paf.exe" -Confirm:$false + } + # Remove the directory to create the files in + if (Test-Path ("$destbase\portabletmp")) { + Remove-Item "$destbase\portabletmp" -recurse -Confirm:$false + } + Copy-Item -Path "$destbase\portable" -Destination "$destbase\portabletmp" -Recurse + + $INCLUDE=@("*.gsp", "*.dll", "*.exe") + Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach { + $path = $_.fullname -replace ".*\\Plugins\\", "$destbase\portabletmp\App\Greenshot\Plugins\" + New-Item -ItemType File -Path "$path" -Force | Out-Null + Copy-Item -Path $_ -Destination "$path" -Force + } + + $INCLUDE=@("help-*.html","language-*.xml") + Get-ChildItem -Path "$sourcebase\Languages\" -Recurse -Include $INCLUDE | foreach { + $path = $_.fullname -replace ".*\\Languages\\", "$destbase\portabletmp\App\Greenshot\Languages\" + New-Item -ItemType File -Path "$path" -Force | Out-Null + Copy-Item -Path $_ -Destination "$path" -Force + } + Copy-Item -Path "$sourcebase\Languages\Plugins\" -Destination "$destbase\portabletmp\App\Greenshot\Languages\Plugins\" -Recurse + + @( "$sourcebase\checksum.MD5", + "$sourcebase\Greenshot.exe.config", + "$sourcebase\GreenshotPlugin.dll", + "$sourcebase\GreenshotEditor.dll", + "$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destbase\portabletmp\App\Greenshot\" } + + Copy-Item -Path "$sourcebase\Languages\help-en-US.html" -Destination "$destbase\portabletmp\help.html" + + Copy-Item -Path "$sourcebase\Greenshot.exe" -Destination "$destbase\portabletmp" + + Copy-Item -Path "$destbase\appinfo.ini" -Destination "$destbase\portabletmp\App\AppInfo\appinfo.ini" + $portableOutput = "$(get-location)\portable" $portableInstaller = "$(get-location)\greenshot\tools\PortableApps.comInstaller\PortableApps.comInstaller.exe" - $arguments = @("$destbase\portable") + $arguments = @("$destbase\portabletmp") echo "Starting $portableInstaller $arguments" $portableResult = Start-Process -wait -PassThru "$portableInstaller" -ArgumentList $arguments -NoNewWindow -RedirectStandardOutput "$portableOutput.log" -RedirectStandardError "$portableOutput.error" if ($portableResult.ExitCode -ne 0) { echo "An error occured, please check $portableOutput.log and $portableOutput.error for errors!" exit -1 } + Remove-Item "$destbase\portabletmp" -recurse -Confirm:$false return } @@ -177,7 +191,7 @@ Function PackageZip { 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 fixed settings" | Set-Content "$destinstaller\greenshot-fixed.ini" -encoding UTF8 - $INCLUDE=@("*.gsp","*.dll") + $INCLUDE=@("*.gsp", "*.dll", "*.exe") Get-ChildItem -Path "$sourcebase\Plugins\" -Recurse -Include $INCLUDE | foreach { $path = $_.fullname -replace ".*\\Plugins\\", "$destinstaller\Plugins\" New-Item -ItemType File -Path "$path" -Force | Out-Null @@ -190,6 +204,7 @@ Function PackageZip { New-Item -ItemType File -Path "$path" -Force | Out-Null Copy-Item -Path $_ -Destination "$path" -Force } + Copy-Item -Path "$sourcebase\Languages\Plugins\" -Destination "$destinstaller\Languages\Plugins\" -Recurse @( "$sourcebase\checksum.MD5", "$sourcebase\Greenshot.exe", @@ -207,7 +222,7 @@ Function PackageZip { echo "An error occured, please check $zipOutput.log and $zipOutput.error for errors!" exit -1 } - #Remove-Item "$destinstaller" -recurse -Confirm:$false + Remove-Item "$destinstaller" -recurse -Confirm:$false return } @@ -238,6 +253,9 @@ PackageInstaller echo "Generating ZIP" PackageZip +echo "Generating Portable" +PackagePortable + echo "Ready, press any key to continue!" WaitForKey @@ -246,8 +264,8 @@ WaitForKey # SIG # Begin signature block # MIIEtAYJKoZIhvcNAQcCoIIEpTCCBKECAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUlbFVweNW7YraUhh7CNud8cS4 -# HCugggK+MIICujCCAaagAwIBAgIQyoRJHMJDVbNFmmfObt+Y4DAJBgUrDgMCHQUA +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUrj4gCFRpu7VRoh4bzyfOF1yt +# w+6gggK+MIICujCCAaagAwIBAgIQyoRJHMJDVbNFmmfObt+Y4DAJBgUrDgMCHQUA # MCwxKjAoBgNVBAMTIVBvd2VyU2hlbGwgTG9jYWwgQ2VydGlmaWNhdGUgUm9vdDAe # Fw0xMzExMjYxOTMxMTVaFw0zOTEyMzEyMzU5NTlaMBoxGDAWBgNVBAMTD1Bvd2Vy # U2hlbGwgVXNlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0SEsL7kNLoYA @@ -265,9 +283,9 @@ WaitForKey # QDAsMSowKAYDVQQDEyFQb3dlclNoZWxsIExvY2FsIENlcnRpZmljYXRlIFJvb3QC # EMqESRzCQ1WzRZpnzm7fmOAwCQYFKw4DAhoFAKB4MBgGCisGAQQBgjcCAQwxCjAI # oAKAAKECgAAwGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIB -# CzEOMAwGCisGAQQBgjcCARUwIwYJKoZIhvcNAQkEMRYEFPa00iSnYtAOO8lKmzlv -# dosV3T21MA0GCSqGSIb3DQEBAQUABIGARi5Xcf6HDxqHyidGg+cwOnTtowXJnAln -# 1VkPnlkxXETkm/FTC3gVNWoOY+Tu0FIZT1CY9pRKxiQE6kLx/1PYxjdWVg5CyEFa -# B0ZQN3EOMn8r0UpY0LRnIg6hS/d7ucGR+yOXZ8yoLj7ehUwT39AQgSZ8d0SRqS1A -# DpRjRHpB9Yk= +# CzEOMAwGCisGAQQBgjcCARUwIwYJKoZIhvcNAQkEMRYEFH5N3rkoNAqfwfm9+NWz +# e956GSjEMA0GCSqGSIb3DQEBAQUABIGAnNDXqL2r7NpwSzqCO8ceO9mhf1b3hlG7 +# OaavA85n73okZ/+V0xrCh9no3HZGOiQop8ER+QqKcOaoePwMkEySt2lhBkCB8hyr +# kH3qaJdksld5E/m1LXm/b0A/6dmDahcn1LMDKndisayPup43K2SNCv4iewnp6hhB +# uI1p0ciFDRc= # SIG # End signature block