fdisk icon indicating copy to clipboard operation
fdisk copied to clipboard

Build command line only version

Open boeckmann opened this issue 2 years ago • 4 comments

This is more work than I have thought, because I have yet to find a way to keep the unneeded SvarLANG strings out when not building the UI.

boeckmann avatar Nov 20 '23 20:11 boeckmann

There are a few options:

  1. Manually customized translation files (ugly)
  2. Automatically customized translation files: scan .C files for used string ids
  3. String ID exclusion for svarlang, so that the strings of specific categories could be left out

Probably a few more...

boeckmann avatar Nov 20 '23 20:11 boeckmann

2. Automatically customized translation files: scan .C files for used string ids

This might fail in some cases, for example when the string ID is built dynamically, like in a for() loop that displays a range of strings, or positions in a menu.

3. String ID exclusion for svarlang, so that the strings of specific categories could be left out

That's probably the sanest and most flexible approach, but still quite some work... A poor man's approach could be grepping (-v) out the source NLS files to create versions without some of the categories, and running tlumacz on this. No need to do any SvarLang work, just some extra scripting in the makefile.

Option 4. that means including the useless strings might be a good start to get a cmdline-only version quickly. Not ideal, but still smaller than the full-blown UI version.

mateuszviste avatar Nov 20 '23 20:11 mateuszviste

Option 4. that means including the useless strings might be a good start to get a cmdline-only version quickly. Not ideal, but still smaller than the full-blown UI version.

Yes I can do this, it is 13k less, to be specific :-)

boeckmann avatar Nov 20 '23 20:11 boeckmann

I have to rework the makefile for this. Problem is that some .c files have to be built twice when building fdisk.exe and fdiskcmd.exe. There are several possibilities. I have to think a little bit about it. A batch file around the makefile would be the easiest thing. call wmake fdisk.exe, clean the build, call wmake fdiskcmd.exe. But it is also the ugliest, because it introduces the shell interpreter into the build phase. The current Makefile works under DOS, Windows and Linux. That is nice.

boeckmann avatar Nov 20 '23 22:11 boeckmann