Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Meychi committed Apr 10, 2014
2 parents 5961b18 + 00dede9 commit 4712cb6
Show file tree
Hide file tree
Showing 19 changed files with 121 additions and 48 deletions.
8 changes: 5 additions & 3 deletions External/Plugins/AirProperties/Managers/PropertyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PropertyManager
private static AirVersion _version;
private static Boolean _unsupportedVersion;
private const String _BaseAirNamespace = "http://ns.adobe.com/air/application/";
private const String _MaxSupportedVersion = "4.0";
private const String _MaxSupportedVersion = "13.0";

public enum AirVersion
{
Expand All @@ -42,7 +42,8 @@ public enum AirVersion
V37 = 16, // Version 3.7
V38 = 17, // Version 3.8
V39 = 18, // Version 3.9
V40 = 19 // Version 4.0
V40 = 19, // Version 4.0
V130 = 20 // Version 13.0
}

public static Exception LastException
Expand Down Expand Up @@ -115,11 +116,12 @@ public static Boolean InitializeProperties(string filePath)
else if (nsuri.StartsWith(_BaseAirNamespace + "3.8")) _version = AirVersion.V38;
else if (nsuri.StartsWith(_BaseAirNamespace + "3.9")) _version = AirVersion.V39;
else if (nsuri.StartsWith(_BaseAirNamespace + "4.0")) _version = AirVersion.V40;
else if (nsuri.StartsWith(_BaseAirNamespace + "13.0")) _version = AirVersion.V130;
else
{
// Is a valid AIR descriptor, but version not supported so default to max supported version
_unsupportedVersion = true;
_version = AirVersion.V40;
_version = AirVersion.V130;
}
}
_namespaceManager = new XmlNamespaceManager(_descriptorFile.NameTable);
Expand Down
13 changes: 12 additions & 1 deletion External/Tools/AppMan/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,18 @@ private void DeleteButtonClick(Object sender, EventArgs e)
this.RunExecutableProcess(tempFile);
}
#endif
Directory.Delete(Path.Combine(PathHelper.APPS_DIR, entry.Id), true);
String folder = Path.Combine(PathHelper.APPS_DIR, entry.Id);
// Sometimes we might get "dir not empty" error, try 10 times...
for (Int32 attempts = 0; attempts < 10; attempts++)
{
try
{
if (Directory.Exists(folder)) Directory.Delete(folder, true);
return;
}
catch (IOException) { Thread.Sleep(50); }
}
throw new Exception("Could not delete the directory:\n" + folder);
}
}
}
Expand Down
61 changes: 60 additions & 1 deletion External/Tools/AppMan/Utilities/ZipHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
using System.Text;
using System.Collections.Generic;
using ICSharpCode.SharpZipLib.Zip;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using System.Globalization;

namespace AppMan.Utilities
{
Expand Down Expand Up @@ -32,7 +35,12 @@ public static void ExtractZip(String file, String path)
{
Directory.CreateDirectory(dirPath);
}
FileStream extracted = new FileStream(entry.Name, FileMode.Create);
String fullPath = Path.Combine(path, entry.Name);
#if WIN32
FileStream extracted = LongPathFileOpen(fullPath);
#else
FileStream extracted = File.Open(fullPath, FileMode.Create, FileAccess.Write);
#endif
while (true)
{
size = zis.Read(data, 0, data.Length);
Expand All @@ -56,6 +64,57 @@ public static void ExtractZip(String file, String path)
Environment.CurrentDirectory = curDir;
}

#region LongPath

// See: http://bcl.codeplex.com/wikipage?title=Long%20Path&referringTitle=Home

#if WIN32

private const string LongPathPrefix = @"\\?\";

[Flags]
internal enum EFileAccess : uint
{
GenericRead = 0x80000000,
GenericWrite = 0x40000000,
GenericExecute = 0x20000000,
GenericAll = 0x10000000,
}

[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
internal static extern uint GetFullPathName(string lpFileName, uint nBufferLength, StringBuilder lpBuffer, IntPtr mustBeNull);

[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
internal static extern SafeFileHandle CreateFile(string lpFileName, EFileAccess dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile);

public static FileStream LongPathFileOpen(string path)
{
string normalizedPath = NormalizeLongPath(path);
SafeFileHandle handle = CreateFile(normalizedPath, EFileAccess.GenericWrite, (uint)FileShare.None, IntPtr.Zero, (uint)FileMode.Create, (uint)FileOptions.None, IntPtr.Zero);
if (handle.IsInvalid) throw new Exception("Error while resolving path.");
return new FileStream(handle, FileAccess.Write, 1024, false);
}

internal static string NormalizeLongPath(string path)
{
StringBuilder buffer = new StringBuilder(path.Length + 1);
uint length = GetFullPathName(path, (uint)buffer.Capacity, buffer, IntPtr.Zero);
if (length > buffer.Capacity)
{
buffer.Capacity = (int)length;
length = GetFullPathName(path, length, buffer, IntPtr.Zero);
}
if (length == 0 || length > 32000)
{
throw new Exception("Error while resolving path.");
}
return LongPathPrefix + buffer.ToString();
}

#endif

#endregion

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<movie fps="30" />
<movie width="800" />
<movie height="600" />
<movie version="4" />
<movie version="13" />
<movie minorVersion="0" />
<movie platform="AIR" />
<movie background="#FFFFFF" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/4.0">
<application xmlns="http://ns.adobe.com/air/application/13.0">

<id>$(PACKAGEDOT)$(PROJECTID)</id>
<versionNumber>1.0</versionNumber>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<movie fps="30" />
<movie width="800" />
<movie height="600" />
<movie version="4" />
<movie version="13" />
<movie minorVersion="0" />
<movie platform="AIR" />
<movie background="#FFFFFF" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/4.0">
<application xmlns="http://ns.adobe.com/air/application/13.0">

<id>$(PACKAGEDOT)$(PROJECTID)</id>
<versionNumber>1.0</versionNumber>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<movie fps="30" />
<movie width="480" />
<movie height="762" />
<movie version="4" />
<movie version="13" />
<movie minorVersion="0" />
<movie platform="AIR Mobile" />
<movie background="#FFFFFF" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/4.0">
<application xmlns="http://ns.adobe.com/air/application/13.0">

<id>air.$(PACKAGEDOT)$(PROJECTID)</id>
<versionNumber>0.1</versionNumber>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<movie fps="30" />
<movie width="480" />
<movie height="762" />
<movie version="4" />
<movie version="13" />
<movie minorVersion="0" />
<movie platform="AIR Mobile" />
<movie background="#FFFFFF" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/4.0">
<application xmlns="http://ns.adobe.com/air/application/13.0">

<id>air.$(PACKAGEDOT)$(PROJECTID)</id>
<versionNumber>0.1</versionNumber>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<movie fps="30" />
<movie width="800" />
<movie height="600" />
<movie version="4" />
<movie version="13" />
<movie minorVersion="0" />
<movie platform="AIR" />
<movie background="#FFFFFF" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/4.0">
<application xmlns="http://ns.adobe.com/air/application/13.0">

<id>$(PACKAGEDOT)$(PROJECTID)</id>
<versionNumber>1.0</versionNumber>
Expand Down
Binary file modified FlashDevelop/Bin/Debug/Tools/appman/AppMan.exe
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions FlashDevelop/Installer/Installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
;--------------------------------

; Define version info
!define VERSION "4.6.1"
!define VERSION "4.6.2"

; Installer details
VIAddVersionKey "CompanyName" "FlashDevelop.org"
VIAddVersionKey "ProductName" "FlashDevelop Installer"
VIAddVersionKey "LegalCopyright" "FlashDevelop.org 2005-2013"
VIAddVersionKey "LegalCopyright" "FlashDevelop.org 2005-2014"
VIAddVersionKey "FileDescription" "FlashDevelop Installer"
VIAddVersionKey "ProductVersion" "${VERSION}.0"
VIAddVersionKey "FileVersion" "${VERSION}.0"
Expand Down
4 changes: 2 additions & 2 deletions FlashDevelop/Properties/AssemblyInfo.cs.rev
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ using System.Resources;
//
[assembly: AssemblyTitle("FlashDevelop 4")]
[assembly: AssemblyDescription("FlashDevelop is an open source script editor.")]
[assembly: AssemblyProduct("FlashDevelop 4.6.1$BUILD$ for .NET 2.0 ($BRANCH$#$COMMIT$)")]
[assembly: AssemblyCopyright("FlashDevelop.org 2005-2013")]
[assembly: AssemblyProduct("FlashDevelop 4.6.2$BUILD$ for .NET 2.0 ($BRANCH$#$COMMIT$)")]
[assembly: AssemblyCopyright("FlashDevelop.org 2005-2014")]
[assembly: AssemblyCompany("FlashDevelop.org")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
Expand Down
17 changes: 9 additions & 8 deletions PluginCore/PluginCore/PlatformData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ namespace PluginCore
public class PlatformData
{
public static String DEFAULT_NME_VERSION = "3.0";
public static String DEFAULT_AIR_VERSION = "4.0";
public static String DEFAULT_AIR_MOBILE_VERSION = "4.0";
public static String DEFAULT_FLASH_VERSION = "12.0";
public static String[] AIR_VERSIONS = new String[] { "1.5", "2.0", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0" };
public static String[] AIR_MOBILE_VERSIONS = new String[] { "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0" };
public static String[] FLASH_VERSIONS = new String[] { "9.0", "10.0", "10.1", "10.2", "10.3", "11.0", "11.1", "11.2", "11.3", "11.4", "11.5", "11.6", "11.7", "11.8", "11.9", "12.0" };
public static String[] SWF_VERSIONS = new String[] { "9", "10", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23" };
public static String DEFAULT_AIR_VERSION = "13.0";
public static String DEFAULT_AIR_MOBILE_VERSION = "13.0";
public static String DEFAULT_FLASH_VERSION = "13.0";
public static String[] AIR_VERSIONS = new String[] { "1.5", "2.0", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0", "13.0" };
public static String[] AIR_MOBILE_VERSIONS = new String[] { "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4.0", "13.0" };
public static String[] FLASH_VERSIONS = new String[] { "9.0", "10.0", "10.1", "10.2", "10.3", "11.0", "11.1", "11.2", "11.3", "11.4", "11.5", "11.6", "11.7", "11.8", "11.9", "12.0", "13.0" };
public static String[] SWF_VERSIONS = new String[] { "9", "10", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24" };
public static String[] NME_TARGETS = new String[] { "flash", "html5", "windows", "neko", "android", "webos", "blackberry" };
public static String[] NME_VERSIONS = new String[] { "3.0" };

Expand Down Expand Up @@ -54,7 +54,8 @@ public static void GuessFlashPlayerForAIR(ref Int32 majorVersion, ref Int32 mino
else if (v < 3.8) { majorVersion = 11; minorVersion = 7; }
else if (v < 3.9) { majorVersion = 11; minorVersion = 8; }
else if (v < 4.0) { majorVersion = 11; minorVersion = 9; }
else { majorVersion = 12; minorVersion = 0; }
else if (v < 13.0) { majorVersion = 12; minorVersion = 0; }
else { majorVersion = 13; minorVersion = 0; }
}

}
Expand Down
42 changes: 21 additions & 21 deletions appman.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,72 +10,72 @@
<Info>http://www.adobe.com/devnet/flex.html</Info>
<Urls>
<Url>http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.6/flex_sdk_4.6.0.23201B.zip</Url>
<Url>http://www.flashdevelop.org/appman/frameworks_flexsdk.zip</Url>
<Url>http://www.flashdevelop.org/appman/frameworks_flexsdk_9-13.zip</Url>
</Urls>
</Entry>
<Entry>
<Id>flexairsdk</Id>
<Name>Flex + AIR SDK</Name>
<Version>4.6.0+4.0.0</Version>
<Build>23201B+1628</Build>
<Version>4.6.0+13.0.0</Version>
<Build>23201B+83</Build>
<Desc>Adobe Flex SDK merged with Adobe AIR SDK</Desc>
<Info>http://www.adobe.com/devnet/air.html</Info>
<Group>AS3</Group>
<Urls>
<Url>http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.6/flex_sdk_4.6.0.23201B.zip</Url>
<Url>http://airdownload.adobe.com/air/win/download/4.0/AdobeAIRSDK.zip</Url>
<Url>http://www.flashdevelop.org/appman/frameworks_flexsdk.zip</Url>
<Url>http://airdownload.adobe.com/air/win/download/13.0/AdobeAIRSDK.zip</Url>
<Url>http://www.flashdevelop.org/appman/frameworks_flexsdk_9-13.zip</Url>
</Urls>
</Entry>
<Entry>
<Id>ascsdk</Id>
<Name>AIR SDK + ASC 2.0</Name>
<Version>4.0.0</Version>
<Build>1628</Build>
<Version>13.0.0</Version>
<Build>83</Build>
<Desc>Adobe AIR SDK with ASC 2.0</Desc>
<Info>http://www.adobe.com/devnet/air.html</Info>
<Group>AS3</Group>
<Urls>
<Url>http://airdownload.adobe.com/air/win/download/4.0/AIRSDK_Compiler.zip</Url>
<Url>http://www.flashdevelop.org/appman/frameworks_flexsdk.zip</Url>
<Url>http://airdownload.adobe.com/air/win/download/13.0/AIRSDK_Compiler.zip</Url>
<Url>http://www.flashdevelop.org/appman/frameworks_flexsdk_9-13.zip</Url>
</Urls>
</Entry>
<Entry>
<Id>flashsa</Id>
<Name>Flash Player (SA)</Name>
<Version>12.0</Version>
<Build>0.77</Build>
<Version>13.0.0</Version>
<Build>182</Build>
<Desc>Standalone debug Flash Player</Desc>
<Group>AS3</Group>
<Info>http://www.adobe.com/support/flashplayer/downloads.html</Info>
<Urls>
<Url>http://download.macromedia.com/pub/flashplayer/updaters/12/flashplayer_12_sa_debug.exe</Url>
<Url>http://download.macromedia.com/pub/flashplayer/updaters/13/flashplayer_13_sa_debug.exe</Url>
</Urls>
</Entry>
<Entry>
<Id>flashns</Id>
<Name>Flash Player (NS)</Name>
<Version>12.0</Version>
<Build>0.77</Build>
<Version>13.0.0</Version>
<Build>182</Build>
<Desc>Debug Flash Player plugin for Netscape browsers</Desc>
<Group>AS3</Group>
<Type>Executable</Type>
<Info>http://www.adobe.com/support/flashplayer/downloads.html</Info>
<Urls>
<Url>http://download.macromedia.com/pub/flashplayer/updaters/12/flashplayer_12_plugin_debug.exe</Url>
<Url>http://download.macromedia.com/pub/flashplayer/updaters/13/flashplayer_13_plugin_debug.exe</Url>
</Urls>
</Entry>
<Entry>
<Id>flashie</Id>
<Name>Flash Player (AX)</Name>
<Version>12.0</Version>
<Build>0.77</Build>
<Version>13.0.0</Version>
<Build>182</Build>
<Desc>Debug Flash Player plugin for Interner Explorer</Desc>
<Group>AS3</Group>
<Type>Executable</Type>
<Info>http://www.adobe.com/support/flashplayer/downloads.html</Info>
<Urls>
<Url>http://download.macromedia.com/pub/flashplayer/updaters/12/flashplayer_12_ax_debug.exe</Url>
<Url>http://download.macromedia.com/pub/flashplayer/updaters/13/flashplayer_13_ax_debug.exe</Url>
</Urls>
</Entry>
<Entry>
Expand All @@ -94,14 +94,14 @@
<Entry>
<Id>airrt</Id>
<Name>Adobe AIR</Name>
<Version>4.0.0</Version>
<Build>1390</Build>
<Version>13.0.0</Version>
<Build>83</Build>
<Desc>Adobe AIR for AIR applications installer</Desc>
<Group>AS3</Group>
<Type>Executable</Type>
<Info>http://www.adobe.com/products/air.html</Info>
<Urls>
<Url>http://airdownload.adobe.com/air/win/download/4.0/AdobeAIRInstaller.exe</Url>
<Url>http://airdownload.adobe.com/air/win/download/13.0/AdobeAIRInstaller.exe</Url>
</Urls>
</Entry>
<Entry>
Expand Down

0 comments on commit 4712cb6

Please sign in to comment.