Suggestion: Always install help files for all languages

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
NilsH
User
User
Posts: 19
Joined: Sun Apr 16, 2017 8:46 pm
Location: Germany

Suggestion: Always install help files for all languages

Post by NilsH »

Hello!

I mostly use the German help file when working with PureBasic, but sometimes I would like to look at the English version for reference, to make sure that nothing got lost in translation.
Unfortunately the installer will only install one version of the help file.
Of course there is the online documentation, but I'm not sure if it's always up to date, and also it's not accessible without internet connection.
And considering that a PureBasic installation is over 250 MiB in size nowadays, the extra 10 MiB for two more help files shouldn't be a problem.

For these reasons, I would like to suggest the following changes:

Modify the installer so that it always places all help files in the application directory.
The files could be named like this:
PureBasic.chm [for the original english version]
PureBasic-German.chm
PureBasic-French.chm

Furthermore, modify the installer so that it creates shortcuts for all help files in the start menu directory.
The shortcuts could be named like this:
PureBasic Help (English) [or simply PureBasic Help]
PureBasic Help (German)
PureBasic Help (French)

Add a new key to the [LanguageInfo] group of the Editor.catalog translation file.
This key would be named HelpFile and its value would be the name of the help file for the given language.
The default value should be "PureBasic.chm", so that the English help is used if the key is absent.

Regards,
Nils
User avatar
ChrisR
Addict
Addict
Posts: 1589
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: Suggestion: Always install help files for all languages

Post by ChrisR »

You can use Inno Setup Unpacker to extract the PureBasic_Windows_xxxxx.exe installation file:

Code: Select all

innounp.exe -x -b -a -d"Destination Path" -f"PureBasic_Windows_xxxxx.exe"
You will have the 3 help files that you can rename:

Code: Select all

PureBasic,1.chm = English
PureBasic,2.chm = French
PureBasic,3.chm = German

#
Or you can use Extract PureBasic Portable Batch for a full portable version with it's PureBasic_Portable shortcut. To use it, just drag'n drop the setup file PureBasic_Windows_xxxxx.exe on it, it will be extracted to PureBasic_Windows_xxxxx folder, simple and effective.
And to rename the 3 help files, in the batch file, you can change:

Code: Select all

If "%HelpLanguage%"=="English" (ren "%~dp0PureBasic_Files\{App}\PureBasic,1.chm" "PureBasic.chm")
If "%HelpLanguage%"=="French"  (ren "%~dp0PureBasic_Files\{App}\PureBasic,2.chm" "PureBasic.chm")
If "%HelpLanguage%"=="German"  (ren "%~dp0PureBasic_Files\{App}\PureBasic,3.chm" "PureBasic.chm")
to

Code: Select all

ren "%~dp0PureBasic_Files\{App}\PureBasic,1.chm" "PureBasic_English.chm"
ren "%~dp0PureBasic_Files\{App}\PureBasic,2.chm" "PureBasic_French.chm"
ren "%~dp0PureBasic_Files\{App}\PureBasic,3.chm" "PureBasic.chm"
Denis
Enthusiast
Enthusiast
Posts: 790
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Re: Suggestion: Always install help files for all languages

Post by Denis »

NilsH wrote: Sat Jan 31, 2026 11:49 pm Hello!

I mostly use the German help file when working with PureBasic, but sometimes I would like to look at the English version for reference, to make sure that nothing got lost in translation.
Unfortunately the installer will only install one version of the help file.
Of course there is the online documentation, but I'm not sure if it's always up to date, and also it's not accessible without internet connection.
And considering that a PureBasic installation is over 250 MiB in size nowadays, the extra 10 MiB for two more help files shouldn't be a problem.

For these reasons, I would like to suggest the following changes:

Modify the installer so that it always places all help files in the application directory.
The files could be named like this:
PureBasic.chm [for the original english version]
PureBasic-German.chm
PureBasic-French.chm

Furthermore, modify the installer so that it creates shortcuts for all help files in the start menu directory.
The shortcuts could be named like this:
PureBasic Help (English) [or simply PureBasic Help]
PureBasic Help (German)
PureBasic Help (French)

Add a new key to the [LanguageInfo] group of the Editor.catalog translation file.
This key would be named HelpFile and its value would be the name of the help file for the given language.
The default value should be "PureBasic.chm", so that the English help is used if the key is absent.

Regards,
Nils
+1
A+
Denis
NilsH
User
User
Posts: 19
Joined: Sun Apr 16, 2017 8:46 pm
Location: Germany

Re: Suggestion: Always install help files for all languages

Post by NilsH »

ChrisR wrote: Sun Feb 01, 2026 12:37 am You can use Inno Setup Unpacker to extract the PureBasic_Windows_xxxxx.exe installation file:

Code: Select all

innounp.exe -x -b -a -d"Destination Path" -f"PureBasic_Windows_xxxxx.exe"
You will have the 3 help files that you can rename:

Code: Select all

PureBasic,1.chm = English
PureBasic,2.chm = French
PureBasic,3.chm = German
Thanks for your reply! I already figured that there must be some way to extract individual files from the installer, and you saved me the work of finding out how!

If anyone else wants to do it, here is the command line to extract all help files to the current directory:

Code: Select all

innounp -e PureBasic_Windows_X64_xxxxx.exe {App}\PureBasic,*.chm
Of course you have to insert the actual name of the installer executable.

I still think that the suggested change would be an improvement though, even if it's just a small one.

I've already found out that the name of the help file to use is determined in the procedure Help_CreateFunction() in HelpTool.pb.
Possibly the code that sets HelpToolHomeUrl$ should be moved into a separate procedure,
and this procedure should be called everytime a language file is loaded / the language is changed.
It should also be called from Help_CreateFunction() to maintain compatibility with existing code that might expect HelpToolHomeUrl$ to be set to a meaningful value even before a language is loaded, in the case such code exists.

Regards,
Nils

Edit:
Never mind, I've just realized that HelpToolHomeUrl$, even though it's global, is never used outside of Help_CreateFunction().
The actual path for the CHM help file is determined in WindowsHelp.pb.
Post Reply