FreePascal
Moderator: Moderators
I confirm compiling instructions work for win32 with one note:
"4 - In the Syntax tab ..." - observe (X) Allow inline
as this is not default.
-------------------------------------------
Now for the bad news. Only action is swapping in the renamed Player.bin (it's enormous) - fails to compile a project with the following error. It gives an enormous .exe (35 kb, usually) , and is just a command window.
Using rev. 260 and absolutely latest ZGE beta.
----------------------------------------
By the way, I also got it to compile through Lazarus with pretty much the same result. I could post about it when we get this sorted out.
"4 - In the Syntax tab ..." - observe (X) Allow inline
as this is not default.
-------------------------------------------
Now for the bad news. Only action is swapping in the renamed Player.bin (it's enormous) - fails to compile a project with the following error. It gives an enormous .exe (35 kb, usually) , and is just a command window.
Using rev. 260 and absolutely latest ZGE beta.
----------------------------------------
By the way, I also got it to compile through Lazarus with pretty much the same result. I could post about it when we get this sorted out.
- Attachments
-
- 1.gif (27.34 KiB) Viewed 30673 times
"great expectations"
The "resource not found" warnings in ZGE can be ignored, however you need to uncheck "Remove unused code" menuitem because that is not compatible with FP-generated binaries.
Exe-files are generally larger in FP. We could try to size-optimize for FP too but it requires quite a lot of detailed work so I would need help with that because I am mainly focused on Delphi. The appearance of the console window is strange because I don't remember that from previous FP-versions, possibly there is another FP command line switch that needs to be set. I know Kjell has encountered this too so maybe he has something to add here.
Exe-files are generally larger in FP. We could try to size-optimize for FP too but it requires quite a lot of detailed work so I would need help with that because I am mainly focused on Delphi. The appearance of the console window is strange because I don't remember that from previous FP-versions, possibly there is another FP command line switch that needs to be set. I know Kjell has encountered this too so maybe he has something to add here.
Lazarus instructions
---------------------
Lazarus Version#:0.9.29
------------------------------------
Lazarus / fpc / 2.4.0 / bin / i386-win32 / fpc.cfg
# -u is the same as #UNDEF
#
-dMINIMAL
#
------------------------------------
Now start Lazarus
1. File / Open / All Files so ZzDC.dpr becomes visible
2. Select - create project dialog message - yes
3. FPCUnit Test Application - yes
4. Project / Project Options / Compiler options / Parsing
5. Syntax mode - Delphi
6. Syntax options - check 1 , 3 , 4 , 8
7. Assembler style - Intel
OK
Run Menu / Build
Done
Proceed with moving and renaming Zzdc.exe to Player.bin
---------------------
Lazarus Version#:0.9.29
------------------------------------
Lazarus / fpc / 2.4.0 / bin / i386-win32 / fpc.cfg
# -u is the same as #UNDEF
#
-dMINIMAL
#
------------------------------------
Now start Lazarus
1. File / Open / All Files so ZzDC.dpr becomes visible
2. Select - create project dialog message - yes
3. FPCUnit Test Application - yes
4. Project / Project Options / Compiler options / Parsing
5. Syntax mode - Delphi
6. Syntax options - check 1 , 3 , 4 , 8
7. Assembler style - Intel
OK
Run Menu / Build
Done
Proceed with moving and renaming Zzdc.exe to Player.bin
"great expectations"
I just tried to compile with FreePascal 2.4.4 with trunk revision 298 (latest as of writing this message) using the makeFpcWin32.bat script in /build and I get the following error message:
However, I was able to compile the tagged version 1.9.7 without any issues.
Code: Select all
Compiling ZOpenGL.pas
Assembling zopengl
Fatal: Can't find unit Winapi used by ZPlatform
Fatal: Compilation aborted
There are later development builds of FPC. Try 2.7.1 for Windows here: ftp://ftp.freepascal.org/pub/fpc/snapsh ... 386-win32/
Also get the latest ZGE source, I checked in a minor change.
Then the build works fine here.
Also get the latest ZGE source, I checked in a minor change.
Then the build works fine here.
Doh! I'm not familiar with FPC builds sorry about that.VilleK wrote:There are later development builds of FPC. Try 2.7.1 for Windows here: ftp://ftp.freepascal.org/pub/fpc/snapsh ... 386-win32/
Also get the latest ZGE source, I checked in a minor change.
Then the build works fine here.
I can build both the Win32 and SDL versions now. However, from the instructions in the first post if I take "zzdc.exe" and rename it to Player.bin and put it in my ZGameEditor folder (after renaming the original) after running "build and run" the generated game crashes. This happens for the SDL version as well. For SDL I'm using version 1.2.14-win32.
I'm running Windows 7 x64.
I noticed that as.exe did not come with the release of FPC that you linked to, so I "borrowed" it from my install of 2.4.4 - that might have something to do with it?
Here is the output from when I tried to build (without copying as.exe from 2.4.4):
Code: Select all
C:\svn\zgameeditor\trunk\Build>makeFpcWin32.bat
ZMath.pas(432,1) Error: Assembler as.exe not found, switching to external assemb
ling
ZMath.pas(432,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: C:\FPC\2.7.1\bin\i386-win32\ppc386.exe returned an error exitcode (normal
if you did not specify a source file to be compiled)
C:\svn\zgameeditor\trunk\Build>makeFpcSDL.bat
ZMath.pas(432,1) Error: Assembler as.exe not found, switching to external assemb
ling
ZMath.pas(432,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: C:\FPC\2.7.1\bin\i386-win32\ppc386.exe returned an error exitcode (normal
if you did not specify a source file to be compiled)
C:\svn\zgameeditor\trunk\Build>
Freepascal is always catching up with the latest language features in the Delphi language and they make public release very seldom so for the best result you need to install development builds or download the source and build it yourself. But it is not easy to figure out where they are from their homepage
The develop builds perhaps are not complete with all tools, I just unzipped the latest version on top of the older version, that seemed to work.
About the binaries crashing, I found out it is because by default the option "Remove unused code" in Project menu is turned on. It improves the generated files compression ratio when running through a compress tool. And that feature use the map-file that (afaik) only the Delphi compiler generates. So if you want to use Fpc-generated player-file then it is easiest to just rename ZZDC.map file to something else because that disables the feature (the menu option is always on each time you restart so renaming the map-file is a more persistent solution).
The develop builds perhaps are not complete with all tools, I just unzipped the latest version on top of the older version, that seemed to work.
About the binaries crashing, I found out it is because by default the option "Remove unused code" in Project menu is turned on. It improves the generated files compression ratio when running through a compress tool. And that feature use the map-file that (afaik) only the Delphi compiler generates. So if you want to use Fpc-generated player-file then it is easiest to just rename ZZDC.map file to something else because that disables the feature (the menu option is always on each time you restart so renaming the map-file is a more persistent solution).