LoginSignup
0
0

More than 5 years have passed since last update.

[備忘録]osxでコマンドラインでairでHelloWold

Posted at

1.sdkダウンロードして解凍し、テキトーな位置に置く
http://www.adobe.com/devnet/air/air-sdk-download.html

2.パス通す。
.bash_login

export PATH=$HOME/AIRSDK_Compiler/bin:$PATH

パステキヨー

source ~/.bash_login

3.テキトーな場所でhelloworldなソース書く
HelloWorld.as

package{
  import flash.display.*;
  import flash.text.*;

  public class HelloWorld extends Sprite{
    public function HelloWorld(){
      var tf:TextField = new TextField();
      tf.text = "Hello World!";
      addChild(tf);
    }
  }
}

4.設定ファイルを同じ位置に書く。
HelloWorld-app.xml

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/19.0">
    <id>HelloWorld</id>
    <versionNumber>0.1</versionNumber>
    <version>0.1</version>
    <filename>HelloWorld</filename>
    <initialWindow>
        <content>HelloWorld.swf</content>
        <visible>true</visible>
        <systemChrome>standard</systemChrome>
        <transparent>false</transparent>
    </initialWindow>
</application>

<application xmlns="http://ns.adobe.com/air/application/バージョン">

バージョンは、air-sdk-description.xml(SDKのフォルダ内)を見て、
そのバージョンを指定する。

5.コンパイル

mxmlc ./HelloWorld.as 

6.実行

adl HelloWorld-app.xml

スクリーンショット 2015-12-04 19.48.37.png

とりあえず動く。。。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0