Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Namespace Not Updated for Flex Desktop Build & Run #869

Closed
JoelProminic opened this issue Jun 25, 2021 · 11 comments
Closed

Application Namespace Not Updated for Flex Desktop Build & Run #869

JoelProminic opened this issue Jun 25, 2021 · 11 comments
Assignees
Labels
Milestone

Comments

@JoelProminic
Copy link
Contributor

@feather812002 reported an error like this on macOS 10.13 and 10.14 with recent nightly builds. I can confirm part of it on macOS 10.15.7:

  1. Create a new Flex Desktop project. Select the Harman AIR (33.1) SDK as the default SDK
  2. Open the src/%project%-app.xml file. The namespace is set to 32.0 (<application xmlns="http://ns.adobe.com/air/application/32.0">). Is this hard-coded in the template?
  3. Update the namespace to 33.1
  4. Project > Build & Run. BUG: in some cases, the application fails to start here
  5. Open bin-debug/%project%-app.xml. BUG: the namespace is 32.0 rather than 33.1
  6. Update the namespace to 33.1
  7. Run the application manually. Open bin-debug in a Terminal and run ~/Downloads/MoonshineSDKs/Flex_SDK/Flex_4.16.1_AIR_33.1/bin/adl %project%-app.xml. This runs properly

When @feather812002 tries to build Moonshine, it shows the Harman splash screen on Build & Run, but the app never opens. Fixing the namespace allows the application to launch.

How is the namespace updated for the bin-debug copy of the descriptor file?

@rat-moonshine
Copy link
Collaborator

Open the src/%project%-app.xml file. The namespace is set to 32.0 (). Is this hard-coded in the template?

Moonshine generates the namespace to the application descriptor file during a project's creation - based on the default or given SDK's configuration-read value.

For this Moonshine relies on $sdkPath/frameworks/flex-config.xml 's <taget-player> value. This value also uses during a Build & Run process, to update the bin-debug copied *-app.xml file's namespace based on the currently running SDK's major-player-version.

I saw this value is 32.0 in case of downloaded/installed Harman Flex/AIR SDK. I see I did some fixes here but this never been tested - Moonshine-IDE/Moonshine-SDK-Installer#56 (comment).

@rat-moonshine
Copy link
Collaborator

I did couple of changes which affects following areas:

  1. namespace generate based on selected SDK during a project's creation - previously, it was always populated by Moonshine's default-SDK value and based on custom project being selected (during a project's creation)
  2. namespace generation with proper {major}.{minor} values - updated to work for Harman and previous Adobe SDKs
  3. Proper namespace generation in *-app.xml file that being copied into bin-debug folder during a "Build & Run"
  4. Couple of other areas updated to keep the major and minor version of swf using the current SDK

Beside that I have updated the Moonshine SDK Installer to install Harman Flex/AIR SDK with proper target-player value in its flex-config.xml file. Should be tested with newer installation (of MSDKI).

@rat-moonshine rat-moonshine added test ready Feature/bug ready for testing and removed in-progress labels Jun 28, 2021
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jun 29, 2021

During our tests with @JoelProminic we found that a mirror-URL to download Apache Flex SDK binary is broken. (A corresponding issue has created to choose between available mirrors here Moonshine-IDE/Moonshine-SDK-Installer#62.)

For now, I have updated the mirror-URLs to download Apache Flex SDK from the backup site - it looks like the mirror-URL suggests/provides by Apache based on geolocation and mine was .in mirror, this might not be very correct for others in different sides of the world, so I chose the backup site (https://downloads.apache.org) for now.

@JoelProminic
Copy link
Contributor Author

I tested this on macOS, and it seems to be working well.

Custom SDK Default SDK Populated Namespace
Harman AIR 33.1
AIR AIR 33.1
- Harman 33.1
- AIR 32.0

Windows needs testing still, but this is a good sign.

@JoelProminic
Copy link
Contributor Author

@feather812002 reported that he was still seeing this error with the latest Moonshine build.
image

@feather812002, you'll need to delete your ~/Downloads/MoonshineSDKs/Flex_SDK/Flex_4.16.1_AIR_33.1 directory and download it again with a newer build of MSDKI to get some required SDK-side changes.

Another difference I noticed is that @feather812002 was using an external JDK 1.8 for Java Development Kit Root Path. I did a quick test with an external JDK 8 on my normal workstation, and I found that application could still open properly, so I don't think that this is the problem. However, I recommend installing and configuring JDK 11 using MSDKI anyway, to avoid problems with the language server.. If this download doesn't work for you for some reason, let me know so that we can investigate further.

@JoelProminic
Copy link
Contributor Author

@feather812002, have you tried testing this with a fresh Harman AIR installation? Please check this, so that we can close the issue if that fixes your problem.s

@piotrzarzycki21
Copy link
Collaborator

Hey @feather812002 could you please test this ? Download newest Nightly Moonshine SDK Installer, install new Harman Air. Additionally make sure that you have setup JAVA.

rat-moonshine added a commit that referenced this issue Jul 21, 2021
rat-moonshine added a commit that referenced this issue Jul 21, 2021
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jul 21, 2021

As part of Moonshine-IDE/Moonshine-SDK-Installer#56 changes namespace generation for -app.xml file in bin-debug now retrieves from airsdk.xml instead of earlier flex-config.xml. Give this a test if you can running Harman and non-Harman SDK project in Moonshine.

@feather812002
Copy link
Collaborator

@JoelProminic after I update the ide/MoonshineGUICore/bin/flash/bin/MoonshineGUICore.swc
I can pass the error that I report on yesterday. Now, it can build success.

@piotrzarzycki21 after I install the latest Moonshine-SDK-Installer and latest Harman SDK .
Now, it can auto lunch success and no any error.

@JoelProminic
Copy link
Contributor Author

I installed the latest Moonshine builds and reinstalled the Flex SDKs with the latest version of MSDKI. Here are my results:

OS Flex SDK Namespace Build & Run
macOS Adobe AIR 32.0 Works
macOS Harman AIR 33.1 Works
Windows Adobe AIR 32.0 Works
Windows Harman AIR 33.1 Works

This looks good to me.

@piotrzarzycki21 piotrzarzycki21 removed the test ready Feature/bug ready for testing label Jul 28, 2021
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Aug 13, 2021

I found a rather unexpected problem while testing Prominic Native in Moonshine-IDE. Even after the SWF compiled well, Moonshine failed to launch the application.

I've found that <initialWindow><content> property (inside bin-debug/?-app.xml file) was holding the default value and not updated with the SWF file reference.

image

While looking closely I found there was two <content> tag in the file - one comment-off and one active. Moonshine was replacing this tag using regExp but without a global parameter. Thus, it was replacing only the first <content> which was unfortunately the comment-off one. I adjusted the update codes with a global parameter now which should fix this matter. Tested working correctly for Native now.

rat-moonshine added a commit that referenced this issue Aug 13, 2021
…launch problem where multiple <content> may exists (#869)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Moonshine-IDE - Bug Fixing
  
Awaiting triage
Development

No branches or pull requests

4 participants