PDA

View Full Version : การ set Edit Plus ให้ compile และสร้าง package สำหรับ Adobe AIR ได้



maxma
18-02-2008, 12:02 AM
เป็นการ set ให้ Edit Plus สามารถ คอมไพล์ และสร้างแพกเกจ(ไว้สำหรับติดตั้ง) สำหรับ Adobe AIR ได้

(ซึ่งผมก็พยายามอยู่หลายวันทีเดียวกว่าจะทำเร็จ :lol: )

สิ่งที่ต้องเตรียม
- Edit Plus (เลือกใช้ตามถนัดเลยครับ)
- certificate file (สามารถดาวโหลดได้จาก Download : certificate.pfx for Adobe AIR Beta 2 - Cretate By CITEC (http://citecclub.org/forum/index.php?showtopic=19530) หรือสามารถสร้างใหม่เองได้จาก การสร้าง free digital certificate (Microsoft PFX format) (http://citecclub.org/forum/index.php?showtopic=19529&st=0&gopid=45346))
- Adobe AIR Beta 2 (http://download.macromedia.com/pub/labs/air/air_b2_win_100107.exe) และ Adobe AIR Beta 3 (http://download.macromedia.com/pub/labs/air/air_b3_win_121207.exe)
- Adobe AIR Beta 2 sdk (http://download.macromedia.com/pub/labs/air/air_b3_win_121207.exe)

[hide=5]
ติดตั้ง Adobe AIR sdk
1. ติดตั้ง Adobe AIR Beta 2 ก่อนเลยครับ เสร็จแล้วติดตั้ง Adobe AIR Beta 3 ตาามไปอีกที
(ห้ามติดตั้ง Beta 3 ก่อน 2 นะครับ และหากติดตั้ง Beta 3 อยู่ก่อนแล้วให้ ถอนออกก่อนครับ)

2. แตกไฟล์ air_b2_win_sdk_100107.zip ออกไปไว้ใน C: เช่น C:\air_b2_win_sdk_100107

3. set path โดยไปที่ Control Panel > System ไปที่ Tab Advance > Environment Variables จากนั้น หา variable ที่เป็นชื่อ path แล้วกด Edit แล้วเติมคำสั่งข้างล่างนี้ต่อท้ายไป





;C:\air_b2_win_sdk_100107\bin[/b]


กำหนดตำแหน่งแฟ้มงาน และcertificate file
ก่อนอื่นต้องกำหนด path ที่เราจะ save งานไว้ก่อน ซึ่งผมจะสร้าง folder ไว้ดังนี้
C:\AIR_Beta2 และภายในจะสร้าง Folder ชื่อ certificate (ใช้เก็บ certificate.pfx เพื่อไว้แชร์ในการ package ทุกๆโปรเจ็ค)
และ Folder ชื่อ test editplus (อันนี้เราจะไว้เก็บงานที่จะทดสอบ EditPlus)
จากนั้นให้ก๊อบไฟล์ certificate.pfx ไปไว้ใน C:\AIR_Beta2\certificate


การตั้งค่าให้ EditPlus คอมไฟล์ และ แพกเกจ AIR ได้
เปิด EditPlus แล้วตามรูปเลยนะครับ
1. ไปที่เมนู Tools > Configure User Tools...

http://pic.citecclub.org/out.php/i2201_1.JPG

2. กดที่ Group Name... แล้วเปลี่ยนชื่อใหม่ (ในที่นี้จะเปลี่ยนเป็น Adobe AIR Tools)

http://pic.citecclub.org/out.php/i2202_2.JPG

3. กด Add Tool > Program แล้วใส่ข้อมูลดังนี้

Menu text: compile
Command: adl.exe
Argument: $(FileName)

ซึ่งตัวนี้แหละเราจะใช้ คอมไพล์ เพื่อทดลองโปรแกรม

http://pic.citecclub.org/out.php/i2204_3.JPG

3. กด Add Tool > Program อีกอัน แล้วใส่ข้อมูลดังนี้

Menu text: package
Command: adt.bat
Argument: -package -certificate ../certificate/certificate.pfx -password citeccertificate install.air $(FileName) *.*

ตัวนี้จะเป็นการสร้าง package ชื่อ install.air เพื่อนำไปติดตั้งต่อเครื่องอื่นครับ

http://pic.citecclub.org/out.php/i2205_4.JPG

จากนั้นกด OK ได้เลยครับ


ทดสอบกับโปรแกรมแรก
1. new ไฟล์ขึ้นมาใหม่ครับ โดยเซฟไว้เป็นไฟล์ชื่อ index.html ลงใน C:\AIR_Beta2\test editplus
( ก็จะได้ C:\AIR_Beta2\test editplus\index.html )

โดยมีเนื้อหาดังนี้



<html>
<head>
<title>Adobe AIR</title>
</head>
<body bgcolor="272727">




<div align=&#39;center&#39;>
<font color=&#39;white&#39; size=&#39;3&#39;>Test Adobe AIR with Edit Plus !</font>
</div>
</body>
</html>




2. new ไฟล์ขึ้นมาใหม่อีกไฟล์ ชื่อ application.xml เซฟไว์ C:\AIR_Beta2\test editplus เช่นเดียวกันครับ

[code]
<?xml version="1.0" encoding="UTF-8"?>
<application appId="local.air" xmlns="http://ns.adobe.com/air/application/1.0.M5" version="0.1">

ksolomon
29-02-2008, 04:20 AM
พบ error ครับ "application descriptor not found" ครับผม ลองแก้แล้วแก้มะได้ เป็นไงช่วยบอกด้วยครับ ขอบคุณครับ


ปล. ขอศึกษาหน่อยนะ จาได้เข้าทีมอีกคน อิอิ อยากลองของใหม่ๆเหมือนกัน

maxma
05-03-2008, 12:47 PM
พบ error ครับ "application descriptor not found" ครับผม ลองแก้แล้วแก้มะได้ เป็นไงช่วยบอกด้วยครับ ขอบคุณครับ
ปล. ขอศึกษาหน่อยนะ จาได้เข้าทีมอีกคน อิอิ อยากลองของใหม่ๆเหมือนกัน
[/b]


ขออภัยครับ พอดีเพิ่งจะมาเห็น - -*

หากท่านทำตามวิธีการข้างต้นนะครับ
ปัญหานี้เกิดจากการที่เราตั้งค่า โปรแกรม adl ใน editplus เสร็จแล้ว
พอเรียกใช้งานคำสั่ง adl ปุ๊บ มันจะฟ้องแบบนี้ วิธีการแก้คือ หลังจากตั้งค่าแล้ว ปิด editplus ก่อนแล้ว เปิดใหม่ครับ


แต่ตอนนี้ในความรู้สึกนะ beta2 , 3 นี้มันยังผีเข้าผีออกอยู่มั๊กๆ - -*
และ adobe ก้อได้ คลอด AIR 1.0 ออกมาเรียบร้อยแล้ว
ซึ่งผมก็หาวิธีใช้มันอยู่ (มันเล่นเปลี่ยนทุก version เลย) และผมคิดว่า version นี้คงจะนิ่งแล้ว

เร็วๆนี้ เด๋วจะมาโพสวิธีการ set Edit Plus กับ Adobe AIR 1.0 ครับ

ksolomon
14-03-2008, 07:34 AM
No screen name said on Feb 29, 2008 at 2:43 PM :
When I run the adl HelloWorld-app.xml, I got an error "application descriptor not found"[/b]


Joe ... Ward said on Feb 29, 2008 at 3:04 PM :
This typically means that there is a type in the application descriptor file. If the XML file is not well-formed (i.e. has a matching closing tag for each opening tag, etc.), then ADL will not recognize it as an application descriptor.[/b]Then just see updated in Click me!! (http://labs.adobe.com/wiki/index.php/AIR:Release_Notes)

and look for something likes this


Updating your application to Adobe AIR Beta 3
Changes to the application descriptor (application.xml) file
The following changes apply to this release:

Change xmlns to “http://ns.adobe.com/air/application/1.0.M6”
Added <allowBrowserInvocation> as an element of <application>
Added <icon> as an element of <fileType>
Renamed <title> –> <name>
Renamed <name> –> <filename>
Renamed <handleUpdates> –> <customUpdateUI> and type is xs:boolean
appId was a property within the <application> tag, now is an element tag called <id>
version was a property within the <application> tag, now is an element tag <version> [/b] An example would be:

[code]
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/1.0.M6">

Hutch
18-08-2008, 01:43 PM
น่าสนใจมากครับ คือปกติผมต้องมาทำการ Pack เอง แต่ตอนนี้ผมยังไม่เห็นข้อความ ผมต้อง Post ให้ได้ 5 ครั้งถึงจะสามารถเห็นได้ เยอะแฮะ ;)