scripts
scripts copied to clipboard
Add IMG Tool
https://www.gtagarage.com/mods/show.php?id=63
Do you want to give it a try? We can support you if needed. I guess you can more or less copy the Notepad++ script though.
@plata Is the script correct?
include(["engines", "wine", "quick_script", "online_installer_script"]);
var installerImplementation = {
run: function () {
new OnlineInstallerScript()
.name("IMG Tool")
.editor("gtagarage.com")
.applicationHomepage("https://www.gtagarage.com/mods/show.php?id=63)
.author("Leandro Stanger")
.url("https://www.gtagarage.com/mods/download.php?f=90")
.checksum("9d4d1727c976a06c670dd7a00771de3f375b22ea")
.category("Development")
.executable("IMGTool.exe")
.go();
}
};
/* exported Installer */
var Installer = Java.extend(org.phoenicis.scripts.Installer, installerImplementation);
Category "Development" or rather "Games"? Otherwise it looks good at a first glance. You can follow the steps in the README to create a working app (with all required files) and test it.
Error installing IMG Tool https://github.com/LeandroStanger/Phoenicis-scripts/tree/master/Applications/Development/IMG%20Tool
javax.script.ScriptException: Executable IMGTool.exe not found! in <eval> at line number 121 at column number 8
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:477)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:461)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:162)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at [email protected]/org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
at [email protected]/org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
at [email protected]/org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: <eval>:121:8 Executable IMGTool.exe not found!
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAException.create(ECMAException.java:113)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1394$2842$\^eval\_$cu1$restOf.create([engines, wine, shortcuts, wine]:121)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1391$3037A$\^eval\_$cu1$restOf._createShortcut([engines, wine, quick_script, quick_script]:132)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1378$553$\^eval\_$cu1$restOf.go([engines, wine, quick_script, installer_script]:87)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1238$208$\^eval\_.run(<eval>:9)
at jdk.nashorn.javaadapters.org_phoenicis_scripts_Installer.run(Unknown Source)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$1237$\^eval\_$cu1$restOf.:program(<eval>:25)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
... 10 more
Are you sure that IMGTool.exe is really the name of the executable once it is installed?
Yes
I see. Online Installer Script does not work with a zip archive for the moment. You may want to try ZipScript. You have some examples in the directory (Druid Soccer for example)
Error installing IMG Tool https://github.com/LeandroStanger/Phoenicis-scripts/tree/master/Applications/Development/IMG%20Tool
javax.script.ScriptException: TypeError: Cannot read property "toString" from undefined in [utils, functions, net, download] at line number 149
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:477)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:461)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:162)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at [email protected]/org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
at [email protected]/org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
at [email protected]/org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: [utils, functions, net, download]:149 TypeError: Cannot read property "toString" from undefined
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.Undefined.get(Undefined.java:161)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$343$2701$\^eval\_$cu1$restOf.get([utils, functions, net, download]:149)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$326$703$\^eval\_$cu1$restOf.go([engines, wine, quick_script, zip_script]:49)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$203$195$\^eval\_.run(<eval>:9)
at jdk.nashorn.javaadapters.org_phoenicis_scripts_Installer.run(Unknown Source)
at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$202$\^eval\_$cu1$restOf.:program(<eval>:25)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
at jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
... 10 more
Which Phoenicis version do you use for testing? This error looks like you try to run a script from the scripts master branch with an older Phoenicis software (maybe the alpha-2 flatpak?). Try again with the current master of the software (there have been changes for the Downloader).
Which Phoenicis version do you use for testing?
flatpak install --user http://repo-test.flathub.org:8080/build-repo/1128/org.phoenicis.playonlinux.flatpakref
That won't work. The API is still not completely stable so the scripts and the Phoenicis version must match. To develop new scripts, you should always use the latest Phoenicis software as well (at least until the API stabilized). If you want to use flatpak, you can still do so: https://phoenicisorg.github.io/phoenicis/Developers/packages/.
@LeandroStanger could you progress/do you need support?