In the Feathers SDK Manager, I also had the same issue with Error #1000 on
Windows as we're having with the Flex SDK Installer. I was able to come up
with a solution for this issue.

To recap, on Windows, the Installer currently allocates more memory than is
allowed by a 32-bit process. The file size of the AIR SDK has grown
significantly recently, and that brought us over the threshold. The
Installer loads the entire zip file for the AIR SDK into memory to expand
it to the file system with ActionScript. My solution is to have a native
system process expand the zip file instead.

Windows PowerShell is able to expand zip files. Here is the command that I
came up with that does the trick:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command &
{Param([string]$zipPath,[string]$outPath)$shell = New-Object -ComObject
shell.application;$zip = $shell.NameSpace($zipPath);New-Item -path $outPath
-type directory -force;$shell.NameSpace($outPath).CopyHere($zip.items(), 4
+ 16);[Environment]::Exit(0);} "src.zip" "destFolder"

(Replace src.zip and destFolder with the actual paths, obviously)

PowerShell is installed by default as far back as Windows 7, and I have
tested that this script runs successfully even using that older version of
PowerShell. The Adobe AIR system requirements require Windows 7 or newer,
so while PowerShell may not be available on much older versions of Windows,
Adobe AIR doesn't officially run there either, so the Installer should be
able to invoke PowerShell safely.

http://www.adobe.com/products/air/tech-specs.html

It's worth mentioning that our AntOnAIR library and the Flex SDK Installer
uses /usr/bin/tar to expan tar files on macOS, so invoking system
executables is already something that we've done in this codebase.

You can see how I call PowerShell with NativeProcess in context in the
Unzip class in my fork of AntOnAIR:

https://github.com/BowlerHatLLC/feathers-sdk-manager/blob/3a5fcd7015f102e66a2ab10f1bc21a0e67485e71/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as#L143

I'd be happy to make these changes in the Flex SDK Installer too, unless I
hear any objections.

- Josh

Reply via email to