Compress flex air to generate a separate exe

Source: Internet
Author: User

Adobe AIR installation rate is too low. Therefore, it is necessary to package your air program. I have never used that Shu, And the advertisement is very fierce, but we can use WinRAR to package air.

1. Prepare the files to be packaged. Find adl.exe In the BIND of your flex sdkand copy it. Then, copy the runtimes folder in the flex SDK. These and the files you want to package are placed in the same directory.

Adl.exe and runtimes are mainly used to create an Adobe AIR runtime environment so that your programs can run on machines without installing Adobe AIR.

2.then, the usage of adl.exe is removed. The basic information is as follows:

ADL-runtime air environment directory program XML accessory file--Main Program Main SWF File

According to my project, I wrote a run. BAT file to call ADL and run my air program, as shown below:

ADL-runtime runtimes \ Air \ win application. XML--Main photocommenter.swf

You can test to see if this file can make your program run. If it works properly, everything is OK.

But you will find a small problem. The entire program is running, and there is also a command line running window! That's awkward, right. It doesn't matter. Write another vbs file (you can name it run. vbs at Will ):

Set wshshell = Createobject ("wscript. Shell") wshshell. Run cmd.exe/C run. bat ", 0, true

Set wshshell = Createobject ("wscript. Shell ")

Wshshell. Run cmd.exe/C run. bat ", 0, true

This code is mainly used to execute the run. BAT file and hide the hateful command line running window. Save...

3. Start packaging. Select all files, right-click the file, and add it to the compressed file (You have to install WinRAR !). On the open compression panel, select "create self-extracting compressed file" in the General Panel ". You will find that the default compressed file name is changed to the EXE Suffix:

It is best to choose storage for compression, so that the packaged program will be quickly decompressed and run.

Switch to the advanced panel and click "auto-extract option ". In the pop-up window, set the program decompression path and the file to run after decompression in the General Panel-this is very important:

Do not close this window. Switch the Panel to "Mode" and check "unpackage to Temporary Folder ". In quiet mode, select "hide all ".

Everything OK ~~ The packaged program can run directly!

4. At this time, you will find that the icon of the output EXE file is the default icon of WinRAR. This is easy to say. You can change the tool next time without a table. In another example, after this exetag is completed, the program runs and you find that the graph of the program is actually the icon of adl.exe-normally, you use it. You can also modify the adl.exe icon.

5. At last, you will find that it is very large. OK. Take a good look at the files in the runtime folder and delete the DLL you don't want. Then package again.

Success

Original link: http://www.laaan.cn /? P = 1557

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.