Page 1 of 1

Help compiling the engine!

Posted: Thu Jul 14, 2016 8:00 pm
by Aquilus
Hello! I'm new, and I recently found out ZGameEditor but I immediately adored! so much so that when I saw it was open source wanted to study the source in order to learn something, so I downloaded Rad Studio XE6 but I have problems during compilation (use the latest version loaded on GitHub). the farimerimento error System.ImageList, I try deleting it and with this i can compile the engine, but there are other problems like I can open some projects (such FpsDemo) others as Zpong have problems as "invalid pointer" and after this error i can't longer close the engine, for do this i need to use the management activities otherwise there is no way to close it.

i'm very sorry for my bad english i hope someone can help me.

Re: Help compiling the engine!

Posted: Fri Jul 15, 2016 8:08 am
by VilleK
Hi and welcome Aquilus,

The latest github sources are built with "Delphi 10 Seattle" and "Delphi 10.1 Berlin" (which are the most recent Delphi releases). So your best chance of getting it working is using one of those Delphi versions. I tend to use mostly latest Delphi releases because I use Delphi in my professional work so I can afford to upgrade (I wish they offered lower price/free versions for open source work).

Let us know if you need more help! :)

Regards,

Ville

Re: Help compiling the engine!

Posted: Fri Jul 15, 2016 12:43 pm
by Aquilus
Thanks for the fast response! Damn, i need to get a 10.1 berlin :( (what older version i can get working with XE6? 1.9.7?)

Re: Help compiling the engine!

Posted: Fri Jul 15, 2016 1:09 pm
by VilleK
This commit is compatible with Delphi XE8, you could try that: https://github.com/VilleKrumlinde/zgame ... 50c834498c
I think before XE8 I was using XE2 for a couple of years, so I've never actually used XE6.

Re: Help compiling the engine!

Posted: Fri Jul 15, 2016 1:58 pm
by Aquilus
You are awensome, you response are less than one hour after xD!
The problem with System.ImageLIst remain :(

Re: Help compiling the engine!

Posted: Fri Jul 15, 2016 3:04 pm
by VilleK
That unit should not be vital. What happens if you remove it from the uses list? Or remove "System." and just keep ImageList.

Re: Help compiling the engine!

Posted: Tue Jul 19, 2016 1:48 pm
by Aquilus
If i remove this from the last version (4.0b) it work with some project like FPSdemo, with other crash (like Zpong) or go stuck and i can't open another project because "invalid pointer".
With the version that you link above after delete System.ImageList much other errors appear. :(

Re: Help compiling the engine!

Posted: Wed Jul 20, 2016 7:57 am
by VilleK
I just remembered something. There was a bug in Delphi string helper routines that could cause problems like what you describe. I reported it to Embarcadero and they fixed this bug later in XE8 service pack.

See if this helps:
1. Open Compiler.pas
2. Search for "CloseComment"

It looks like this:

Code: Select all

function CloseComment(const S: string) : string;
var
  I : integer;
begin
  Result := S;
  I := S.LastIndexOf('/*');
  if (I>-1) and ((I=1) or (S[I]<>'/')) then
    if S.LastIndexOf('*/')<I then
      Result := S + '*/';
end;
Change it to just this:

Code: Select all

function CloseComment(const S: string) : string;
begin
  Result := S;
end;
Then rebuild. Any change?

Re: Help compiling the engine!

Posted: Mon Jul 25, 2016 3:41 pm
by Aquilus
Hi! Sorry for the delay... i'm retrying to build as previous but now i'm an unexpected error... I think i will simple get an Delphi XE8 and re-try (when i will do this i will write it here :) ) Thanks anyway for the help!

Re: Help compiling the engine!

Posted: Thu Jul 28, 2016 11:55 am
by Aquilus
Now Work! With XE8+zGameEditor 3.1b compiling the engine work (initially with some problem but i fix they, nothing of difficult xD). Thanks a lot for all!
PS How i can compile the .bin for make the exe from the engine?

Re: Help compiling the engine!

Posted: Thu Jul 28, 2016 3:27 pm
by VilleK
Aquilus wrote:PS How i can compile the .bin for make the exe from the engine?
Nice you got it working. The .bin is basically Zzdc.exe renamed to player.bin. So just try rebuilding the zzdc project.
For a minimal size player.bin you need to use makeplayer.bat file which builds the engine using Delphi Xe2 and custom system units.

Re: Help compiling the engine!

Posted: Thu Jul 28, 2016 5:48 pm
by Aquilus
Probably is a stupid answer but how can i convert from .exe to .bin? Thanks :)

Re: Help compiling the engine!

Posted: Thu Jul 28, 2016 7:08 pm
by VilleK
Simply rename the file from .exe to .bin in Explorer or in a cmd-window.

Re: Help compiling the engine!

Posted: Fri Jul 29, 2016 12:37 pm
by Aquilus
I can't change the type of the file in Explorer i will try using cmd, Thanks :) .
PS and for make the Carbon.vsf the principal stiyle? I want to remote the Windows style xD.
(I know i'm asking too much, don't hate me xD)

Sorry for the English

Re: Help compiling the engine!

Posted: Mon Aug 01, 2016 8:03 am
by VilleK
I don't think you can remove the Windows style (because it is the default), but if you choose another style then that settings will be saved in the ZDesigner.exe ini-file so it will be default next time you start it.