Opened 15 years ago
Closed 15 years ago
#908 closed defect (fixed)
No Font Definition File, windows xp
Reported by: | voncasec | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 6.4.0 |
Component: | Installation | Version: | svn-releasebranch64 |
Keywords: | v.label.sa, g.mkfontcap, wingrass | Cc: | |
CPU: | Unspecified | Platform: | MSWindows XP |
Description
C:/Program Files/GRASS-64-SVN/etc/fontcap: No font definition file
The installed version includes a file called fontcap.tmpl under the appropriate directory however the v.labels.sa program does not recognize it.
Attachments (2)
Change History (25)
comment:1 by , 15 years ago
Component: | default → Installation |
---|---|
Keywords: | g.mkfontcap wingrass added |
Priority: | normal → critical |
Summary: | v.label.sa - No Font Definition File, windows xp → No Font Definition File, windows xp |
follow-ups: 3 4 comment:2 by , 15 years ago
... but for be benefit of users without admin rights on the system it should probably happen as part of the installer.
maybe for GRASS 7 we should first check for it in ~/.grass7/fontcap, and if not found there look for it in $(ETC)/fontcap?
Hamish
comment:3 by , 15 years ago
Replying to hamish:
maybe for GRASS 7 we should first check for it in ~/.grass7/fontcap, and if not found there look for it in $(ETC)/fontcap?
The code which reads the file uses $GRASS_FONT_CAP if it is set and the file can be read, otherwise $GISBASE/etc/fontcap.
If g.mkfontcap is run without the -s flag, the data will be written to $GRASS_FONT_CAP if it is set, otherwise to $GISBASE/etc/fontcap. If $GRASS_FONT_CAP is set but the file cannot be written, it fails.
follow-up: 5 comment:4 by , 15 years ago
Replying to hamish:
... but for be benefit of users without admin rights on the system it should probably happen as part of the installer.
[...]
Hamish
Replying to hamish:
... but for be benefit of users without admin rights on the system it should probably happen as part of the installer.
maybe for GRASS 7 we should first check for it in ~/.grass7/fontcap, and if not found there look for it in $(ETC)/fontcap?
Hamish
the NSIS-installer is able to run g.mkfontcap (http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.2)
Exec '"$INSTDIR\someprogram.exe"' Exec '"$INSTDIR\someprogram.exe" some parameters'
is there any other information needed by g.mkfontcap (beside the ouput destination GRASS_FONT_CAP)?
Helmut
comment:5 by , 15 years ago
Replying to hellik:
is there any other information needed by g.mkfontcap (beside the ouput destination GRASS_FONT_CAP)?
No. Running it without arguments should be fine in this case. It automatically scans ${WINDIR}/Fonts
.
follow-ups: 7 8 comment:6 by , 15 years ago
it uses G_no_gisinit(), but from outside of grass (ie in the installer) it still needs to have ligbis and the freetype lib found somewhere in the %PATH%, right?
comment:7 by , 15 years ago
Replying to hamish:
it uses G_no_gisinit(), but from outside of grass (ie in the installer) it still needs to have ligbis and the freetype lib found somewhere in the %PATH%, right?
for testing, I've tried g.mkfontcap.exe in a MS-cmd outside a grass-session, so there is an error "libfreetype-6.dll couldn't be found".
Helmut
follow-up: 9 comment:8 by , 15 years ago
Replying to hamish:
it uses G_no_gisinit(), but from outside of grass (ie in the installer) it still needs to have ligbis and the freetype lib found somewhere in the %PATH%, right?
Right.
It also needs $GISBASE to be set so that it can find the stroke fonts in $GISBASE/fonts.
And it needs $GISRC to be set (and valid) because G_parser()
uses G__getenv("OVERWRITE")
as well as getenv("GRASS_OVERWRITE")
. It checks these regardless of whether there are any options with "new" in the gisprompt field (the overwrite field in the GModule structure is set according to whether overwrite is enabled so that modules can perform their own checks).
AFAICT, the simplest fix is to add:
G_set_gisrc_mode(G_GISRC_MODE_MEMORY);
to G_no_gisinit()
.
Fixed in r40854 (6.5) and r40855 (7.0). Suggest back-port to 6.4 after testing.
follow-ups: 10 19 comment:9 by , 15 years ago
Replying to glynn:
AFAICT, the simplest fix is to add:
G_set_gisrc_mode(G_GISRC_MODE_MEMORY);
to
G_no_gisinit()
.
Oops. It took me all of two minutes to realise that isn't going to work (it breaks g.proj and g.gisenv). I've moved the code into g.mkfontcap and g.dirseps in r40856 (7.0) and r40857 (6.5).
follow-up: 11 comment:10 by , 15 years ago
Replying to glynn:
Replying to glynn:
AFAICT, the simplest fix is to add:
G_set_gisrc_mode(G_GISRC_MODE_MEMORY);to
G_no_gisinit()
.Oops. It took me all of two minutes to realise that isn't going to work (it breaks >g.proj and g.gisenv). I've moved the code into g.mkfontcap and g.dirseps in r40856 >(7.0) and r40857 (6.5).
what does this mean for running g.mkfontcap outside a Grass-session (and accordingly for the NSIS-installer)? which parameters have to be set for working g.mkfontcap outside a Grass-session?
Helmut
follow-up: 12 comment:11 by , 15 years ago
Replying to hellik:
what does this mean for running g.mkfontcap outside a Grass-session (and accordingly for the NSIS-installer)? which parameters have to be set for working g.mkfontcap outside a Grass-session?
GISRC should no longer have to be set. GISBASE must still be set (this eliminates the need for the installer to set GRASS_FONT_CAP, as the default of $GISBASE/etc/fontcap will work).
follow-up: 13 comment:12 by , 15 years ago
Replying to glynn:
Replying to hellik:
what does this mean for running g.mkfontcap outside a Grass-session (and accordingly for the NSIS-installer)? which parameters have to be set for working g.mkfontcap outside a Grass-session?
GISRC should no longer have to be set. GISBASE must still be set (this eliminates the need for the installer to set GRASS_FONT_CAP, as the default of $GISBASE/etc/fontcap will work).
i've tested g.mkfontcap with grass65 running outside a grass-session. it's working, fontcap is built.
I attach a patch for the NSIS-installer script to write a little cmd-file to set all dependecies and then run g.mkfontcap outside a grass session.
the cmd is working by right click with "run as admin" on C:\Program Files\GRASS-65-SVN\etc\install_run_gmkfontcap.cmd but if it's started by the installer itself, there seems that install_run_gmkfontcap.cmd isn't allowed to write fontcap in C:\Program Files\GRASS-65-SVN\etc\.
Helmut
follow-up: 14 comment:13 by , 15 years ago
Replying to hellik:
I attach a patch for the NSIS-installer script to write a little cmd-file to set all dependecies and then run g.mkfontcap outside a grass session.
there was a typo, i change the patch, but it doesn't help to run the g.mkfontcap by the installer.
Helmut
by , 15 years ago
Attachment: | install_run_gmkfontcap.g65.patch added |
---|
follow-up: 15 comment:14 by , 15 years ago
Replying to hellik:
Replying to hellik:
I attach a patch for the NSIS-installer script to write a little cmd-file to set all dependecies and then run g.mkfontcap outside a grass session.
there was a typo, i change the patch, but it doesn't help to run the g.mkfontcap by the installer.
Helmut
the little helper script install_run_gmkfontcap.cmd itself included in the NSIS-script (Line 418 - 441 in https://trac.osgeo.org/grass/attachment/ticket/908/install_run_gmkfontcap.g65.patch) is working, that means g.mkfontcap (grass65-version) is working (thanks to Glynn's fixes in r40857 ) outside a Grass-session.
but I'm lost at the moment by invoking install_run_gmkfontcap.cmd by the NSIS-installer (Line 443 - 444 in https://trac.osgeo.org/grass/attachment/ticket/908/install_run_gmkfontcap.g65.patch) and getting writing permission in c:\Program Files\.
any suggestions?
Helmut
follow-up: 16 comment:15 by , 15 years ago
Replying to hellik:
but I'm lost at the moment by invoking install_run_gmkfontcap.cmd by the NSIS-installer (Line 443 - 444 in https://trac.osgeo.org/grass/attachment/ticket/908/install_run_gmkfontcap.g65.patch) and getting writing permission in c:\Program Files\.
any suggestions?
Helmut
the added patch for the NSIS-installer-script is now working, that means g.mkfontcap is now invoked by the WinGrass-installer and writes succesfully the fontcap-file in c:\Program Files\Grass65-SVN\etc.
the only thing at the moment is, g.mkfontcap works longer (searching for fonts) than the WinGrass-installer installs WinGrass, so after closing the WinGrass-installer the Windows-command-box is still opened.
maybe is there a possibility to run the run_gmkfontcap.cmd-script in the background without opening Windows-command-box?
Helmut
p.s. how can I delete an old attachment in track?
follow-up: 17 comment:16 by , 15 years ago
Replying to hellik:
the only thing at the moment is, g.mkfontcap works longer (searching for fonts) than the WinGrass-installer installs WinGrass, so after closing the WinGrass-installer the Windows-command-box is still opened.
maybe is there a possibility to run the run_gmkfontcap.cmd-script in the background without opening Windows-command-box?
It depends upon what's opening the console Window. If it's NSIS, there might be an option within NSIS to do it. Otherwise, "start /b ...
" might work.
p.s. how can I delete an old attachment in track?
I don't think that you can, although you can replace an attachment with an updated version.
follow-up: 18 comment:17 by , 15 years ago
Replying to glynn:
Replying to hellik:
the only thing at the moment is, g.mkfontcap works longer (searching for fonts) than the WinGrass-installer installs WinGrass, so after closing the WinGrass-installer the Windows-command-box is still opened.
maybe is there a possibility to run the run_gmkfontcap.cmd-script in the background without opening Windows-command-box?
It depends upon what's opening the console Window. If it's NSIS, there might be an option within NSIS to do it. Otherwise, "
start /b ...
" might work.
there would be an option with a second bat starting run_gmkfontcap.bat minimized:
@echo off rem ######################################################################### rem #run run_gmkfontcap.bat minimized rem ######################################################################### start /MIN "C:\Program Files\GRASS-65-SVN\etc\run_gmkfontcap.bat" exit
I've tried this by invoking the above script by the installer, a minimized console is started, but run_gmkfontcap.bat isn't running/started.
run_gmkfontcap.bat itself invoked by the installer is working.
I couldn't find anything on NSIS-side.
Helmut
by , 15 years ago
Attachment: | Grass65_WinInstaller_Run_Gmkfontcap.patch added |
---|
follow-up: 20 comment:18 by , 15 years ago
comment:19 by , 15 years ago
Replying to glynn:
Replying to glynn:
AFAICT, the simplest fix is to add:
G_set_gisrc_mode(G_GISRC_MODE_MEMORY);to
G_no_gisinit()
.Oops. It took me all of two minutes to realise that isn't going to work (it breaks g.proj and g.gisenv). I've moved the code into g.mkfontcap and g.dirseps in r40856 (7.0) and r40857 (6.5).
after intensive testing backported to 6.4 by r41333
follow-up: 21 comment:20 by , 15 years ago
Replying to hellik:
Replying to hellik:
I couldn't find anything on NSIS-side.
this seems to be the clue: with ExecWait the installer continues after run_gmkfontcap.bat has finished.
ExecWait '"$INSTALL_DIR\etc\run_gmkfontcap.bat"'tested locally. patch for submit to Grass65 for testing by the nightly builds?
Helmut
comment:21 by , 15 years ago
Replying to hellik:
Replying to hellik:
Replying to hellik:
I couldn't find anything on NSIS-side.
this seems to be the clue: with ExecWait the installer continues after run_gmkfontcap.bat has finished.
ExecWait '"$INSTALL_DIR\etc\run_gmkfontcap.bat"'tested locally. patch for submit to Grass65 for testing by the nightly builds?
Helmut
can this be closed now?
Helmut
comment:22 by , 15 years ago
Helmut:
can this be closed now?
sure.
Config -> Prefs -> Display -> Set Font
now gives you a choice of lots and lots of fonts.
Hamish
comment:23 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
'd.font -l' and 'd.font -L' also fail.
-> g.mkfontcap needs to be run as part of the WinGrass installer, or upon the first time you run grass.
Init.sh:
??
Hamish