2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Adobe Air HTMLによる開発の一連の流れ

Last updated at Posted at 2016-11-25

Adobe Airでデスクトップアプリを作る一連の流れをまとめた。

※この記事は、以下のサイトの内容をまとめたものになります。

【Adobe Air】HTMLでデスクトップアプリを作る一連の流れをまとめた

作るもの

手順

・1.HTMLを書く

HTMLを書いてください。ここはあなたに任せますが、これは練習なので簡単なものがいいと思われます。

・2.XMLを書く

ウィンドウのサイズなどの設定は、xmlファイルに記述します。
<アプリ名>.xml
というファイルを作成して、以下のコードをコピペしてください。

<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/1.5" minimumPatchLevel="0">
<id>index.html</id>
<version>1.0</version>
<filename>(アプリ名)</filename>
<initialWindow>
<content>index.html</content>
<visible>true</visible>
<width>380</width>
<height>260</height>
</initialWindow>
</application>

widthタグの中とheightタグの中は、ウィンドウのサイズです。状況に応じて編集してください。
尚、http://ns.adobe.com/air/application/1.5 はAdobe Air SDKのバージョンによって変わります。

・3.デバッグ

HTMLとXMLを作成したら、デバッグを行いましょう。
コマンド プロンプトを開いて、HTMLとXMLがあるファイルに移動します。
そこでこれを入力します。

adl (アプリ名).xml

ウィンドウが開いて、HTMLが表示されたら成功です。

・4.インストーラの作成

・インストーラを作成するための(証明されていない)証明書を作ります。
コマンド プロンプトを開いて、HTMLとXMLがあるファイルに移動します。
そこでこれを入力します。

adt -certificate -cn test 1024-RSA test.pfx pass

test.pfxというファイルができたら成功です。

・インストーラ(.airファイル)の作成

コマンドプロンプトにこれを入力

adt -package -storetype pkcs12 -keystore test.pfx -storepass pass <インストーラ名>.air <アプリ名>.xml index.html <その他同梱ファイル(js,css,画像など)> <その他同梱ファイル(js,css,画像など)>

インストーラ名のところを、出力ファイルの名前を自由に決めて書き換える。
アプリ名のところは、さっき作ったXMLファイルの名前。
その他同梱ファイルは、例えばjqueryを使っているならjquery-~~~.jsとか。画像ファイルがあるなら~~~.pngとか。何個でもOK。

できたairファイルをダブルクリックで実行して、インストールします。

2
2
1

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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?