Pārlūkot izejas kodu

Revert back to the zip file

Jared 5 gadus atpakaļ
vecāks
revīzija
459781d075
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 2
- 3
JavaIntegration/src/main/java/org/openzen/zencode/java/ScriptingEngine.java Parādīt failu

@@ -43,12 +43,11 @@ public class ScriptingEngine {
43 43
 		space = new ModuleSpace(registry, new ArrayList<>(), StorageType.getStandard());
44 44
 		
45 45
 		try {
46
-			File stdlibsFolder = new File(ScriptingEngine.class.getResource("/StdLibs").getPath());
47
-            FolderPackage stdlibs = new FolderPackage(stdlibsFolder);
46
+            ZippedPackage stdlibs = new ZippedPackage(ScriptingEngine.class.getResourceAsStream("/StdLibs.zip"));
48 47
             SemanticModule stdlibModule = stdlibs.loadModule(space, "stdlib", null, new SemanticModule[0], FunctionParameter.NONE, stdlib);
49 48
 			stdlibModule = Validator.validate(stdlibModule, error -> System.out.println(error.toString()));
50 49
 			space.addModule("stdlib", stdlibModule);
51
-		} catch (CompileException | ParseException ex) {
50
+		} catch (CompileException | ParseException | IOException ex) {
52 51
 			throw new RuntimeException(ex);
53 52
 		}
54 53
 		this.logger = new EmptyLogger();

Binārs
JavaIntegration/src/main/resources/StdLibs.zip Parādīt failu


Notiek ielāde…
Atcelt
Saglabāt