Skip to content

Commit afffa0b

Browse files
committed
added files for air deployment
1 parent f708199 commit afffa0b

4 files changed

Lines changed: 340 additions & 0 deletions

File tree

air/AIRAliases.js

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
/* AIRAliases.js - Revision: 2.5 */
2+
3+
/*
4+
ADOBE SYSTEMS INCORPORATED
5+
Copyright 2007-2009 Adobe Systems Incorporated. All Rights Reserved.
6+
7+
NOTICE: Adobe permits you to modify and distribute this file only in accordance with
8+
the terms of Adobe AIR SDK license agreement. You may have received this file from a
9+
source other than Adobe. Nonetheless, you may modify or
10+
distribute this file only in accordance with such agreement.
11+
*/
12+
13+
14+
var air;
15+
if (window.runtime)
16+
{
17+
if (!air) air = {};
18+
// workers
19+
air.Worker = window.runtime.flash.system.Worker;
20+
air.WorkerDomain = window.runtime.flash.system.WorkerDomain;
21+
air.WorkerState = window.runtime.flash.system.WorkerState;
22+
air.MessageChannelState = window.runtime.flash.system.MessageChannelState;
23+
air.Condition = window.runtime.flash.concurrent.Condition;
24+
air.Mutex = window.runtime.flash.concurrent.Mutex;
25+
26+
// functions
27+
air.trace = window.runtime.trace;
28+
air.navigateToURL = window.runtime.flash.net.navigateToURL;
29+
air.sendToURL = window.runtime.flash.net.sendToURL;
30+
31+
32+
// file
33+
air.File = window.runtime.flash.filesystem.File;
34+
air.FileStream = window.runtime.flash.filesystem.FileStream;
35+
air.FileMode = window.runtime.flash.filesystem.FileMode;
36+
37+
air.StorageVolumeInfo = window.runtime.flash.filesystem.StorageVolumeInfo;
38+
39+
// events
40+
air.ActivityEvent = window.runtime.flash.events.ActivityEvent;
41+
air.AsyncErrorEvent = window.runtime.flash.events.AsyncErrorEvent;
42+
air.BrowserInvokeEvent = window.runtime.flash.events.BrowserInvokeEvent;
43+
air.DataEvent = window.runtime.flash.events.DataEvent;
44+
air.DRMAuthenticateEvent = window.runtime.flash.events.DRMAuthenticateEvent;
45+
air.DRMStatusEvent = window.runtime.flash.events.DRMStatusEvent;
46+
air.ErrorEvent = window.runtime.flash.events.ErrorEvent;
47+
air.Event = window.runtime.flash.events.Event;
48+
air.EventDispatcher = window.runtime.flash.events.EventDispatcher;
49+
air.FileListEvent = window.runtime.flash.events.FileListEvent;
50+
air.HTTPStatusEvent = window.runtime.flash.events.HTTPStatusEvent;
51+
air.IOErrorEvent = window.runtime.flash.events.IOErrorEvent;
52+
air.InvokeEvent = window.runtime.flash.events.InvokeEvent;
53+
air.InvokeEventReason = window.runtime.flash.desktop.InvokeEventReason;
54+
air.NetStatusEvent = window.runtime.flash.events.NetStatusEvent;
55+
air.OutputProgressEvent = window.runtime.flash.events.OutputProgressEvent;
56+
air.ProgressEvent = window.runtime.flash.events.ProgressEvent;
57+
air.SecurityErrorEvent = window.runtime.flash.events.SecurityErrorEvent;
58+
air.StatusEvent = window.runtime.flash.events.StatusEvent;
59+
air.TimerEvent = window.runtime.flash.events.TimerEvent;
60+
air.SampleDataEvent = window.runtime.flash.events.SampleDataEvent;
61+
air.DatagramSocketDataEvent = window.runtime.flash.events.DatagramSocketDataEvent;
62+
air.DNSResolverEvent = window.runtime.flash.events.DNSResolverEvent;
63+
air.ServerSocketConnectEvent = window.runtime.flash.events.ServerSocketConnectEvent;
64+
air.StorageVolumeChangeEvent = window.runtime.flash.events.StorageVolumeChangeEvent;
65+
air.NativeProcessExitEvent = window.runtime.flash.events.NativeProcessExitEvent;
66+
air.UncaughtErrorEvent = window.runtime.flash.events.UncaughtErrorEvent;
67+
air.MouseEvent = window.runtime.flash.events.MouseEvent;
68+
69+
// native window
70+
air.NativeWindow = window.runtime.flash.display.NativeWindow;
71+
air.NativeWindowDisplayState = window.runtime.flash.display.NativeWindowDisplayState;
72+
air.NativeWindowInitOptions = window.runtime.flash.display.NativeWindowInitOptions;
73+
air.NativeWindowSystemChrome = window.runtime.flash.display.NativeWindowSystemChrome;
74+
air.NativeWindowResize = window.runtime.flash.display.NativeWindowResize;
75+
air.NativeWindowType = window.runtime.flash.display.NativeWindowType;
76+
77+
air.NativeWindowBoundsEvent = window.runtime.flash.events.NativeWindowBoundsEvent;
78+
air.NativeWindowDisplayStateEvent = window.runtime.flash.events.NativeWindowDisplayStateEvent;
79+
80+
// geom
81+
air.Point = window.runtime.flash.geom.Point;
82+
air.Rectangle = window.runtime.flash.geom.Rectangle;
83+
air.Matrix = window.runtime.flash.geom.Matrix;
84+
85+
// 3D
86+
air.Matrix3D = window.runtime.flash.geom.Matrix3D;
87+
air.Vector3D = window.runtime.flash.geom.Vector3D;
88+
air.Orientation3D = window.runtime.flash.geom.Orientation3D;
89+
air.Utils3D = window.runtime.flash.geom.Utils3D;
90+
91+
// Shader
92+
air.Shader = window.runtime.flash.display.Shader;
93+
air.ShaderFilter = window.runtime.flash.filters.ShaderFilter;
94+
air.ShaderPrecision = window.runtime.flash.display.ShaderPrecision;
95+
96+
// net
97+
air.FileFilter = window.runtime.flash.net.FileFilter;
98+
99+
air.LocalConnection = window.runtime.flash.net.LocalConnection;
100+
air.NetConnection = window.runtime.flash.net.NetConnection;
101+
102+
air.URLLoader = window.runtime.flash.net.URLLoader;
103+
air.URLLoaderDataFormat = window.runtime.flash.net.URLLoaderDataFormat;
104+
air.URLRequest = window.runtime.flash.net.URLRequest;
105+
air.URLRequestDefaults = window.runtime.flash.net.URLRequestDefaults;
106+
air.URLRequestHeader = window.runtime.flash.net.URLRequestHeader;
107+
air.URLRequestMethod = window.runtime.flash.net.URLRequestMethod;
108+
air.URLStream = window.runtime.flash.net.URLStream;
109+
air.URLVariables = window.runtime.flash.net.URLVariables;
110+
air.Socket = window.runtime.flash.net.Socket;
111+
air.XMLSocket = window.runtime.flash.net.XMLSocket;
112+
113+
air.SecureSocket = window.runtime.flash.net.SecureSocket;
114+
air.CertificateStatus = window.runtime.flash.security.CertificateStatus;
115+
116+
air.Responder = window.runtime.flash.net.Responder;
117+
air.ObjectEncoding = window.runtime.flash.net.ObjectEncoding;
118+
119+
air.NetStream = window.runtime.flash.net.NetStream;
120+
air.NetStreamInfo = window.runtime.flash.net.NetStreamInfo;
121+
air.NetStreamPlayOptions = window.runtime.flash.net.NetStreamPlayOptions;
122+
air.NetStreamPlayTransitions = window.runtime.flash.net.NetStreamPlayTransitions;
123+
air.SharedObject = window.runtime.flash.net.SharedObject;
124+
air.SharedObjectFlushStatus = window.runtime.flash.net.SharedObjectFlushStatus;
125+
126+
air.DatagramSocket = window.runtime.flash.net.DatagramSocket;
127+
air.NetworkInfo = window.runtime.flash.net.NetworkInfo;
128+
air.ServerSocket = window.runtime.flash.net.ServerSocket;
129+
air.IPVersion = window.runtime.flash.net.IPVersion;
130+
131+
air.DNSResolver = window.runtime.flash.net.dns.DNSResolver;
132+
air.ARecord = window.runtime.flash.net.dns.ARecord;
133+
air.AAAARecord = window.runtime.flash.net.dns.AAAARecord;
134+
air.MXRecord = window.runtime.flash.net.dns.MXRecord;
135+
air.PTRRecord = window.runtime.flash.net.dns.PTRRecord;
136+
air.SRVRecord = window.runtime.flash.net.dns.SRVRecord;
137+
138+
// system
139+
air.Capabilities = window.runtime.flash.system.Capabilities;
140+
air.System = window.runtime.flash.system.System;
141+
air.Security = window.runtime.flash.system.Security;
142+
air.Updater = window.runtime.flash.desktop.Updater;
143+
144+
// desktop
145+
air.Clipboard = window.runtime.flash.desktop.Clipboard;
146+
air.ClipboardFormats = window.runtime.flash.desktop.ClipboardFormats;
147+
air.ClipboardTransferMode = window.runtime.flash.desktop.ClipboardTransferMode;
148+
149+
air.NativeDragManager = window.runtime.flash.desktop.NativeDragManager;
150+
air.NativeDragOptions = window.runtime.flash.desktop.NativeDragOptions;
151+
air.NativeDragActions = window.runtime.flash.desktop.NativeDragActions;
152+
153+
air.Icon = window.runtime.flash.desktop.Icon;
154+
air.DockIcon = window.runtime.flash.desktop.DockIcon;
155+
air.InteractiveIcon = window.runtime.flash.desktop.InteractiveIcon;
156+
air.NotificationType = window.runtime.flash.desktop.NotificationType;
157+
air.SystemTrayIcon = window.runtime.flash.desktop.SystemTrayIcon;
158+
159+
air.NativeApplication = window.runtime.flash.desktop.NativeApplication;
160+
161+
air.NativeProcess = window.runtime.flash.desktop.NativeProcess;
162+
air.NativeProcessStartupInfo = window.runtime.flash.desktop.NativeProcessStartupInfo;
163+
164+
// display
165+
air.NativeMenu = window.runtime.flash.display.NativeMenu;
166+
air.NativeMenuItem = window.runtime.flash.display.NativeMenuItem;
167+
air.Screen = window.runtime.flash.display.Screen;
168+
169+
air.Loader = window.runtime.flash.display.Loader;
170+
air.Bitmap = window.runtime.flash.display.Bitmap;
171+
air.BitmapData = window.runtime.flash.display.BitmapData;
172+
173+
// ui
174+
air.Keyboard = window.runtime.flash.ui.Keyboard;
175+
air.KeyLocation = window.runtime.flash.ui.KeyLocation;
176+
air.Mouse = window.runtime.flash.ui.Mouse;
177+
178+
179+
//security
180+
air.ReferencesValidationSetting = window.runtime.flash.security.ReferencesValidationSetting;
181+
air.RevocationCheckSettings = window.runtime.flash.security.RevocationCheckSettings;
182+
air.SignatureStatus = window.runtime.flash.security.SignatureStatus;
183+
air.SignerTrustSettings = window.runtime.flash.security.SignerTrustSettings;
184+
air.XMLSignatureValidator = window.runtime.flash.security.XMLSignatureValidator;
185+
186+
187+
// utils
188+
air.ByteArray = window.runtime.flash.utils.ByteArray;
189+
air.CompressionAlgorithm = window.runtime.flash.utils.CompressionAlgorithm;
190+
air.Endian = window.runtime.flash.utils.Endian;
191+
air.Timer = window.runtime.flash.utils.Timer;
192+
air.IDataInput = window.runtime.flash.utils.IDataInput;
193+
air.IDataOutput = window.runtime.flash.utils.IDataOutput;
194+
195+
air.HTMLLoader = window.runtime.flash.html.HTMLLoader;
196+
air.HTMLPDFCapability = window.runtime.flash.html.HTMLPDFCapability;
197+
198+
air.Vector = window.runtime.Vector;
199+
200+
// media
201+
air.ID3Info = window.runtime.flash.media.ID3Info;
202+
air.Sound = window.runtime.flash.media.Sound;
203+
air.SoundChannel = window.runtime.flash.media.SoundChannel;
204+
air.SoundLoaderContext = window.runtime.flash.media.SoundLoaderContext;
205+
air.SoundMixer = window.runtime.flash.media.SoundMixer;
206+
air.SoundTransform = window.runtime.flash.media.SoundTransform;
207+
air.Microphone = window.runtime.flash.media.Microphone;
208+
air.Video = window.runtime.flash.media.Video;
209+
air.Camera = window.runtime.flash.media.Camera;
210+
air.SoundCodec = window.runtime.flash.media.SoundCodec;
211+
212+
// data
213+
air.EncryptedLocalStore = window.runtime.flash.data.EncryptedLocalStore;
214+
air.SQLCollationType = window.runtime.flash.data.SQLCollationType;
215+
air.SQLColumnNameStyle = window.runtime.flash.data.SQLColumnNameStyle;
216+
air.SQLColumnSchema = window.runtime.flash.data.SQLColumnSchema;
217+
air.SQLConnection = window.runtime.flash.data.SQLConnection;
218+
air.SQLError = window.runtime.flash.errors.SQLError;
219+
air.SQLErrorEvent = window.runtime.flash.events.SQLErrorEvent;
220+
air.SQLErrorOperation = window.runtime.flash.errors.SQLErrorOperation;
221+
air.SQLEvent = window.runtime.flash.events.SQLEvent;
222+
air.SQLIndexSchema = window.runtime.flash.data.SQLIndexSchema;
223+
air.SQLMode = window.runtime.flash.data.SQLMode;
224+
air.SQLResult = window.runtime.flash.data.SQLResult;
225+
air.SQLSchema = window.runtime.flash.data.SQLSchema;
226+
air.SQLSchemaResult = window.runtime.flash.data.SQLSchemaResult;
227+
air.SQLStatement = window.runtime.flash.data.SQLStatement;
228+
air.SQLTableSchema = window.runtime.flash.data.SQLTableSchema;
229+
air.SQLTransactionLockType = window.runtime.flash.data.SQLTransactionLockType;
230+
air.SQLTriggerSchema = window.runtime.flash.data.SQLTriggerSchema;
231+
air.SQLUpdateEvent = window.runtime.flash.events.SQLUpdateEvent;
232+
air.SQLViewSchema = window.runtime.flash.data.SQLViewSchema;
233+
234+
// core framework
235+
air.__defineGetter__("ServiceMonitor", function() { return window.runtime.air.net.ServiceMonitor; });
236+
air.__defineGetter__("SocketMonitor", function() { return window.runtime.air.net.SocketMonitor; });
237+
air.__defineGetter__("URLMonitor", function() { return window.runtime.air.net.URLMonitor; });
238+
air.__defineGetter__("SecureSocketMonitor", function() { return window.runtime.air.net.SecureSocketMonitor; });
239+
air.__defineGetter__("URLFilePromise", function() { return window.runtime.air.desktop.URLFilePromise; });
240+
241+
// update framework
242+
air.__defineGetter__("ApplicationUpdater", function() { return window.runtime.air.update.ApplicationUpdater; });
243+
air.__defineGetter__("ApplicationUpdaterUI", function() { return window.runtime.air.update.ApplicationUpdaterUI; });
244+
air.__defineGetter__("UpdateEvent", function() { return window.runtime.air.update.events.UpdateEvent; });
245+
air.__defineGetter__("StatusUpdateEvent", function() { return window.runtime.air.update.events.StatusUpdateEvent; });
246+
air.__defineGetter__("StatusUpdateErrorEvent", function() { return window.runtime.air.update.events.StatusUpdateErrorEvent; });
247+
air.__defineGetter__("DownloadErrorEvent", function() { return window.runtime.air.update.events.DownloadErrorEvent; });
248+
air.__defineGetter__("StatusFileUpdateEvent", function() { return window.runtime.air.update.events.StatusFileUpdateEvent; });
249+
air.__defineGetter__("StatusFileUpdateErrorEvent", function() { return window.runtime.air.update.events.StatusFileUpdateErrorEvent; });
250+
}

air/SourceDiff-app.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<application xmlns="http://ns.adobe.com/air/application/3.8">
2+
<id>SourceDiff</id>
3+
<versionNumber>0.1</versionNumber>
4+
<filename>SourceDiff</filename>
5+
<initialWindow>
6+
<content>diffCmd.html</content>
7+
<visible>true</visible>
8+
<width>1300</width>
9+
<height>750</height>
10+
<title>SourceDiff</title>
11+
</initialWindow>
12+
</application>

air/diffCmd.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Diff test</title>
5+
<link href="bootstrap.min.css" rel="stylesheet" type="text/css">
6+
<link href="style.css" rel="stylesheet" type="text/css">
7+
<script src="AIRAliases.js" type="text/javascript"></script>
8+
</head>
9+
<body onload="appLoad()">
10+
<div class="wrapper">
11+
<div class="left">
12+
<h3>Original</h3>
13+
</div>
14+
<div class="right">
15+
<h3>Edit</h3>
16+
</div>
17+
</div>
18+
<div class="wrapper">
19+
<div class="left scroll" id="scrollLeft">
20+
<pre id="original_result"></pre>
21+
</div>
22+
<div class="right scroll" id="scrollRight">
23+
<pre id="edited_result"></pre>
24+
</div>
25+
</div>
26+
<script src="LineDiff.js"></script>
27+
<script src="EditSet.js"></script>
28+
<script src="Diff.js"></script>
29+
<script src="DiffFormatter.js"></script>
30+
<script src="LineFormatter.js"></script>
31+
<script>
32+
function appLoad() {
33+
air.NativeApplication.nativeApplication.addEventListener(air.InvokeEvent.INVOKE, onInvoke);
34+
35+
var scrollLeft = document.getElementById('scrollLeft');
36+
var scrollRight = document.getElementById('scrollRight');
37+
38+
scrollLeft.addEventListener('scroll', function() {
39+
scrollRight.scrollLeft = scrollLeft.scrollLeft;
40+
scrollRight.scrollTop = scrollLeft.scrollTop;
41+
});
42+
43+
scrollRight.addEventListener('scroll', function() {
44+
scrollLeft.scrollLeft = scrollRight.scrollLeft;
45+
scrollLeft.scrollTop = scrollRight.scrollTop;
46+
});
47+
}
48+
49+
function onInvoke(event) {
50+
var original = readFile(event.arguments[0]);
51+
var edit = readFile(event.arguments[1]);
52+
53+
doDiff(original, edit);
54+
}
55+
56+
function readFile(filePath) {
57+
var file = air.File.applicationDirectory.resolvePath(filePath);
58+
var fileStream = new air.FileStream();
59+
fileStream.open(file, air.FileMode.READ);
60+
var contents = fileStream.readUTFBytes(fileStream.bytesAvailable);
61+
fileStream.close();
62+
63+
return contents;
64+
}
65+
66+
function doDiff(original, edited) {
67+
var diff = new SourceDiff.Diff(true);
68+
var formatter = new SourceDiff.DiffFormatter(diff);
69+
70+
var results = formatter.formattedDiff(original, edited);
71+
72+
document.getElementById('original_result').innerHTML = results[0];
73+
document.getElementById('edited_result').innerHTML = results[1];
74+
}
75+
</script>
76+
</body>
77+
</html>

airDeploy.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
adt -package -storetype pkcs12 -keystore selfCert.p12 SourceDiff.air air\SourceDiff-app.xml -C air diffCmd.html AIRAliases.js -C lib bootstrap.min.css -C src Diff.js DiffFormatter.js EditSet.js LineDiff.js LineFormatter.js style.css

0 commit comments

Comments
 (0)