issue-#94 using BlackBox without the Windows registry
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
issue-#94 using BlackBox without the Windows registry
I have created issue-#94 according to CPC 1.7 change list number 36.
For the changes see http://redmine.blackboxframework.org/pr ... c080bcafe3.
Fixes a trivial bug in ReadRegistry: len is given in byte and must be multiplied by 2.
Differences to the CPC 1.7 version are:
0. The new option is named /INIFILE instead of /PORTABLE.
1. The INI-file name is given as an explicit parameter following the /INIFILE option.
2. The top level section in the INI-file is named after the application (Dialog.appName, as also used in the Windows registry)
3. HostMenus.ReadCommandLine is extended with the new option.
For the user there is no change unless the new option /INIFILE <iniFilePath> is used on the command line.
- Josef
For the changes see http://redmine.blackboxframework.org/pr ... c080bcafe3.
Fixes a trivial bug in ReadRegistry: len is given in byte and must be multiplied by 2.
Differences to the CPC 1.7 version are:
0. The new option is named /INIFILE instead of /PORTABLE.
1. The INI-file name is given as an explicit parameter following the /INIFILE option.
2. The top level section in the INI-file is named after the application (Dialog.appName, as also used in the Windows registry)
3. HostMenus.ReadCommandLine is extended with the new option.
For the user there is no change unless the new option /INIFILE <iniFilePath> is used on the command line.
- Josef
Re: issue-#94 using BlackBox without the Windows registry
Josef, your solution works fine.
In the PROCEDURE SetIniFile;
behind
IF opt = "/INIFILE" THEN
HostFiles.GetName(p, i, name, opt);
i insert the line
IF name = "" THEN name := HostFiles.appName + ".ini" END;
- Helmut
In the PROCEDURE SetIniFile;
behind
IF opt = "/INIFILE" THEN
HostFiles.GetName(p, i, name, opt);
i insert the line
IF name = "" THEN name := HostFiles.appName + ".ini" END;
- Helmut
Re: issue-#94 using BlackBox without the Windows registry
how about remain the "/PORTABLE" as a option without a infile name followed?Josef Templ wrote:0. The new option is named /INIFILE instead of /PORTABLE.
for I have used to it for years, it give me a goog feeling.
luowy
Re: issue-#94 using BlackBox without the Windows registry
Luowy, see my last comment here. After insert the lineluowy wrote:how about remain the "/PORTABLE" as a option without a infile name followed?
for I have used to it for years, it give me a goog feeling.
luowy
IF name = "" THEN name := HostFiles.appName + ".ini" END;
you can use /INIFILE without filename.
In which help document we should mention the new key /INIFILE ?
- Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#94 using BlackBox without the Windows registry
The name "/PORTABLE" is just misleading.
It is a poor name for that purpose.
It is a poor name for that purpose.
Re: issue-#94 using BlackBox without the Windows registry
https://en.wikipedia.org/wiki/Portable_applicationJosef Templ wrote:The name "/PORTABLE" is just misleading.
It is a poor name for that purpose.
use a bat file in the bb directory:A portable application (portable app), sometimes also called standalone, is a program designed to run on a compatible computer without being installed leaving the computer's configuration information intact. This type of application can be stored on any storage device, including internal mass storage and external storage such as USB drives and floppy disks – storing its program files and any configuration information and data on the storage medium alone. If no configuration information is required a portable program can be run from read-only storage such as CD-ROMs and DVD-ROMs. Such applications are commonly used on restricted machines due to the nature in which they do not interact or modify the system. They are considered safe since they run the same executable code and thus neither add nor retract any functionality of their installable counterparts. Some applications are available in both installable and portable versions.
Some applications which are not portable by default support optional portability through other mechanisms, the most common being command-line arguments. Examples might include "/portable" to simply instruct the program to behave as a portable program, or "--cfg=/path/inifile" to specify the configuration file location.
Code: Select all
start blackbox.exe /PORTABLE /NOSCROLL
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#94 using BlackBox without the Windows registry
Thanks, I was not aware of this definition of 'portable'.
The usual interpretation is that it is a software that can be
recompiled and linked for a different platform such as MacOS, Windows or Linux
or even be run on different OSes without recompilation such as Java programs.
Anyway, we can of course keep /PORTABLE as an alias for the more explicit form
of /INFILE <appname>.ini.
The alternative of omitting the filename only works if the /INFILE option is the
last one in the command line and this is only possible if there is only one option
with an optional argument. This would be kind of ugly.
I have therefore included /PORTABLE now as a separate option.
For the changes see http://redmine.blackboxframework.org/pr ... c080bcafe3.
@Helmut: is it important to choose HostFiles.appName instead of Dialog.appName?
The command line options are currently not documented anywhere
(with the exception of the /USE and /PAR) so I have added them.
- Josef
The usual interpretation is that it is a software that can be
recompiled and linked for a different platform such as MacOS, Windows or Linux
or even be run on different OSes without recompilation such as Java programs.
Anyway, we can of course keep /PORTABLE as an alias for the more explicit form
of /INFILE <appname>.ini.
The alternative of omitting the filename only works if the /INFILE option is the
last one in the command line and this is only possible if there is only one option
with an optional argument. This would be kind of ugly.
I have therefore included /PORTABLE now as a separate option.
For the changes see http://redmine.blackboxframework.org/pr ... c080bcafe3.
@Helmut: is it important to choose HostFiles.appName instead of Dialog.appName?
The command line options are currently not documented anywhere
(with the exception of the /USE and /PAR) so I have added them.
- Josef
Re: issue-#94 using BlackBox without the Windows registry
No, it isn't. Use the one you like.Josef Templ wrote: @Helmut: is it important to choose HostFiles.appName instead of Dialog.appName?
- Helmut
Re: issue-#94 using BlackBox without the Windows registry
Minor typo in the Docu for \USE. "pathes" should be "paths".
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#94 using BlackBox without the Windows registry
thanks, fixed.