-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
197 lines (164 loc) · 10.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<!-- saved from url=(0049)http://cs.wellesley.edu/~fturbak/ai1convert_v1.2/ -->
<html style=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>AI1 to AI2 Converter</title>
<link rel="stylesheet" href="ai1Convert.css">
<!-- <link rel="stylesheet" href="../default.css">
<link rel="stylesheet" href="demo.css">
<link href='http://fonts.googleapis.com/css?family=Maven+Pro|Muli|Droid+Sans+Mono|Istok+Web' rel='stylesheet' type='text/css'>
-->
<body>
<div id="container">
<h1>AI1 to AI2 Converter (Version <span id="versionNumber">1.1</span>)</h1>
<h2>Convert a Project from App Inventor Classic to AI2</h2>
<p><button id="instructionsButton" class="converterButton">Show Instructions</button>
</p><div id="instructions" style="display: none;">
<p> This tool converts App Inventor Classic (AI1) project source files (<code>.zip</code> files)
to App Inventor 2 (AI2) project source files (<code>.ai1</code> files).
<strong>Warning: This browser-based tool currently works only in Chrome and Firefox.
In particular, it does not work in Safari or Internet Explorer.</strong>
</p><p> Due to circumstances beyond the control of the App Inventor development team,
the <a href="http://beta.appinventor.mit.edu/">App Inventor Classic (AI1) development environment</a>
will shut down on <strong>July 15, 2015</strong>.
<a href="http://explore.appinventor.mit.edu/classic">See the AI1 shutdown details here.</a>
It will not be possible to access your AI1 projects
after that time. If you wish to save these projects, now is the time to
(1) download any AI1 projects you care about and (2) convert them to AI2 projects using this tool.
</p><h3>Instructions</h3>
<ol>
<li> In the <a href="http://beta.appinventor.mit.edu/">App Inventor Classic (AI1) development environment</a>,
load the project you wish to convert, and confirm that you can view it in both the Designer
window and Blocks Editor. Ideally, you should also confirm that the program works as expected
by testing it on an Android device or an emulator.
</li><li> Save the AI1 project you wish to convert as a <code>.zip</code> file as follows:
<ol>
<li> Use <strong>My Projects</strong> to list your projects;
</li><li> Click the checkbox of the project you wish to save
</li><li> Select <strong>More Options>Download Source</strong>.
This will download an AI1 project source <code>.zip</code> file to your computer.
</li></ol>
<strong>Important:</strong> do not attempt to open or uncompress the <code>.zip</code> file in any way.
Some computers and browsers (especially Safari) may be configured to automatically open
and uncompress the <code>.zip</code> file. In this case, you will need to configure preferences to turn
off this feature.
</li><li> Use the <strong>Choose File</strong> button below to navigate to the <code>.zip</code> file
you just downloaded. Selecting the file will automatically convert your AI1 <code>.zip</code> project file
to an AI2 <code>.aia</code> project file and and download the <code>.aia</code> file
to your computer. If errors are reported in the red-outlined error box,
see the Troubleshooting section below.
</li><li> In the <a href="http://ai2.appinventor.mit.edu/">AI2 development environment</a>,
use <strong>Projects>Import project (.aia) from my computer</strong>
to upload the <code>.aia</code> project file. You can now run and edit your project in AI2!
<p>If the <code>.aia</code> project cannot be loaded into AI2, or if the uploaded project does
not work as you expect, see the Troubleshooting section below.
</p></li></ol>
</div> <!-- end instructions -->
<p id="formInput"><span class="form-label">Choose an AI source file (.zip) to convert:</span>
<input type="file" accept="application/zip" id="file-input">
<button id="cancelButton" class="converterButton" disabled="">Cancel Conversion</button>
<br>
<span id="conversionFeedbackInitial"></span>
<span id="conversionFeedbackProgress"></span>
<span id="conversionFeedbackFinal"></span>
<!--
<p><span class="form-label">download the zip file</span>
<a id="download-button" href="#">Download</a>
-->
</p><div id="errorBox">
<p id="errorTitle">Any errors or warnings from the conversion process will be displayed in this box.</p>
<div id="errors"></div> <!-- place for error items -->
</div>
<p><button id="troubleshootingButton" class="converterButton">Show Troubleshooting Hints</button>
</p><div id="troubleshooting" style="display: none;">
<!--<p class="note">Suggestions welcome on improving this wording.</p> -->
<ul>
<li> If there are red error boxes above, something went wrong in the conversion process,
and you should report this error via email to <a href="mailto:[email protected]">[email protected]</a>.
Please attach your <code>.zip</code> file to your email.
</li><li> If there are orange error boxes above, there is a problem with your project that
you need to fix before it can be converted.
</li><li> If there are yellow warning boxes above, your converted project <strong>might</strong> be fine, but
you should carefully test it.
</li><li> The converter assumes your project is from the most recent version of AI1.
If you have an old project, the converter <em>might</em> be able to convert it,
but if you experience any problems with conversion, you should upgrade your
AI1 project to the most recent version of AI1 before converting it to AI2.
<p>You can upgrade your AI1 project to the most recent version of AI1
simply by loading your project into the
<a href="http://beta.appinventor.mit.edu/">current AI1 development environment</a>
and viewing it both in the Designer window
and Blocks Editor. This process will automatically perform upgrades that
might modify your components and blocks. Then it is safe to download your
A11 project as a <code>.zip</code> file.
</p><p><strong>Important:</strong> Certain upgrades may require you to change
your project. If you see blocks outlined in red in the Blocks Editor,
you need to replace those blocks before you try to convert your project to A2.
</p></li><li> If your project loads without error, but does not behave properly.
there might be an error in your original project. Sometimes blocks are
accidentally disconnected or deleted, which is a common source of these errors.
In general, you should confirm that your project works in AI1 before converting it.
If your original project doesn't work in AI1, the converted one won't work in AI2!
</li><li> There are some known issues with the current converter that are listed below.
You should review these if your converted program doesn't look or behave like
you expect.
<!-- <li> <strong>Whom should they contact if they're still having trouble?
Should they post on a forum? Should they email lyn directly?</strong> -->
</li></ul>
</div>
<p><button id="issuesButton" class="converterButton">Show Known Issues with this Version of the Converter</button>
</p><div id="issues" style="display: none;">
<h2>Known Issues</h2>
<ul>
<li> This converter only works in Chrome and Firefox. It does not work in other browsers,
such as Safari and Internet Explorer.
</li></ul>
</div>
<p><button id="versionsButton" class="converterButton">Show Version Notes</button>
</p><div id="versions" style="display: none;">
<h2>Version Notes</h2>
<h3>Version 1.2</h3>
<ul>
<li> The converter now handles strings with unicode characters.
</li><li> The converter will now automatically rename the <code>ImagePicker.ImagePath</code> property
in old versions of <code>ImagePicker</code> to <code>ImagePicker.Selection</code>.
</li></ul>
<h3>Version 1.1</h3>
<ul>
<li> Bugs in the conversion of the math blocks <code>atan2</code> and <code>random set seed</code> were fixed.
</li></ul>
<h3>Version 1.0</h3>
<ul>
<li> The converter correctly converts the <code>Scrollable</code> property on screen components.
</li><li> The converter automatically converts
<code>Notifier.ShowChooseDialog</code> and
<code>Notifier.ShowTextDialog</code> blocks that do not have a final <code>cancelable</code> argument.
The converter will add an extra <code>false</code> argument in this case.
</li><li> The converter indicates progress in terms of the number of files converted.
</li><li> The converter has a <strong>Cancel Conversion</strong> button to cancel the conversion process.
</li><li> The converter no longer generates an <code>.aia</code> file when it encounters a significant error.
</li><li> There is a <code>None</code> color block in AI1, but not in AI2.
However, the converter is able to translate it to a <code>make color</code>
block that takes a 4-element list <code>[255, 255, 255, 0]</code>
(the last list component is the alpha, or opacity, component; opacity 0 means transparent).
</li></ul>
</div>
<p><button id="logButton" class="converterButton">Show Conversion Log</button>
</p><div id="log" style="display: none;">
<p id="logTitle">Log entries from the conversion process will be displayed below.</p>
<div id="logItems">
</div><!-- place for log items -->
</div>
</div> <!-- end id="container" -->
<!-- load gildas lormeau zip library files -->
<script src="zip.js"></script>
<script src="inflate.js"></script>
<script src="deflate.js"></script>
<!-- load google closure library -->
<script src="closure-library/closure/goog/base.js"></script>
<!-- load my AI1 to AI2 converter -->
<script src="AI1_v134a_component_specs.js"></script>
<script src="ai1ConvertBlocks.js"></script>
<script src="ai1ConvertComponents.js"></script>
<script src="ai1ConvertZip.js"></script>
</body></html>