Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
45816d1d
Commit
45816d1d
authored
Jun 26, 2012
by
Andrew F. McKinney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added changes to enable the building of app-inventor in windows
parent
d0dba97b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
2 deletions
+21
-2
appinventor/blockslib/src/openblocks/yacodeblocks/YABlockCompiler.java
...lockslib/src/openblocks/yacodeblocks/YABlockCompiler.java
+3
-0
appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
...rver/src/com/google/appinventor/buildserver/Compiler.java
+13
-1
appinventor/buildserver/src/com/google/appinventor/buildserver/Execution.java
...ver/src/com/google/appinventor/buildserver/Execution.java
+5
-1
appinventor/lib/android/tools/windows/aapt
appinventor/lib/android/tools/windows/aapt
+0
-0
No files found.
appinventor/blockslib/src/openblocks/yacodeblocks/YABlockCompiler.java
View file @
45816d1d
...
...
@@ -422,6 +422,9 @@ public class YABlockCompiler {
*/
public
static
String
packageNameFromPath
(
String
path
)
{
path
=
path
.
replaceFirst
(
".*?/?src/"
,
""
);
if
(
System
.
getProperty
(
"os.name"
).
startsWith
(
"Windows"
)){
path
=
path
.
replace
(
"/"
,
"\\"
).
replaceFirst
(
".*?/?src/"
,
""
);
}
int
extensionIndex
=
path
.
lastIndexOf
(
"."
);
if
(
extensionIndex
!=
-
1
)
{
return
path
.
substring
(
0
,
extensionIndex
).
replaceAll
(
"/"
,
"."
);
...
...
appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
View file @
45816d1d
...
...
@@ -72,6 +72,8 @@ public final class Compiler {
RUNTIME_FILES_DIR
+
"android.jar"
;
private
static
final
String
MAC_AAPT_TOOL
=
"/tools/mac/aapt"
;
private
static
final
String
WINDOWS_AAPT_TOOL
=
"/tools/windows/aapt"
;
private
static
final
String
LINUX_AAPT_TOOL
=
"/tools/linux/aapt"
;
private
static
final
String
KAWA_RUNTIME
=
...
...
@@ -415,6 +417,10 @@ public final class Compiler {
String
sourceFileRelativePath
=
sourceFileName
.
substring
(
srcIndex
+
8
);
String
classFileName
=
(
classesDir
.
getAbsolutePath
()
+
"/"
+
sourceFileRelativePath
)
.
replace
(
YoungAndroidConstants
.
YAIL_EXTENSION
,
".class"
);
if
(
System
.
getProperty
(
"os.name"
).
startsWith
(
"Windows"
)){
classFileName
=
classesDir
.
getAbsolutePath
()
.
replace
(
YoungAndroidConstants
.
YAIL_EXTENSION
,
".class"
);
}
// Check whether user code exists by seeing if a left parenthesis exists at the beginning of
// a line in the file
...
...
@@ -516,6 +522,10 @@ public final class Compiler {
// This works when a JDK is installed with the JRE.
jarsignerFile
=
new
File
(
javaHome
+
File
.
separator
+
".."
+
File
.
separator
+
"bin"
+
File
.
separator
+
"jarsigner"
);
if
(
System
.
getProperty
(
"os.name"
).
startsWith
(
"Windows"
)){
jarsignerFile
=
new
File
(
javaHome
+
File
.
separator
+
".."
+
File
.
separator
+
"bin"
+
File
.
separator
+
"jarsigner.exe"
);
}
if
(!
jarsignerFile
.
exists
())
{
LOG
.
warning
(
"YAIL compiler - could not find jarsigner."
);
err
.
println
(
"YAIL compiler - could not find jarsigner."
);
...
...
@@ -622,6 +632,8 @@ public final class Compiler {
aaptTool
=
MAC_AAPT_TOOL
;
}
else
if
(
osName
.
equals
(
"Linux"
))
{
aaptTool
=
LINUX_AAPT_TOOL
;
}
else
if
(
osName
.
startsWith
(
"Windows"
))
{
aaptTool
=
WINDOWS_AAPT_TOOL
;
}
else
{
LOG
.
warning
(
"YAIL compiler - cannot run AAPT on OS "
+
osName
);
err
.
println
(
"YAIL compiler - cannot run AAPT on OS "
+
osName
);
...
...
appinventor/buildserver/src/com/google/appinventor/buildserver/Execution.java
View file @
45816d1d
...
...
@@ -98,7 +98,11 @@ public final class Execution {
public
static
boolean
execute
(
File
workingDir
,
String
[]
command
,
PrintStream
out
,
PrintStream
err
)
{
LOG
.
log
(
Level
.
INFO
,
"____Executing "
+
joiner
.
join
(
command
));
if
(
System
.
getProperty
(
"os.name"
).
startsWith
(
"Windows"
)){
for
(
int
i
=
0
;
i
<
command
.
length
;
i
++){
command
[
i
]
=
command
[
i
].
replace
(
"\""
,
"\\\""
);
}
}
try
{
Process
process
=
Runtime
.
getRuntime
().
exec
(
command
,
null
,
workingDir
);
new
RedirectStreamHandler
(
new
PrintWriter
(
out
,
true
),
process
.
getInputStream
());
...
...
appinventor/lib/android/tools/windows/aapt
0 → 100755
View file @
45816d1d
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment