Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

23
LINES

< > BotCompany Repo | #1033487 // projectForLocalCompilation

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (10895L) is out of date.

1  
static File projectForLocalCompilation(File destZip, S programID) {
2  
  temp var zipOut = zipOutputStream(destZip);
3  
  Pair<S, LS> p = extractLibsFromTranspilation(getServerTranspiled2(programID));
4  
  text2zip(p.a, zipOut, "main.java");
5  
  new LS libPaths;
6  
  new LS toCompile;
7  
  for (lib : p.b) {
8  
    S libPath = "lib" + lib + ".jar";
9  
    libPaths.add(libPath);
10  
    file2zip(loadLibraryOrSrcLib(lib), zipOut, libPath);
11  
    if (isSrcLib(lib))
12  
      text2zip(zipOut, addAndReturn(toCompile, "loadableUtils/utils.java"), getServerTranspiledWithoutLibs(lib)); // TODO
13  
  }
14  
  libPaths.add("x30.jar");
15  
  file2zip(pathToJavaxJar(), zipOut, "x30.jar");
16  
  text2zip("javac -source 11 -target 11 -cp " + join(":", libPaths) + " main.java " + joinWithSpace(toCompile) + "\n", zipOut, "compile");
17  
  text2zip("java -cp .:" + join(":", libPaths) + " main\n", zipOut, "run");
18  
  ret destZip;
19  
}
20  
21  
static File projectForLocalCompilation(S programID, File destZip) {
22  
  ret projectForLocalCompilation(destZip, programID);
23  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033487
Snippet name: projectForLocalCompilation
Eternal ID of this version: #1033487/10
Text MD5: e5d7304bd2ce9b095d2b9b49b6e7a778
Author: stefan
Category: javax / compiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-29 10:43:44
Source code size: 1017 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 171 / 248
Version history: 9 change(s)
Referenced in: [show references]