vscode-as3mxml icon indicating copy to clipboard operation
vscode-as3mxml copied to clipboard

asconfigc: handle creation of symbolic links when unpacking ANEs

Open ashikase opened this issue 9 months ago • 2 comments

Suggested fix for issue #801

ashikase avatar Apr 02 '25 19:04 ashikase

Thanks! I'll take a look when I get some free time.

joshtynjala avatar Apr 02 '25 19:04 joshtynjala

I'd like to get this merged. However I can't seem to get my hands on a known good ANE for macOS that contains symbolic links. I don't like merging something if I can't test to confirm that it works.

After searching and failing to find existing open source ANEs that I could use without modifications, I tried modifying an ANE that contains a .framework bundle without any symlinks to manually add the typical symlinks related Versions/Current (the various ANEs that I found simply duplicated all of the files in the .framework bundle instead of using symlinks).

What I found was that ADL crashes the first time I try to debug the app using the modified ANE (oddly, it works correctly the second time, which doesn't make sense because the files should be unchanged).

Error: Requested extension x.y.z could not be found.
The content cannot be loaded because there was a problem loading an extension: Error: Requested extension x.y.z could not be found.

Similarly, if I try to package the AIR app, ADT crashes with an exception. Presumably, when it encounters any of the symlinks stored the ANE zip file:

unexpected failure: Index 1 out of bounds for length 1
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at com.adobe.ucf.CodeSigner.addFileDigestToManifest(CodeSigner.java)
        at com.adobe.ucf.UCFOutputStream.addFile(UCFOutputStream.java)
        at com.adobe.air.ADTOutputStream.addFileFromStream(ADTOutputStream.java)
        at com.adobe.air.ADTOutputStream.addFileFromZipEntry(ADTOutputStream.java)
        at com.adobe.air.ApplicationPackager.addExtensions(ApplicationPackager.java)
        at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java)
        at com.adobe.air.nai.NativePackager.createPackage(NativePackager.java)
        at com.adobe.air.nai.AppBundlePackager.createPackage(AppBundlePackager.java)
        at com.adobe.air.ADT.parseArgsAndGo(ADT.java)
        at com.adobe.air.ADT.run(ADT.java)
        at com.adobe.air.ADT.main(ADT.java)

joshtynjala avatar Sep 17 '25 23:09 joshtynjala