Results 1 to 4 of 4
  1. #1
    Coockson's Avatar
    Join Date
    Nov 2017
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    5
    My Mood
    Tired

    Post [Tutorial] How to correctly compile an AIR client


    How to correctly compile an AIR client


    You will need:

    - IntelliJ IDEA (I use version 2019.2.4, if you have a newer version you may need to install the flash/flex plugin).
    - An Adobe AIR SDK & Compiler (I use AIR 15).
    - An AS3 RotMG Client (This one should be obvious).


    For people who already have a compiled client and want to just change their project structure around can skip to the bottom of the post.*


    Before we get started we have to make sure your project is in order, so open up the Project Structure (CTRL+ALT+SHIFT+S, or the blue folder in the top right) and hit Modules. If you don't have an existing module or your existing module doesn't have an F on the folder (indicating its a flash module) then you must create a new module and remove the old one, you can do that by hitting the + in the top left of the window. You should see an option in the dropdown called Flash Build Configuration under framework automatically, but if this isn't the case then hit New Module.

    Select flash from the module types and setup. for AIR you want your Target Platform to be Desktop as AIR is only used a desktop application for Private Servers. Untick Create sample app and Create HTML wrapper template if it's ticked and set your Target Player to be whatever is available in your SDK. If your SDK does not contain Flex components, go ahead and tick Pure ActionScript aswell. You will be met with an error anyway if you are unsure. Set the module name to your project name or whatever you want and hit Finish. IF Flash Build Configuration is already there for you, then go ahead and just follow the build config steps I just walked you through without the sample app stuff.

    Make sure to set your Main Class to WebMain (you can do this by clicking ... and searching WebMain) as this is the main class of the project for all current pserver sources. The rest of the setup for that is self explanatory (configure the rest of it urself because it really doesnt matter but generally ignore every option under output folder unless you know what you're doing).

    Upon opening your project you may already have a set build configuration, if this is the case then skip to Step 2. If not, next to the green hammer (build icon) there will be a button called "ADD CONFIGURATION". If you click that you will be greeted with a list of configuration options, click the + icon in the top left of the window. Look through the configuration types until you find Flash App.

    Once that is complete you're going to see a build configuration, generally set to [none] and if that is the case click it and select the Module we just created, then hit OK. Make sure in the Project Structure (CTRL+ALT+SHIFT+S, or the blue folder in the top right), in modules you have your SDK set to the AIR SDK you are using, do the same in the Project tab and set the SDK.

    Open up the Project Structure (CTRL+ALT+SHIFT+S, or the blue folder in the top right), select the Modules tab and select your module. Next to Type: Flex Application for web (Flash Player), you will see Change.... Click that and change Web to Desktop and make sure the Output Type is Application, then hit OK. In the Project Structure tabs, you will see AIR Package as a new tab. If you would like to add a custom descriptor to your application, hit Custom Template instead of Generated under Application Descriptor, then hit Create. You will need to configure this correctly, so make sure the descriptor is that the root of your project (its there by default), and make sure your AIR version is the same as your SDK & Compiler version. Generally you will be flagged with an error for this if it's incorrect and it will tell you the version you are using and you can change it at the top of the descriptor (<application xmlns="https://ns.adobe.com/air/application/replace with version number">). If everything is done correctly then you should be able to build the AIR application.

    You will need to go to the Build tab in the main window, you should see Package AIR Application... as a new option. If you want to output an executable file then you will need to change the Desktop Application Package to captive runtime bundle in the package window. After that's setup, hit PACKAGE. After packaging is completed you will see in your output folder your module name as a folder, and inside the executable along with the swf. Repeat this last step for updating your client.







    *People who already have a compiled client:

    Open up the Project Structure (CTRL+ALT+SHIFT+S, or the blue folder in the top right), select the Modules tab and select your module. Next to Type: Flex Application for web (Flash Player), you will see Change.... Click that and change Web to Desktop and make sure the Output Type is Application, then hit OK. In the Project Structure tabs, you will see AIR Package as a new tab. If you would like to add a custom descriptor to your application, hit Custom Template instead of Generated under Application Descriptor, then hit Create. You will need to configure this correctly, so make sure the descriptor is that the root of your project (its there by default), and make sure your AIR version is the same as your SDK & Compiler version. Generally you will be flagged with an error for this if it's incorrect and it will tell you the version you are using and you can change it at the top of the descriptor (<application xmlns="https://ns.adobe.com/air/application/replace with version number">).

    For building the client from now on, if you would like to build the AIR application instead of just the swf you will need to go to the Build tab in the main window, you should see Package AIR Application... as a new option. If you want to output an executable file then you will need to change the Desktop Application Package to captive runtime bundle in the package window. After that's setup, hit PACKAGE.



    For anyone who has any trouble or questions feel free to reply to this post and i'll try and help you out.

    Thanks for reading.

  2. The Following 5 Users Say Thank You to Coockson For This Useful Post:

    cxydsaewq (11-15-2020),invalid_ (08-05-2022),lester100 (11-07-2020),wycuhmi (11-06-2020),Zolmex (11-06-2020)

  3. #2
    imreallyded's Avatar
    Join Date
    Nov 2018
    Gender
    male
    Location
    aple's basement
    Posts
    66
    Reputation
    10
    Thanks
    30
    durga durga durga durga

  4. #3
    ERHRETSHJsrthrth's Avatar
    Join Date
    Dec 2017
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    0
    Nvm, solved.
    Last edited by ERHRETSHJsrthrth; 11-10-2020 at 05:32 PM.

  5. #4
    jone112233's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    under your bed
    Posts
    100
    Reputation
    10
    Thanks
    744
    My Mood
    Dead
    does anyone have any idea where to find the air sdk 15?

Similar Threads

  1. [TUTORIAL]How to Add Skins to the AS3 Client/Server
    By Snuffleupagus in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 65
    Last Post: 04-06-2016, 11:10 PM
  2. [TUTORIAL] How to Add a Stats Tab for the AS3 Client
    By Snuffleupagus in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 28
    Last Post: 02-21-2015, 09:04 AM
  3. [Tutorial] How to change IP of the client with Yogda [Noob Friendly]
    By CrazyJani in forum Realm of the Mad God Tutorials & Source Code
    Replies: 2
    Last Post: 05-20-2013, 12:39 PM
  4. [Tutorial] How to fix Client File Corruption Detected
    By _corn_ in forum CrossFire Tutorials
    Replies: 9
    Last Post: 03-10-2013, 04:46 AM
  5. [Request] Tutorial how to change the swf client to default to low quality
    By gieREyXXdM in forum Realm of the Mad God Help & Requests
    Replies: 1
    Last Post: 10-04-2012, 05:07 AM