Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
3 registered members (TedMar, AndrewAMD, fairtrader), 578 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

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: HeelX] #336249
08/02/10 16:50
08/02/10 16:50
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
of course this is possible.

that's what all wrappers for other languages do.

the wrapper dll doesn't have to be recompiled. the acknex.dll just has to be bound to the exe.

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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: ventilator
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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: ventilator
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: HeelX] #336343
08/03/10 08:32
08/03/10 08:32
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
I see no reason why not. As to my understanding of DLLs, you can invoke any DLL from another DLL.

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 Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
Quote:
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.

Quote:
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
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: ventilator
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 Offline
Senior Expert
ventilator  Offline
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. tongue 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] #336374
08/03/10 14:54
08/03/10 14:54
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hmmm.

There are some free (and also open source) packers, that pack all jar stuff into an exe as a starter app for a JVM (with optional installing a JVM runtime from Oracle, if not installed).

So, during development you can safely bind it to your java.exe (or else) and when you release it, you bind it to the packer EXE. I hope that this one is then unique... it must be ^^

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
V_Software Offline
Junior Member
V_Software  Offline
Junior Member
V

Joined: Jan 2009
Posts: 76
Originally Posted By: ventilator

i am not sure though if the gamestudio license allows distributing your acknex.dll that is bound to the standard java.exe. tongue 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. grin

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*

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1