sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37002
[Bug 1411165] Re: [request] Launch4J support: sikulixapi.jar should work, when wrapped into an exe
@Raimund
Building an .exe with launch4j is possible. I use "com.akathist.maven.plugins.launch4j" for that purpose (Hope I understood that correct).
I tried your suggestion the following way:
Done on a fresh Windows installation:
- Downloaded SikuliX from https://launchpad.net/sikuli/sikulix/1.1.0
- Ran sikulixsetup-1.1.0.jar
- Chose option 2
- Copied sikulixapi.jar to my development machine
- Reset the Windows VM to the initial Snapshot
Done in my Windows development machine:
- Imported the generated sikulxapi.jar to the local maven repository with
mvn install:install-file -Dfile=sikulixapi.jar -DgroupId=com.sikulix -DartifactId=sikulixapi -Dversion=1.1.0 -Dpackaging=jar -DgeneratePom=true
- Build the myprogram .exe
Done on a fresh windows installation:
- Run the build myprogram.exe
So using the specially built sikulixapi.jar in a launch4j build does not
seem to work either.
Result:
- A folder %APPDATA%\Roaming\Sikulix was created with empty subfolders: Extension, SikulixDownloads, SikulixLibs_201510051707, SikulixStore
- myprogram.exe shutdown immediatly
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1411165
Title:
[request] Launch4J support: sikulixapi.jar should work, when wrapped
into an exe
Status in Sikuli:
Fix Committed
Bug description:
based on the related question.
from comment #1:
the current implementations of SikuliX will not work, if you pack everything into the exe,
only the version launch-only work out of the box
<launch4jConfig>
<dontWrapJar>true</dontWrapJar>
... but I guess, this is not what you want ;-)
If you wait a few days: there will be sikulixapi.jar, that can be
wrapped in the exe.
The problem with Launch4J:
If anything goes wrong inside, as in this case, the exe simply dies without any comment.
The problem with SikuliX:
SikuliX exports the native libraries at runtime to the libs folder.
this currently is based on the existence of a real jar, which is not available in this case of wrapped exe.
The solution:
I have already added a feature, to just access the resources from class path.
This is not yet available in sikulixapi.jar, but will be in a few days.
The libs will then be exported to temp.
In any case (as now): existing libs are checked and an export is only done, if needed based on timestamp and the libs folder is added to system path at runtime dynamically.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1411165/+subscriptions
References