flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject AW: AW: AW: Need help with air packaging
Date Tue, 02 Jun 2015 07:53:47 GMT
Hi Mario,


thanks for that pointer ... I bet it shouldn't be difficult to implement something similar
in FlexMojos. After all the mavenizer converts everything I need as real maven artifacts.
So at least this downloading of everything shouldn't be needed. I'll look into this as soon
as I find some time (Working on far too many things in parallel)


Chris


________________________________
Von: Mario Souza <mario.souza@vizexplorer.com>
Gesendet: Montag, 1. Juni 2015 23:56
An: users@flex.apache.org
Betreff: Re: AW: AW: Need help with air packaging

I've just setup my project (air mobile) last week using the adt-maven-plugin (https://github.com/yelbota/adt-maven-plugin/)
The current plugin repository url  (hosted on dropbox) is not working, then I downloaded the
source, compiled a local version and put that on my own nexus instance (as third party).

The adt-maven-plugin requires an entire AIR SDK as a zip on your repository, upload one for
your nexus (or put on your m2/repository) following the 17.0 version.
After that, just adapt your pom.xml file according the github's page instructions. For generating
APK, use the <target>apk-captive-runtime</target> (to include the AIR runtime
inside your APK app).

This project STILL requires the FlexMojos to generate the SWF (remember that AIR is just a
pack contained of swf and metadata descriptor inside). The adt-maven-plugin basically will
download the AIR SDK zip on a temporary folder under /target and run the adt.jar command line
to generate the apk/ios/air packages following the instructions on pom.xml. After done, will
delete the air sdk temporary folder.

I think - and I'm not sure - but maybe this operation should not be hard for the FlexMojos,
once that FM already knows the AIR SDK dependencies, and the FM could invoke the adt.jar command
line via RuntimeProcess (or, better, inject/load the adt.jar on the Java classpath in runtime
and consume the api internally, would be nice!)


Regards.




Mario Souza
UI Developer

[cid:image003.jpg@01CFAF35.C0D4C210]

Level 3, 54-56 Cambridge Terrace
PO Box 19204, Wellington 6011
New Zealand

M. +64 021 082 71135 | W. www.vizexplorer.com<http://www.vizexplorer.com/>

On 30 May 2015 at 05:41, Frédéric THOMAS <webdoublefx@hotmail.com<mailto:webdoublefx@hotmail.com>>
wrote:
I tried the adt-maven-plugin but it didn't do the trick for me, can't remember why exactly,
some bugs I guess, I ended up, with FM 4.2 to do things like that in my parent pom, then set
the phase of the execution on the child project and it worked prett well:

Child use example:

                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>

                        <executions>
                            <execution>
                                <id>prepare-exe-package</id>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>

Parent definition :

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>

                    <executions>
                        <execution>
                            <id>prepare-exe-package</id>
                            <phase>none</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <useBuildFilters>false</useBuildFilters>
                                <outputDirectory>${project.build.directory}/exe-package</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${project.build.outputDirectory}</directory>
                                        <filtering>false</filtering>
                                        <includes>
                                            <include>SpellingConfig.xml</include>
                                            <include>dictionaries/*.*</include>
                                            <include>favicon_*.*</include>
                                        </includes>
                                    </resource>
                                    <resource>
                                        <directory>${project.build.directory}</directory>
                                        <filtering>false</filtering>
                                        <includes>
                                            <include>${project.build.finalName}-${build.profile.id<http://build.profile.id>}-descriptor.xml</include>
                                            <include>${project.build.finalName}-${build.profile.id<http://build.profile.id>}.${project.packaging}</include>
                                        </includes>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>


                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>

                    <executions>
                        <execution>
                            <id>create-certificate</id>
                            <phase>none</phase>
                            <goals>
                                <goal>exec</goal>
                            </goals>

                            <configuration>
                                <executable>java</executable>
                                <workingDirectory>${project.build.directory}/adt-work</workingDirectory>
                                <arguments>
                                    <argument>-jar</argument>
                                    <argument>${project.build.directory}/lib/adt.jar</argument>
                                    <argument>-certificate</argument>
                                    <argument>-cn</argument>
                                    <argument>${certificate.name<http://certificate.name>}</argument>
                                    <argument>-ou</argument>
                                    <argument>${certificate.org-unit}</argument>
                                    <argument>-o</argument>
                                    <argument>${certificate.org-name}</argument>
                                    <argument>-c</argument>
                                    <argument>${certificate.country}</argument>
                                    <argument>${certificate.key-type}</argument>
                                    <argument>${certificate.file}</argument>
                                    <argument>${certificate.password}</argument>
                                </arguments>
                            </configuration>
                        </execution>

                        <execution>
                            <id>create-package-exe</id>
                            <phase>none</phase>
                            <goals>
                                <goal>exec</goal>
                            </goals>

                            <configuration>
                                <executable>java</executable>
                                <workingDirectory>${project.build.directory}/adt-work</workingDirectory>
                                <arguments>
                                    <argument>-jar</argument>
                                    <argument>${project.build.directory}/lib/adt.jar</argument>
                                    <argument>-package</argument>
                                    <argument>-storetype</argument>
                                    <argument>${certificate.storetype}</argument>
                                    <argument>-keystore</argument>
                                    <argument>${certificate.file}</argument>
                                    <argument>-storepass</argument>
                                    <argument>${certificate.password}</argument>
                                    <argument>-keypass</argument>
                                    <argument>${certificate.password}</argument>
                                    <argument>-target</argument>
                                    <argument>native</argument>
                                    <argument>
                                        ${project.build.directory}/${project.build.finalName}.exe
                                    </argument>
                                    <argument>${project.build.outputDirectory}/application-descriptor.xml</argument>
                                    <argument>-C</argument>
                                    <argument>${project.build.directory}/exe-package/</argument>
                                    <argument>.</argument>
                                </arguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

Frédéric THOMAS

> Date: Fri, 29 May 2015 15:03:47 +0200
> Subject: RE: AW: AW: Need help with air packaging
> From: victor.munteanu@equillon.ro<mailto:victor.munteanu@equillon.ro>
> To: users@flex.apache.org<mailto:users@flex.apache.org>
>
> Well in the end I modified the project source code which I am not happy with as resources
are currently sitting alongside code.
> Speaking of mobile packaging, how do you get an apk with flexmojos?
> Saw there is a project called adt-maven-plugin designed to work with flexmojos but don't
know if it works. Is that it or something else?
> Victor
>
> -------- Original message --------
> From: Christofer Dutz <christofer.dutz@c-ware.de<mailto:christofer.dutz@c-ware.de>>
> Date: 29/05/2015  14:26  (GMT+01:00)
> To: users@flex.apache.org<mailto:users@flex.apache.org>
> Subject: AW: AW: Need help with air packaging
>
> Have to check ... as I'm currently working on mobile packaging I'll do that right away.
>
> Chris
>
> ________________________________________
> Von: Victor Ion Munteanu <victor.munteanu@equillon.ro<mailto:victor.munteanu@equillon.ro>>
> Gesendet: Freitag, 29. Mai 2015 11:05
> An: users@flex.apache.org<mailto:users@flex.apache.org>
> Betreff: RE: AW: Need help with air packaging
>
> Yes. I have an xml file, 2 ttf fonts and 3 swf files containing images, sounds, etc.
They are all in a resources folder.
> I want a resources folder in the resulting air. Can this be done with FlexMojos?
> Victor
>
> -------- Original message --------
> From: Christofer Dutz <christofer.dutz@c-ware.de<mailto:christofer.dutz@c-ware.de>>
> Date: 29/05/2015  09:31  (GMT+01:00)
> To: users@flex.apache.org<mailto:users@flex.apache.org>
> Subject: AW: Need help with air packaging
>
> So you are talking about static resources such as xml files or are you talking about
image, font, audio?
>
> Chris
>
> ________________________________________
> Von: Victor Ion Munteanu <victor.munteanu@equillon.ro<mailto:victor.munteanu@equillon.ro>>
> Gesendet: Donnerstag, 28. Mai 2015 07:49
> An: users@flex.apache.org<mailto:users@flex.apache.org>
> Betreff: Need help with air packaging
>
> Hi everybody,
> I'm trying to package my application into an air package. I've successfully done this
under Linux with FlexMojos 7.1.0-SNAPSHOT, Apache Flex 4.14.1, Adobe Air 14.0, and others.
> My main issue is that I have some resources which need to be bundled with the app as
they are embedded in the code. I've used the compiler directive to include files however they
are put in the root folder of the air package and I would like them in a subfolder. Can anyone
tell me how to do this?
>
>
>
> Kind regards,
>
> Victor



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message