Fixed build, made Box API V2 work with .NET3.5 unfortunately this means people with .NET 2.0 can't use the box plugin anymore.

This commit is contained in:
RKrom 2013-12-11 17:33:08 +01:00
commit ba0c9d0010
5 changed files with 15 additions and 34 deletions

View file

@ -1,6 +1,6 @@
[Format] [Format]
Type=PortableApps.comFormat Type=PortableApps.comFormat
Version=2.0 Version=@GITVERSION@
[Details] [Details]
Name=Greenshot Portable Name=Greenshot Portable
@ -8,7 +8,7 @@ AppID=Greenshot_for_PortableApps
Publisher=Greenshot Publisher=Greenshot
Homepage=getgreenshot.org Homepage=getgreenshot.org
Category=Graphics & Pictures Category=Graphics & Pictures
Description=The great Greenshot tool Description=Greenshot tool
Language=Multilingual Language=Multilingual
Trademarks= Trademarks=
InstallType= InstallType=
@ -21,15 +21,15 @@ CommercialUse=true
EULAVersion=true EULAVersion=true
[Version] [Version]
PackageVersion=1.1.6.$WCREV$ PackageVersion=@GITDETAILVERSION@
DisplayVersion=1.1.6.$WCREV$ DisplayVersion=@GITVERSION@
[SpecialPaths] [SpecialPaths]
Plugins=NONE Plugins=NONE
[Dependencies] [Dependencies]
UsesJava=false UsesJava=false
UsesDotNetVersion=2.0 UsesDotNetVersion=4.5
[Control] [Control]
Icons=1 Icons=1

View file

@ -306,7 +306,7 @@ Name: "plugins\imgur"; Description: {cm:imgur}; Types: default full custom; Flag
Name: "plugins\confluence"; Description: {cm:confluence}; Types: full custom; Flags: disablenouninstallwarning; Check: hasDotNet35FullOrHigher() Name: "plugins\confluence"; Description: {cm:confluence}; Types: full custom; Flags: disablenouninstallwarning; Check: hasDotNet35FullOrHigher()
Name: "plugins\externalcommand"; Description: {cm:externalcommand}; Types: default full custom; Flags: disablenouninstallwarning Name: "plugins\externalcommand"; Description: {cm:externalcommand}; Types: default full custom; Flags: disablenouninstallwarning
;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full ;Name: "plugins\networkimport"; Description: "Network Import Plugin"; Types: full
Name: "plugins\box"; Description: "Box Plugin"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\box"; Description: "Box Plugin"; Types: full custom; Flags: disablenouninstallwarning; Check: hasDotNet35FullOrHigher()
Name: "plugins\dropbox"; Description: "Dropbox Plugin"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\dropbox"; Description: "Dropbox Plugin"; Types: full custom; Flags: disablenouninstallwarning
Name: "plugins\flickr"; Description: "Flickr Plugin"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\flickr"; Description: "Flickr Plugin"; Types: full custom; Flags: disablenouninstallwarning
Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: full custom; Flags: disablenouninstallwarning Name: "plugins\picasa"; Description: "Picasa Plugin"; Types: full custom; Flags: disablenouninstallwarning

View file

@ -216,23 +216,5 @@ namespace GreenshotBoxPlugin {
return (T)deserializer.ReadObject(stream); return (T)deserializer.ReadObject(stream);
} }
} }
/// <summary>
/// Helper method to parse JSON to object
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="jsonString"></param>
/// <returns></returns>
public static T DeserializeWithDirectory<T>(string jsonString) {
DataContractJsonSerializerSettings settings = new DataContractJsonSerializerSettings();
settings.UseSimpleDictionaryFormat = true;
var deserializer = new DataContractJsonSerializer(typeof(T), settings);
using (MemoryStream stream = new MemoryStream()) {
byte[] content = Encoding.UTF8.GetBytes(jsonString);
stream.Write(content, 0, content.Length);
stream.Seek(0, SeekOrigin.Begin);
return (T)deserializer.ReadObject(stream);
}
}
} }
} }

View file

@ -6,7 +6,7 @@
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>GreenshotBoxPlugin</RootNamespace> <RootNamespace>GreenshotBoxPlugin</RootNamespace>
<AssemblyName>GreenshotBoxPlugin</AssemblyName> <AssemblyName>GreenshotBoxPlugin</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
@ -26,6 +26,7 @@
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.ServiceModel.Web" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BoxConfiguration.cs" /> <Compile Include="BoxConfiguration.cs" />

View file

@ -150,7 +150,6 @@ Function PackagePortable {
@( "$sourcebase\checksum.MD5", @( "$sourcebase\checksum.MD5",
"$sourcebase\Greenshot.exe.config", "$sourcebase\Greenshot.exe.config",
"$sourcebase\GreenshotPlugin.dll", "$sourcebase\GreenshotPlugin.dll",
"$sourcebase\GreenshotEditor.dll",
"$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destbase\portabletmp\App\Greenshot\" } "$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\Languages\help-en-US.html" -Destination "$destbase\portabletmp\help.html"
@ -210,7 +209,6 @@ Function PackageZip {
"$sourcebase\Greenshot.exe", "$sourcebase\Greenshot.exe",
"$sourcebase\Greenshot.exe.config", "$sourcebase\Greenshot.exe.config",
"$sourcebase\GreenshotPlugin.dll", "$sourcebase\GreenshotPlugin.dll",
"$sourcebase\GreenshotEditor.dll",
"$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destinstaller\" } "$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destinstaller\" }
$zipOutput = "$(get-location)\zip" $zipOutput = "$(get-location)\zip"
@ -264,8 +262,8 @@ WaitForKey
# SIG # Begin signature block # SIG # Begin signature block
# MIIEt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Jvb3QC
# EMqESRzCQ1WzRZpnzm7fmOAwCQYFKw4DAhoFAKB4MBgGCisGAQQBgjcCAQwxCjAI # EMqESRzCQ1WzRZpnzm7fmOAwCQYFKw4DAhoFAKB4MBgGCisGAQQBgjcCAQwxCjAI
# oAKAAKECgAAwGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIB # oAKAAKECgAAwGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIB
# CzEOMAwGCisGAQQBgjcCARUwIwYJKoZIhvcNAQkEMRYEFH5N3rkoNAqfwfm9+NWz # CzEOMAwGCisGAQQBgjcCARUwIwYJKoZIhvcNAQkEMRYEFPy89grwAkqkUfIWJQR1
# e956GSjEMA0GCSqGSIb3DQEBAQUABIGAnNDXqL2r7NpwSzqCO8ceO9mhf1b3hlG7 # N5zo3qVVMA0GCSqGSIb3DQEBAQUABIGAsOLH02OKRs6Sq8JtHFX2BzwE79LnqP5h
# OaavA85n73okZ/+V0xrCh9no3HZGOiQop8ER+QqKcOaoePwMkEySt2lhBkCB8hyr # 106pDkybKDKsI/dX9VXsKFwxiScAOueKWWL+QAnb3kDp6Ozd4m1XTACjKZ2UVwKI
# kH3qaJdksld5E/m1LXm/b0A/6dmDahcn1LMDKndisayPup43K2SNCv4iewnp6hhB # UmXZQP8nUzbtgmafwgrJngZ24gRON5dVO4RayeXXUu9tWiQg9F6kzo5linh6K0iC
# uI1p0ciFDRc= # Z+9uQPBDOYs=
# SIG # End signature block # SIG # End signature block