Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-10

Getting a resource file in the proper FPC directory: makefiles etc?

3 messages · 1 person · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

Developing my database listener for fpcunit, I see 2 locations where the ppu files end up:
<fpc>\packages\fcl-fpcunit\units\i386-win32\dbreporter.ppu <fpc>\units\i386-win32\fcl-fpcunit\dbreporter.ppu

However, a dbreporter.res resource file only ends up in the first location.

Which makefile(s) do I have to change in trunk (and how) in order to get that done?

Attached is the diff that gets dbreporter compiled, but not yet the resource file...

Note: my current code, including diff for dbtestframework.pas, adapted makefiles, demo programs can be found via:
https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/dblistener.zip

Thanks,
Reinier

Reply by email

Reinier Olislagers

Developing my database listener for fpcunit, I see 2 locations where the ppu files end up:
<fpc>\packages\fcl-fpcunit\units\i386-win32\dbreporter.ppu <fpc>\units\i386-win32\fcl-fpcunit\dbreporter.ppu

However, a dbreporter.res resource file only ends up in the first location.

Which makefile(s) do I have to change in trunk (and how) in order to get that done?

Attached is the diff that gets dbreporter compiled, but not yet the resource file...

Note: my current code, including diff for dbtestframework.pas, adapted makefiles, demo programs can be found via:
https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/dblistener.zip

Thanks,
Reinier

Reply by email

Reinier Olislagers
to Reinier Olislagers
Reinier Olislagers wrote 9 lines
Developing my database listener for fpcunit, I see 2 locations where the ppu files end up: <fpc>\packages\fcl-fpcunit\units\i386-win32\dbreporter.ppu <fpc>\units\i386-win32\fcl-fpcunit\dbreporter.ppu However, a dbreporter.res resource file only ends up in the first location. Which makefile(s) do I have to change in trunk (and how) in order to get that done?

To add insult to injury, on 64 bit Windows, running make fails while compiling the resource file with an error that dbreporter.sql can't be found.
contents of dbreporter.rc
dbreporter_sql file dbreporter.sql

Compiling .\fcl-fpcunit\src\dbreporter.pas
Compiling resource
C:\development\fpctrunk\packages\fcl-fpcunit\src\dbreporter.rc Error!
Line 1 of Resource Script
(C:\development\fpctrunk\packages\fcl-fpcunit\src\dbreporter.RC):- Could not find file:-
dbreporter.sql

RES file not made
dbreporter.pas(963) Error: Error while compiling resources dbreporter.pas(963) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted

... but dbreporter.sql sits in
C:\development\fpctrunk\packages\fcl-fpcunit\src
Any hints?

By now, I think the easiest option is to write a preprocessor that simply takes the sql and outputs a unit with a const containing the contents as a huge string...

Thanks,
Reinier

Reply by email