• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

AIR Build Server Setup

New Here ,
Aug 21, 2017 Aug 21, 2017

Copy link to clipboard

Copied

I am at the point where I am running into incredibly long build times for my project and more projects to come. I would like to make a build server but I have not had any experience with them aside from downloading files from them as an end user.

My ideal setup is this: A GitHub where I can place my .fla file, classes and ANEs. The server sees this, compiles it, and allows me to test it remotely or hook into some debugger that lets me see stack traces and active variables at breakpoints and errors like Adobe Animate or Flash Builder.

Now I see there are GitHub plugins for Jenkins. I see there are questions referring to how to set one up with Flex/AIR. I come here with a few issues.

  1. I am too far into my project to switch over from using Animate to something like Flash Develop or anything ADT related. The only thing I have found is how to take existing elements from my library in Animate and have them in a .swc for handling. However, this doesn't let me access existing elements in the Timeline and would rather not try to export/position/handle them in code (which is the only workaround that I see if this is not possible)
  2. I run ANEs that are dependent on Google Play services and other Android specific libraries. Thus, I haven't been able to use the standard mobile debug launcher for AIR. I see Jenkins has some specific abilities for Android. Is it possible to somehow use this to give me a proper window for testing? I am thinking that I would need to run their emulator after compiling everything but I am unsure if there is a more efficient method or if it would even work.

I have never worked with Jenkins before or any other tools capable of automating tasks. Any step by step explanations is appreciated if you have the time.

TOPICS
Development

Views

430

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

I only use Animate for making AIR apps, and some of them are hundred of megabytes in size, I have hit the issue of long build times before, and found a way to solve that. I'll tell you how I do it, in case it can help solve your original need, without having to switch tools or set up build servers.

In any timeline based project you're going to have scenes or movieclips that take up a lot of the FLA size. When you make a tiny change to code in another area of the FLA, everything gets compiled again, every time. A solution to that is to take a movieclip and put it into another FLA, publish as SWC, and add that SWC into the main FLA. When you build it doesn't have to rebuild the SWC. Only the main shell FLA has to be recompiled.

These would be the steps for an example movieclip called "helpsection", which for the sake of argument is massive, and takes a big chunk of the build time:

1. In the main FLA, select the helpsection movieclip on the stage, and Copy.

2. In a new FLA that is the same size and frame as your main FLA you Paste the movieclip into the Library.

3. In the Properties for the movieclip in the library, go into Advanced, and set it for Export for ActionScript. Give it a Class name of HelpSection

4. In Publish Settings make it publish for SWC. You can set the SWC path, I would set it to be the same folder that the main FLA is going to publish to. Do a Publish.

5.  In the main FLA, go into ActionScript 3.0 Settings and in the Library Path tab (same place you've been adding ANEs) click + and the f icon, to add the SWC that you just made.

6. Back in the timeline, where you copied the movieclip helpsection, delete the movieclip (or make a Guide layer if you like for now).

7. In the Actions panel for that same frame add this:

var helpmc:MovieClip = new HelpSection() as MovieClip;

addChild(helpmc);

That last part does assume that the movieclip needs to be at 0,0, and that it's on top. If neither are true you can set the x and y of helpmc before adding it, and you can use addChildAt() to add mc at a particular layer.

9. In the frame where you navigate away from where helpsection should exist you would need to get rid of it, like:

removeChild(helpmc);

helpmc = null;

Those might seem like a lot of steps, but it would take less time to do than it did for me to type them! For every movieclip that you can do that way you will save more build time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

Diving the scenes does seem like an interesting idea. However, my scenes (which are a collective set of custom class files that extend a few others) have shared properties and make calls to singleton objects from a few ANEs. Applying your suggested work around would require some rewrite as well as the creation process suggested...

I am fine with switching later on to something like FlashBuilder or Eclipse based tools. I plan to since I want to start using Starling. For now and a few other projects I do need help with Animate. It's sort of a double question that belongs in both Animate and AIR but I chose AIR since it's involved with both.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

I have placed entire scenes into their own FLA, and imported the published SWC into the shell FLA. I think that singletons will still work, I know that static classes do. I have the same class in the shell as in the individual FLAs, so they publish to SWC ok, and they have access to the static classes when running in the shell.

It is true to say that the Starling team are not really into using Animate, and so all the examples you'll find are biased towards Flash Builder. I have made two Starling based apps, both using Flash Pro. You just have to know to ignore things they tell you can't be done. A big win in using Animate is that you can use regular DisplayList objects on top of the Starling layer, without any loss of performance. That way you don't have to optimize your dialogs to get them to work as textures and sprite sheets, and don't have to use Feathers to be able to create complicated UI.

Also, GPU rendermode already gives you good performance. If you stayed within the limitations that Starling imposes, you should be able to just use regular DisplayList and GPU rendermode to get the same performance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

Thanks for the advice. I'll try compiling them all as SWCs tomorrow. Will I still be able to see a stacktrace from my SWCs at runtime? Can you also point me in the direction or explain how to set up a build server using FlashDevelop or Flash Builder as described in my post?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

LATEST

You can debug test the shell FLA, either in the AIR Debug Launcher, or on a device. You won't be able to see code that is inside the SWCs, but you should see what happened before that, and the state of variables.

I don't know how to solve your original question, so keep this topic as not answered for now. There is a Flash Builder forum, could be worth asking there too. If they have good answers you could add them back here, and mark your own post as being correct. Here's that forum:

Using Flash Builder

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

BTW, if you do mainly develop in Animate, you could ask Animate specific questions in the Animate forum. Asking about AIR related things there should be fine, but asking them here might end up with lots of suggestions about how you should switch to Flash Builder or other Eclipse based tools!

Adobe Animate CC - General

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines