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
a47babba
Commit
a47babba
authored
Jun 28, 2012
by
Katie Laverty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:mit-cml/app-inventor-private into version-number
parents
a0185198
f6ae5106
Changes
4
Hide 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 @
a47babba
...
@@ -422,6 +422,9 @@ public class YABlockCompiler {
...
@@ -422,6 +422,9 @@ public class YABlockCompiler {
*/
*/
public
static
String
packageNameFromPath
(
String
path
)
{
public
static
String
packageNameFromPath
(
String
path
)
{
path
=
path
.
replaceFirst
(
".*?/?src/"
,
""
);
path
=
path
.
replaceFirst
(
".*?/?src/"
,
""
);
if
(
System
.
getProperty
(
"os.name"
).
startsWith
(
"Windows"
)){
path
=
path
.
replace
(
"/"
,
"\\"
).
replaceFirst
(
".*?/?src/"
,
""
);
}
int
extensionIndex
=
path
.
lastIndexOf
(
"."
);
int
extensionIndex
=
path
.
lastIndexOf
(
"."
);
if
(
extensionIndex
!=
-
1
)
{
if
(
extensionIndex
!=
-
1
)
{
return
path
.
substring
(
0
,
extensionIndex
).
replaceAll
(
"/"
,
"."
);
return
path
.
substring
(
0
,
extensionIndex
).
replaceAll
(
"/"
,
"."
);
...
...
appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
View file @
a47babba
...
@@ -75,6 +75,8 @@ public final class Compiler {
...
@@ -75,6 +75,8 @@ public final class Compiler {
RUNTIME_FILES_DIR
+
"android.jar"
;
RUNTIME_FILES_DIR
+
"android.jar"
;
private
static
final
String
MAC_AAPT_TOOL
=
private
static
final
String
MAC_AAPT_TOOL
=
"/tools/mac/aapt"
;
"/tools/mac/aapt"
;
private
static
final
String
WINDOWS_AAPT_TOOL
=
"/tools/windows/aapt"
;
private
static
final
String
LINUX_AAPT_TOOL
=
private
static
final
String
LINUX_AAPT_TOOL
=
"/tools/linux/aapt"
;
"/tools/linux/aapt"
;
private
static
final
String
KAWA_RUNTIME
=
private
static
final
String
KAWA_RUNTIME
=
...
@@ -422,6 +424,10 @@ public final class Compiler {
...
@@ -422,6 +424,10 @@ public final class Compiler {
String
sourceFileRelativePath
=
sourceFileName
.
substring
(
srcIndex
+
8
);
String
sourceFileRelativePath
=
sourceFileName
.
substring
(
srcIndex
+
8
);
String
classFileName
=
(
classesDir
.
getAbsolutePath
()
+
"/"
+
sourceFileRelativePath
)
String
classFileName
=
(
classesDir
.
getAbsolutePath
()
+
"/"
+
sourceFileRelativePath
)
.
replace
(
YoungAndroidConstants
.
YAIL_EXTENSION
,
".class"
);
.
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
// Check whether user code exists by seeing if a left parenthesis exists at the beginning of
// a line in the file
// a line in the file
...
@@ -523,6 +529,10 @@ public final class Compiler {
...
@@ -523,6 +529,10 @@ public final class Compiler {
// This works when a JDK is installed with the JRE.
// This works when a JDK is installed with the JRE.
jarsignerFile
=
new
File
(
javaHome
+
File
.
separator
+
".."
+
File
.
separator
+
"bin"
+
jarsignerFile
=
new
File
(
javaHome
+
File
.
separator
+
".."
+
File
.
separator
+
"bin"
+
File
.
separator
+
"jarsigner"
);
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
())
{
if
(!
jarsignerFile
.
exists
())
{
LOG
.
warning
(
"YAIL compiler - could not find jarsigner."
);
LOG
.
warning
(
"YAIL compiler - could not find jarsigner."
);
err
.
println
(
"YAIL compiler - could not find jarsigner."
);
err
.
println
(
"YAIL compiler - could not find jarsigner."
);
...
@@ -629,7 +639,9 @@ public final class Compiler {
...
@@ -629,7 +639,9 @@ public final class Compiler {
aaptTool
=
MAC_AAPT_TOOL
;
aaptTool
=
MAC_AAPT_TOOL
;
}
else
if
(
osName
.
equals
(
"Linux"
))
{
}
else
if
(
osName
.
equals
(
"Linux"
))
{
aaptTool
=
LINUX_AAPT_TOOL
;
aaptTool
=
LINUX_AAPT_TOOL
;
}
else
{
}
else
if
(
osName
.
startsWith
(
"Windows"
))
{
aaptTool
=
WINDOWS_AAPT_TOOL
;
}
else
{
LOG
.
warning
(
"YAIL compiler - cannot run AAPT on OS "
+
osName
);
LOG
.
warning
(
"YAIL compiler - cannot run AAPT on OS "
+
osName
);
err
.
println
(
"YAIL compiler - cannot run AAPT on OS "
+
osName
);
err
.
println
(
"YAIL compiler - cannot run AAPT on OS "
+
osName
);
userErrors
.
print
(
String
.
format
(
ERROR_IN_STAGE
,
"AAPT"
));
userErrors
.
print
(
String
.
format
(
ERROR_IN_STAGE
,
"AAPT"
));
...
...
appinventor/buildserver/src/com/google/appinventor/buildserver/Execution.java
View file @
a47babba
...
@@ -98,7 +98,11 @@ public final class Execution {
...
@@ -98,7 +98,11 @@ public final class Execution {
public
static
boolean
execute
(
File
workingDir
,
String
[]
command
,
PrintStream
out
,
public
static
boolean
execute
(
File
workingDir
,
String
[]
command
,
PrintStream
out
,
PrintStream
err
)
{
PrintStream
err
)
{
LOG
.
log
(
Level
.
INFO
,
"____Executing "
+
joiner
.
join
(
command
));
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
{
try
{
Process
process
=
Runtime
.
getRuntime
().
exec
(
command
,
null
,
workingDir
);
Process
process
=
Runtime
.
getRuntime
().
exec
(
command
,
null
,
workingDir
);
new
RedirectStreamHandler
(
new
PrintWriter
(
out
,
true
),
process
.
getInputStream
());
new
RedirectStreamHandler
(
new
PrintWriter
(
out
,
true
),
process
.
getInputStream
());
...
...
appinventor/lib/android/tools/windows/aapt
0 → 100755
View file @
a47babba
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