|
|
Binding acknex.dll to another DLL instead of an EXE
#336244
08/02/10 16:41
08/02/10 16:41
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Hi JCL,
when I want to write a wrapper for Java (write the game in java and render it in the engine), I would use a Win32 DLL from my Java code to access the engine (the Win32 DLL is the wrapper then). So, I would have to invoke the engine from inside the wrapper DLL.
Is it possible to bind the acknex.dll to another DLL and start the engine in that wrapper DLL??? Is that possible at the moment? If not, would you please consider to add this feature? Thanks!
Thanks, -Christian
-------------------------------------------------------------
The original post was different, so here is the OLD POST:
Hi JCL,
is it possible to compile an EXE that uses a DLL to invoke from there the engine?
I am thinking about the possibility to call from a JVM native C++ code (via JNI or JNA), compiled in a DLL and from this DLL I want to start the engine and retrieve the engine state (global variables and entities, etc.) and push it back to my JVM.
Of course each user has to compile that mediator DLL by him-/herself because of his/her own licensed acknex.dll, of course.
Did you understood what I mean and do you think that this is possible?
Last edited by HeelX; 08/03/10 06:44.
|
|
|
Re: Invoking the engine from a DLL
[Re: ventilator]
#336255
08/02/10 17:02
08/02/10 17:02
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
of course this is possible.
that's what all wrappers for other languages do. Is the way to do it in VS different than when compiling an EXE (like the manual says) or do I have to respect anything special?
|
|
|
Re: Invoking the engine from a DLL
[Re: ventilator]
#336330
08/03/10 06:40
08/03/10 06:40
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
the wrapper dll doesn't have to be recompiled. the acknex.dll just has to be bound to the exe. Hey, stop! If I use a JVM, I simply -don't have- an EXE. I run a .jar file in the JVM! I renamed the thread from "Invoking the engine from a DLL" to "Binding acknex.dll to another DLL instead of an EXE", because - I start a .jar in the JVM
- use a Win32 dll
- and THAT dll is invoking the engine
So, the acknex.dll has to be bound to my wrapper.dll! Now.. @JCL: is that possible at the moment? If not, would you please consider to add this feature? Thanks!
Last edited by HeelX; 08/03/10 06:43.
|
|
|
Re: Invoking the engine from a DLL
[Re: jcl]
#336348
08/03/10 08:53
08/03/10 08:53
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
I simply -don't have- an EXE. of course you have an exe. java.exe. the acknex.dll has to be bound to java.exe. So, the acknex.dll has to be bound to my wrapper.dll! that's not possible at the moment.
|
|
|
Re: Invoking the engine from a DLL
[Re: ventilator]
#336367
08/03/10 13:10
08/03/10 13:10
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
the acknex.dll has to be bound to java.exe You mean the one that is spreaded by Oracle? So, if I deliver my *.jar, the wrapper dll and the acknex.dll, this will work? O.o Ok, I have to test it out, I think..
|
|
|
Re: Invoking the engine from a DLL
[Re: HeelX]
#336368
08/03/10 13:13
08/03/10 13:13
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
yes, the one that comes with your java runtime environment. (but you have to check which exe actually gets used. i think there also are others like javaw.exe.) i am not sure though if the gamestudio license allows distributing your acknex.dll that is bound to the standard java.exe.  since then everyone could use your acknex.dll for his own projects. with my python wrapper it's like that: during development you have to bind the acknex.dll to python.exe. if you distribute a game you have to use py2exe which packs python.exe, the rest of the needed python runtime parts and your scripts into an exe. then you can bind acknex.dll to that exe. this should be allowed by the gamestudio license. probably there are similar tools for java too. jar2exe or something.
|
|
|
Re: Invoking the engine from a DLL
[Re: ventilator]
#336544
08/04/10 22:07
08/04/10 22:07
|
Joined: Jan 2009
Posts: 76
V_Software
Junior Member
|
Junior Member
Joined: Jan 2009
Posts: 76
|
i am not sure though if the gamestudio license allows distributing your acknex.dll that is bound to the standard java.exe.  since then everyone could use your acknex.dll for his own projects. There is the way to let Gamestudio generate an own acknex.dll for Applications written in other languages. When we develop Application with the Acknex SDK we generate an own acknex.dll( I know it from playing around with wrapping Acknex with C# long time ago) now this acknex.dll is allowed to distribute and only with the application we developed. In times of A6 it was allowed to use only the standard acknex.dll during development time, but to distribute it you had to make this commandline thing, which generated an acknex.dll for this project after beeing compiled as an .exe. Now the critical thing is, how the packer's distributed file for the Enduser are built, if they have some unique infos in their Portable Executable Header for every packed program or if they just change in filename and of course filesize. Then it could be a problem with the License, this would propably open the door for people with warez brain cells lol But if the packed file for the enduser differ each other in more than just name, filesize and date then I think it is ok to make it that way. On the other hand I think even if someone would steal your acknex.dll it would be stupid for them as you Heelx are a well known user here, so nobody would think bad of you here, I'm sure. hint: a year ago or something like that I've seen a java to exe compile somewhere, it was an Compiler to create a Native file instead of a JavaVM file. Maybe this would be better when you already plan to use a packer and thus create an .exe file? anyway good luck with your Project Heelx A solution for using java would be interessting for making Webgames, btw *g*
|
|
|
|