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]
Type=PortableApps.comFormat
Version=2.0
Version=@GITVERSION@
[Details]
Name=Greenshot Portable
@ -8,7 +8,7 @@ AppID=Greenshot_for_PortableApps
Publisher=Greenshot
Homepage=getgreenshot.org
Category=Graphics & Pictures
Description=The great Greenshot tool
Description=Greenshot tool
Language=Multilingual
Trademarks=
InstallType=
@ -21,15 +21,15 @@ CommercialUse=true
EULAVersion=true
[Version]
PackageVersion=1.1.6.$WCREV$
DisplayVersion=1.1.6.$WCREV$
PackageVersion=@GITDETAILVERSION@
DisplayVersion=@GITVERSION@
[SpecialPaths]
Plugins=NONE
[Dependencies]
UsesJava=false
UsesDotNetVersion=2.0
UsesDotNetVersion=4.5
[Control]
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\externalcommand"; Description: {cm:externalcommand}; Types: default full custom; Flags: disablenouninstallwarning
;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\flickr"; Description: "Flickr 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);
}
}
/// <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>
<RootNamespace>GreenshotBoxPlugin</RootNamespace>
<AssemblyName>GreenshotBoxPlugin</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
@ -26,6 +26,7 @@
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.ServiceModel.Web" />
</ItemGroup>
<ItemGroup>
<Compile Include="BoxConfiguration.cs" />

View file

@ -150,7 +150,6 @@ Function PackagePortable {
@( "$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"
@ -210,7 +209,6 @@ Function PackageZip {
"$sourcebase\Greenshot.exe",
"$sourcebase\Greenshot.exe.config",
"$sourcebase\GreenshotPlugin.dll",
"$sourcebase\GreenshotEditor.dll",
"$destbase\additional_files\*.txt" ) | foreach { Copy-Item $_ "$destinstaller\" }
$zipOutput = "$(get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