Re: [fpc-pascal] Resource compilation

2020-08-12 Thread Sven Barth via fpc-pascal
Am 13.01.2019 um 18:38 schrieb Martok: Update time! [snip] All of windres's tests pass now, except for the Dialog related ones. I would consider it more or less finished. Any more things to do? Otherwise, I'll stack it into

Re: [fpc-pascal] Resource compilation

2019-01-13 Thread Michael Van Canneyt
On Sun, 13 Jan 2019, Martok wrote: To a lesser degree: something like Python's argparse would be nice. Everyone builds their own argument parser, usually with very different concepts and varying amounts of code duplication. Assuming you mean the command-line arguments: What's

Re: [fpc-pascal] Resource compilation

2019-01-13 Thread Martok
Update time! > - UnicodeString Strings (L"foo")Done > - various forms of escape sequences for strings Done > - Concatenated adjacent strings ("ABC" "DEF") This is weird: windres, brcc and rc all do something different when

Re: [fpc-pascal] Resource compilation

2018-09-09 Thread Martok
> I happened to have an old win8 sdk around (vs community edition didn't seem > to have "RC"). Anyway: > > http://www.stack.nl/~marcov/funkyres.res Thank you! Funky indeed, I'll mark that down as a Reshacker bug then. Off to String stuff then. -- Regards, Martok

Re: [fpc-pascal] Resource compilation

2018-09-09 Thread Marco van de Voort
In our previous episode, Martok said: > However, there's an issue I hope somebody can help with. Binutils has this > test > case: > > > > Every Resource compiler

Re: [fpc-pascal] Resource compilation

2018-09-09 Thread Martok
More Progress! I've since finished STRINGTABLE and VERSIONINFO as well as mathematical expressions. However, there's an issue I hope somebody can help with. Binutils has this test case:

Re: [fpc-pascal] Resource compilation

2018-08-28 Thread Michael Van Canneyt
On Tue, 28 Aug 2018, Martok wrote: Hi again, a quick update: I have a somewhat-working version, but many things are still missing. We have: a preprocessor, full support for BITMAP, ICON, CURSOR, resource attributes (LANGUAGE etc.), all RCDATA-like resources, including their definition from

Re: [fpc-pascal] Resource compilation

2018-08-28 Thread Martok
Hi again, a quick update: I have a somewhat-working version, but many things are still missing. We have: a preprocessor, full support for BITMAP, ICON, CURSOR, resource attributes (LANGUAGE etc.), all RCDATA-like resources, including their definition from inline literal statements. What's

Re: [fpc-pascal] Resource compilation

2018-08-04 Thread Giulio Bernardi
Hi everybody, I'm just chiming in after quite some years. Just two notes: * For lazarus, it shouldn't need to use a real resource compiler for standard things like icons, manifests etc: see programs res6 and res7 at https://www.freepascal.org/docs-html/fclres/basic%20usage.html * For the "real"

Re: [fpc-pascal] Resource compilation

2018-08-04 Thread Michael Van Canneyt
On Sat, 4 Aug 2018, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: > changes/extensions to fcl-res? I think a lot. There is a request in the bugtracker for a resource compiler since ages. It comes up regularly. Many people don't even pursue it further, and

Re: [fpc-pascal] Resource compilation

2018-08-04 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > changes/extensions to fcl-res? > > I think a lot. There is a request in the bugtracker for a resource compiler > since ages. It comes up regularly. Many people don't even pursue it further, and just use resources generator by e.g. an old

Re: [fpc-pascal] Resource compilation

2018-08-03 Thread Michael Van Canneyt
On Sat, 4 Aug 2018, Martok wrote: Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal: The RC language itself isn't *that* difficult. Main difficulty would be to essentially implement a C-preprocessor-compatible preprocessor. Just "a few" months later, I finally got around to

Re: [fpc-pascal] Resource compilation

2018-08-03 Thread Martok
Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal: > The RC language itself isn't *that* difficult. Main difficulty would be to > essentially implement a C-preprocessor-compatible > preprocessor. Just "a few" months later, I finally got around to checking this out. You were completely

Re: [fpc-pascal] Resource compilation

2017-10-12 Thread Martok
Am 11.10.2017 um 11:24 schrieb Sven Barth via fpc-pascal: > The point of our own resource compiler would be to avoid external > dependencies. True. And having a general-purpose preprocessor would come in useful anyway. Fun fact: windres also just calls gcc, which is probably why we deploy it:

Re: [fpc-pascal] Resource compilation

2017-10-11 Thread Sven Barth via fpc-pascal
Am 11.10.2017 08:11 schrieb "Martok" : > > Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal: > > The RC language itself isn't *that* difficult. Main difficulty would be to > > essentially implement a C-preprocessor-compatible preprocessor. > As I have just

Re: [fpc-pascal] Resource compilation

2017-10-11 Thread Martok
Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal: > The RC language itself isn't *that* difficult. Main difficulty would be to > essentially implement a C-preprocessor-compatible preprocessor. As I have just discovered, the installer provides a (rather antique) gcc on Windows and depends

Re: [fpc-pascal] Resource compilation

2017-09-26 Thread Martok
Am 25.09.2017 um 09:12 schrieb Graeme Geldenhuys: > The same could be said about implementing a competing (alternatives to > C/C++ or Delphi) compiler. ;-) Not really though ;-) Rewriting a resource compiler with the same input and output files as the existing one is a bit different than writing

Re: [fpc-pascal] Resource compilation

2017-09-25 Thread Graeme Geldenhuys
On 2017-09-24 20:52, Martok wrote: If so, I wouldn't worry too much about having our own resource compiler. The RC script language is actually quite complex, and there'd be next to no benefit to reinventing the wheel. The same could be said about implementing a competing (alternatives to

Re: [fpc-pascal] Resource compilation

2017-09-25 Thread Martok
Am 24.09.2017 um 14:50 schrieb Sven Barth via fpc-pascal: > Please report a bug. Well this is awkward - I tried to provide a test project for the report, and couldn't get it to *not* work. The real-world project that has this issue for me has the resource included from a file in a package, and it

Re: [fpc-pascal] Resource compilation

2017-09-25 Thread Martok
> Also note that that is only true for Windows. FPC doesn't include a > resource compiler for any other platforms. So if no resource compiler > exists, you will get a compilation error until you make other plans. AFAIK, windres is available for lots of other platforms. If you have to install

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
On 24.09.2017 22:55, Graeme Geldenhuys wrote: > On 2017-09-24 19:02, Sven Barth via fpc-pascal wrote: >>> system if you want to use it as a linker, fpc does not provide it. >> Exactly. > > Exactly my point! Why? Why does the official FPC installer for Windows > give a more workable solution out

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Graeme Geldenhuys
On 2017-09-24 19:02, Sven Barth via fpc-pascal wrote: system if you want to use it as a linker, fpc does not provide it. Exactly. Exactly my point! Why? Why does the official FPC installer for Windows give a more workable solution out of the box (1), but official installers for other

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
Am 24.09.2017 18:14 schrieb "Giulio Bernardi" : > > I think that what Sven meant is that fpc's Windows installers include binutils, > while this is not true for other platforms: that is, you need to have ld on your > system if you want to use it as a linker, fpc does not provide

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Giulio Bernardi
I think that what Sven meant is that fpc's Windows installers include binutils, while this is not true for other platforms: that is, you need to have ld on your system if you want to use it as a linker, fpc does not provide it. Same as for windres: if you need it, usually you can install it from

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Graeme Geldenhuys
On 2017-09-24 16:49, Sven Barth via fpc-pascal wrote: Because it's only Windows that we provide a setup for. Huh? I've been downloading the official FPC console installers for FreeBSD and Linux since 6 years ago. I never use distro packages managers for FPC. Regards, Graeme -- fpGUI

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
On 24.09.2017 17:15, Graeme Geldenhuys wrote: > On 2017-09-24 13:50, Sven Barth via fpc-pascal wrote: >> You are aware that FPC supports resources on basically all platforms? > > I know that. What I meant is that FPC only ships with a Windows resource > compiler - ability to compile RC files to

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Graeme Geldenhuys
On 2017-09-24 13:50, Sven Barth via fpc-pascal wrote: You are aware that FPC supports resources on basically all platforms? I know that. What I meant is that FPC only ships with a Windows resource compiler - ability to compile RC files to RES files. All other platforms you have to find your

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Sven Barth via fpc-pascal
On 24.09.2017 12:12, Graeme Geldenhuys wrote: > On 2017-09-23 21:31, Martok wrote: >> the $R directive accepts resource scripts (RC) and compiles the RES >> file from it >> on demand. > > Also note that that is only true for Windows. FPC doesn't include a > resource compiler for any other

Re: [fpc-pascal] Resource compilation

2017-09-24 Thread Graeme Geldenhuys
On 2017-09-23 21:31, Martok wrote: the $R directive accepts resource scripts (RC) and compiles the RES file from it on demand. Also note that that is only true for Windows. FPC doesn't include a resource compiler for any other platforms. So if no resource compiler exists, you will get a

[fpc-pascal] Resource compilation

2017-09-24 Thread Martok
Hi all, the $R directive accepts resource scripts (RC) and compiles the RES file from it on demand. However, that only happens if the RES file does not exist - if it does, the resource compiler is never invoked. Even clean-building the unit from source does not recompile the resource file. This