-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy path2_compile-main.bsh
28 lines (22 loc) · 1.2 KB
/
2_compile-main.bsh
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
// BeanShell compile script for JavaIDEdroid
//
// The global class G of JavaIDEdroid is
// mapped to the bsh variable G
//
stScriptPath = dirname(pathToFile(getSourceFileInfo()).getAbsolutePath())+"/";
stScriptPath = stScriptPath.replace('\\','/');
source (stScriptPath+"0_setname.bsh");
outdir=stScriptPath+"bin/test/"+name;
stJavafile = "src/com/t_arn/"+name+"/MainActivity.java";
System.out.println("***** Compiling "+stJavafile+" ...");
G.bshTask.fnPublishProgress("Compiling...");
args = "-verbose -deprecation -extdirs \"\" -1.5";
args += " -bootclasspath "+G.oSet.stAndroidJarPath+":"+stScriptPath+"libs/ecj.jar:"+stScriptPath+"libs/dx_ta.jar:"+stScriptPath+"libs/bsh.jar:"+stScriptPath+"libs/sdklib_ta.jar:"+stScriptPath+"libs/androidprefs.jar:"+stScriptPath+"libs/zipsigner-lib_all.jar";
args += " -classpath "+stScriptPath+"src";
args +=":"+stScriptPath+"gen";
args += " -d "+outdir;
args += " "+stScriptPath+stJavafile;
G.iScriptResultCode = G.ide.fnCompile(args);
if (G.iScriptResultCode>=2) G.bshTask.fnToast("Compilation failed!",10000);
else if (G.iScriptResultCode==1) G.bshTask.fnToast("Compilation with warnings",10000);
else G.bshTask.fnToast("Compilation succeeded.",10000);