[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf
From: |
Nardy Pillards |
Subject: |
Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf |
Date: |
Sun, 12 Oct 2003 22:05:43 +0200 |
On 12 Oct 2003 at 19:05, Joern Thyssen wrote:
> On Sun, Oct 12, 2003 at 08:22:37PM +0200, Nardy Pillards wrote
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On 12 Oct 2003 at 16:58, Joern Thyssen wrote:
> >
> >
> > > Isn't there some environment variable we can query or some
> > > function we can call that'll return the path to "program files"?
> > > Or will this only work if installed in the default suggested
> > > directory? Is it somehow possible to find out where gnubg was
> > > installed?
> > >
> > > If possible, it should be trivial to initialise the data directory
> > > with this value.
> > >
> > > Jørn
> > >
> >
> > You can read the Registry.
> > (Installation Archive keeps the Installation Directory there)
> >
> > But you can also set (and read) an environment variable.
> > DOS command:
> > SET xyz=[value]
> >
> > I would opt for the second choice, although the WinPro(g)s will say:
> > No way. Use that Registry!!
>
> I'd opt for the registry, unless it's possible by the installer to add
> the environment variable to the list of system env. variables.
>
> It shouldn't be that difficult to query the registry (or am I just
> being naïve)?
>
> Jørn
>
(Win32 lines here)
Oeystein's Installation Archive sets the RegistryKey
HKEY_LOCAL_MACHINE\SOFTWARE\gnubg
Install_dir
to the Installed Directory
It can be read to know where gnubg is installed
and:
.SGF files can be coupled to gnubg.exe,
and then
Registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\Applications\gnubg.exe\shell\open\
command\\(default)
needs the value:
"C:\Program Files\gnubg\gnubg.exe" --datadir "C:\Program Files\gnubg"
"%1"
(that's one line, with the quotes)
That's all that's needed to double click on a .SGF file and launch
gnubg. It will look in the Installed Directory for needed files.
But...
All .SGF files will be opened with gnubg (I understood gnuGO also
uses .SGF).
So....
Is there a way to read the Install_dir Registry Key from within
gnubg?
( IF WIN32 .... get key ... use value for base data )
--
Louis Nardy Pillards
"It's better to light a candle, than to curse the darkness"
- [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, olivier croisille, 2003/10/12
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Joern Thyssen, 2003/10/12
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Nardy Pillards, 2003/10/12
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Joern Thyssen, 2003/10/12
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf,
Nardy Pillards <=
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Holger, 2003/10/12
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Jon Kinsey, 2003/10/13
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Joern Thyssen, 2003/10/13
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Holger, 2003/10/13
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Jon Kinsey, 2003/10/13
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Nardy Pillards, 2003/10/14
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Nardy Pillards, 2003/10/14
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Nardy Pillards, 2003/10/14
- Re: [Bug-gnubg] Bug when opening from file icon a match saved in .sgf, Jim Segrave, 2003/10/13