Help compiling the engine!

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Help compiling the engine!

Post 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.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help compiling the engine!

Post 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
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Re: Help compiling the engine!

Post 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?)
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help compiling the engine!

Post 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.
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Re: Help compiling the engine!

Post by Aquilus »

You are awensome, you response are less than one hour after xD!
The problem with System.ImageLIst remain :(
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help compiling the engine!

Post 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.
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Re: Help compiling the engine!

Post 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. :(
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help compiling the engine!

Post 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?
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Re: Help compiling the engine!

Post 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!
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Re: Help compiling the engine!

Post 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?
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help compiling the engine!

Post 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.
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Re: Help compiling the engine!

Post by Aquilus »

Probably is a stupid answer but how can i convert from .exe to .bin? Thanks :)
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help compiling the engine!

Post by VilleK »

Simply rename the file from .exe to .bin in Explorer or in a cmd-window.
Aquilus
Posts: 25
Joined: Thu Jul 14, 2016 7:10 pm

Re: Help compiling the engine!

Post 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
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Help compiling the engine!

Post 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.
Post Reply