Opened 9 years ago

Closed 9 years ago

#2784 closed defect (fixed)

add a g.mkfontcap run for OSGeo4W wingrass

Reported by: hellik Owned by: grass-dev@…
Priority: blocker Milestone: 7.0.2
Component: Display Version: svn-trunk
Keywords: g.mkfontcap Cc:
CPU: Unspecified Platform: MSWindows 7

Description

in C:\OSGeo4W\apps\grass\grass-7.0.2RC1\etc\fontcap

cyrilc|Cyrillic|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8|
gothgbt|Gothic Great Britain triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\gothgbt.hmp|0|utf-8|
gothgrt|Gothic German triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\gothgrt.hmp|0|utf-8|
gothitt|Gothic Italian triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\gothitt.hmp|0|utf-8|
greekc|Greek complex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\greekc.hmp|0|utf-8|
greekcs|Greek complex script|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\greekcs.hmp|0|utf-8|
greekp|Greek plain|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\greekp.hmp|0|utf-8|
greeks|Greek simplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\greeks.hmp|0|utf-8|
italicc|Italian complex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\italicc.hmp|0|utf-8|
italiccs|Italian complex small|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\italiccs.hmp|0|utf-8|
italict|Italian triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\italict.hmp|0|utf-8|
romanc|Roman complex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\romanc.hmp|0|utf-8|
romancs|Roman complex small|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\romancs.hmp|0|utf-8|
romand|Roman duplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\romand.hmp|0|utf-8|
romans|Roman simplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\romans.hmp|0|utf-8|
romant|Roman triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\romant.hmp|0|utf-8|
scriptc|Script complex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\scriptc.hmp|0|utf-8|
scripts|Script simplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\scripts.hmp|0|utf-8|

the font paths in OSGeo4W wingrass shows to the paths of the build server/environment and not to the local ones.

there is https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/osgeo4w/postinstall.bat

adding similar we do for the standalone installer:

    FileWrite $0 'rem #$\r$\n'
547	        FileWrite $0 'rem # Run g.mkfontcap outside a grass session during installation$\r$\n'
548	        FileWrite $0 'rem #$\r$\n'
549	        FileWrite $0 'rem #########################################################################$\r$\n'
550	        FileWrite $0 'echo Setup of WinGRASS-${VERSION_NUMBER}$\r$\n'
551	        FileWrite $0 'echo Generating the font configuration file by scanning various directories for fonts.$\r$\n'
552	        FileWrite $0 'echo Please wait. Console window will close automatically ....$\r$\n'
553	        FileWrite $0 '$\r$\n'
554	        FileWrite $0 'rem set gisbase$\r$\n'
555	        FileWrite $0 'set GISBASE=$INSTALL_DIR$\r$\n'
556	        FileWrite $0 '$\r$\n'
557	        FileWrite $0 'rem set path to freetype dll$\r$\n'
558	        FileWrite $0 'set FREETYPEBASE=$INSTALL_DIR\extrabin;$INSTALL_DIR\msys\bin;$INSTALL_DIR\lib$\r$\n'
559	        FileWrite $0 '$\r$\n'
560	        FileWrite $0 'rem set dependecies path$\r$\n'
561	        FileWrite $0 'set PATH=%FREETYPEBASE%;%PATH%$\r$\n'
562	        FileWrite $0 '$\r$\n'
563	        FileWrite $0 'rem GISRC must be set$\r$\n'
564	        FileWrite $0 'set GISRC=dummy$\r$\n'
565	        FileWrite $0 '$\r$\n'
566	        FileWrite $0 'rem run g.mkfontcap outside a grass session$\r$\n'
567	        FileWrite $0 '"%GISBASE%\bin\g.mkfontcap.exe" -o$\r$\n'

should solve this problem

Attachments (2)

postinstall.bat.patch (959 bytes ) - added by hellik 9 years ago.
patch for run g.mkfontcap in OSGeo4W-winGRASS-installation
postinstall.bat_new.patch (968 bytes ) - added by neteler 9 years ago.
new patch

Download all attachments as: .zip

Change History (24)

by hellik, 9 years ago

Attachment: postinstall.bat.patch added

patch for run g.mkfontcap in OSGeo4W-winGRASS-installation

in reply to:  description ; comment:1 by hellik, 9 years ago

Replying to hellik:

the font paths in OSGeo4W wingrass shows to the paths of the build server/environment and not to the local ones.

there is https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/osgeo4w/postinstall.bat

adding similar we do for the standalone installer:

    FileWrite $0 'rem #$\r$\n'
547	        FileWrite $0 'rem # Run g.mkfontcap outside a grass session during installation$\r$\n'
548	        FileWrite $0 'rem #$\r$\n'
549	        FileWrite $0 'rem #########################################################################$\r$\n'
550	        FileWrite $0 'echo Setup of WinGRASS-${VERSION_NUMBER}$\r$\n'
551	        FileWrite $0 'echo Generating the font configuration file by scanning various directories for fonts.$\r$\n'
552	        FileWrite $0 'echo Please wait. Console window will close automatically ....$\r$\n'
553	        FileWrite $0 '$\r$\n'
554	        FileWrite $0 'rem set gisbase$\r$\n'
555	        FileWrite $0 'set GISBASE=$INSTALL_DIR$\r$\n'
556	        FileWrite $0 '$\r$\n'
557	        FileWrite $0 'rem set path to freetype dll$\r$\n'
558	        FileWrite $0 'set FREETYPEBASE=$INSTALL_DIR\extrabin;$INSTALL_DIR\msys\bin;$INSTALL_DIR\lib$\r$\n'
559	        FileWrite $0 '$\r$\n'
560	        FileWrite $0 'rem set dependecies path$\r$\n'
561	        FileWrite $0 'set PATH=%FREETYPEBASE%;%PATH%$\r$\n'
562	        FileWrite $0 '$\r$\n'
563	        FileWrite $0 'rem GISRC must be set$\r$\n'
564	        FileWrite $0 'set GISRC=dummy$\r$\n'
565	        FileWrite $0 '$\r$\n'
566	        FileWrite $0 'rem run g.mkfontcap outside a grass session$\r$\n'
567	        FileWrite $0 '"%GISBASE%\bin\g.mkfontcap.exe" -o$\r$\n'

should solve this problem

patch for trunk accordingly above attached. reviewing welcome.

in reply to:  1 ; comment:2 by hellik, 9 years ago

Replying to hellik:

Replying to hellik:

patch for trunk accordingly above attached. reviewing welcome.

a quich chance for reviewing the patch, a new patch added (postinstall.bat_new.patch).

%OSGEO4W_ROOT% expands already with a trailing \

C:\>echo %OSGEO4W_ROOT%
C:\OSGeo4W\

tested the lines in postinstall.bat_new.patch locally here, it works. so the patch may be applied.

by neteler, 9 years ago

Attachment: postinstall.bat_new.patch added

new patch

comment:3 by neteler, 9 years ago

Priority: criticalblocker

in reply to:  2 ; comment:4 by hellik, 9 years ago

Replying to hellik:

Replying to hellik:

Replying to hellik:

patch for trunk accordingly above attached. reviewing welcome.

a quich chance for reviewing the patch, a new patch added (postinstall.bat_new.patch).

%OSGEO4W_ROOT% expands already with a trailing \

C:\>echo %OSGEO4W_ROOT%
C:\OSGeo4W\

tested the lines in postinstall.bat_new.patch locally here, it works. so the patch may be applied.

applied an slightly typo cleaned and prettified patch by r66691.

following file should be updated with the correct font paths.

C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\fontcap

please test upcoming OSGeo4W-winGRASS trunk dailies in the next days.

in reply to:  4 ; comment:5 by martinl, 9 years ago

Replying to hellik:

applied an slightly typo cleaned and prettified patch by r66691.

I tested build no. 106, I checked grass71.svn.bat.done and unfortunately I don't see any message that g.mkfontcap run during installation process.

comment:6 by martinl, 9 years ago

File fontcap in my osgeo4w installations (grass71svn and grass70svn) are identical. How it's is possible?

comment:7 by martinl, 9 years ago

Even fontcap for GRASS 7.0.2RC1 (OSGeo4W installation) contains Windows fonts like

AGENCYB|Agency FB Bold|1|C:\Windows\Fonts\AGENCYB.TTF|0|utf-8|
AGENCYR|Agency FB Regular|1|C:\Windows\Fonts\AGENCYR.TTF|0|utf-8|
ahronbd|Aharoni Bold|1|C:\Windows\Fonts\ahronbd.ttf|0|utf-8|
ALGER|Algerian Regular|1|C:\Windows\Fonts\ALGER.TTF|0|utf-8|
...

So it seems that g.mkfontcap is run somehow also here?

in reply to:  7 comment:8 by martinl, 9 years ago

Replying to martinl:

So it seems that g.mkfontcap is run somehow also here?

Ah, OK, these font's are part of osgeo4w package (so generated on the build server).

in reply to:  5 ; comment:9 by martinl, 9 years ago

Replying to martinl:

Replying to hellik:

applied an slightly typo cleaned and prettified patch by r66691.

I tested build no. 106, I checked grass71.svn.bat.done and unfortunately I don't see any message that g.mkfontcap run during installation process.

it seems that there are missing backslashes, attempt to fix it in r66704.

in reply to:  7 comment:10 by hellik, 9 years ago

Replying to martinl:

Even fontcap for GRASS 7.0.2RC1 (OSGeo4W installation) contains Windows fonts like

AGENCYB|Agency FB Bold|1|C:\Windows\Fonts\AGENCYB.TTF|0|utf-8|
AGENCYR|Agency FB Regular|1|C:\Windows\Fonts\AGENCYR.TTF|0|utf-8|
ahronbd|Aharoni Bold|1|C:\Windows\Fonts\ahronbd.ttf|0|utf-8|
ALGER|Algerian Regular|1|C:\Windows\Fonts\ALGER.TTF|0|utf-8|
...

So it seems that g.mkfontcap is run somehow also here?

its related to this fonts in

C:\OSGeo4W\apps\grass\grass-7.0.2RC1\etc\fontcap

cyrilc|Cyrillic|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8|
gothgbt|Gothic Great Britain triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\gothgbt.hmp|0|utf-8|
gothgrt|Gothic German triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\gothgrt.hmp|0|utf-8|
gothitt|Gothic Italian triplex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\gothitt.hmp|0|utf-8|
greekc|Greek complex|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\greekc.hmp|0|utf-8|
greekcs|Greek complex script|0|c:\osgeo4w\usr\src\grass702RC1\dist.i686-pc-mingw32\fonts\greekcs.hmp|0|utf-8|

in reply to:  9 comment:11 by hellik, 9 years ago

Replying to martinl:

Replying to martinl:

Replying to hellik:

applied an slightly typo cleaned and prettified patch by r66691.

I tested build no. 106, I checked grass71.svn.bat.done and unfortunately I don't see any message that g.mkfontcap run during installation process.

it seems that there are missing backslashes, attempt to fix it in r66704.

see https://trac.osgeo.org/grass/ticket/2784?replyto=9#comment:2

C:\>echo %OSGEO4W_ROOT%
C:\OSGeo4W\

%OSGEO4W_ROOT% comes here with a backslash at the end

in reply to:  5 comment:12 by hellik, 9 years ago

Replying to martinl:

Replying to hellik:

applied an slightly typo cleaned and prettified patch by r66691.

I tested build no. 106, I checked grass71.svn.bat.done and unfortunately I don't see any message that g.mkfontcap run during installation process.

tested here also build no. 106, what I can see:

  • g.mkfontcap seems to run, as in C:\OSGeo4W\apps\grass\grass-7.1.svn\etc file timestamps are all from ‎01. ‎November ‎2015 around ‏‎09:08:00, and fontcap is 02. ‎November ‎2015,

BUT

  • the content of fontcap seems not to be updated
cyrilc|Cyrillic|0|c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8|
gothgbt|Gothic Great Britain triplex|0|c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\fonts\gothgbt.hmp|0|utf-8|
gothgrt|Gothic German triplex|0|c:\osgeo4w\usr\src\grass_trunk\dist.i686-pc-mingw32\fonts\gothgrt.hmp|0|utf-8|
...

mmmhhhh

in reply to:  5 ; comment:13 by hellik, 9 years ago

Replying to martinl:

Replying to hellik:

applied an slightly typo cleaned and prettified patch by r66691.

I tested build no. 106, I checked grass71.svn.bat.done and unfortunately I don't see any message that g.mkfontcap run during installation process.

when I do following line in an OSGeo4W shell

C:\>set GISBASE=%OSGEO4W_ROOT%apps\grass\grass-7.1.svn

C:\>echo %GISBASE%
C:\OSGeo4W_use\apps\grass\grass-7.1.svn

C:\>set FREETYPEBASE=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\msys\bin;%GISBASE%\l
ib

C:\>echo %FREETYPEBASE%
C:\OSGeo4W_use\\bin;C:\OSGeo4W_use\\apps\msys\bin;C:\OSGeo4W_use\apps\grass\gras
s-7.1.svn\lib

C:\>set PATH=%FREETYPEBASE%;%PATH%

C:\>set GISRC=dummy

C:\>echo %GISRC%
dummy

C:\>"%GISBASE%\bin\g.mkfontcap.exe" -o

C:\>

I get an updated fontcap file:

C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\fontcap:

cyrilc|Cyrillic|0|C:\OSGeo4W\apps\grass\grass-7.1.svn\fonts\cyrilc.hmp|0|utf-8|
gothgbt|Gothic Great Britain triplex|0|C:\OSGeo4W\apps\grass\grass-7.1.svn\fonts\gothgbt.hmp|0|utf-8|
gothgrt|Gothic German triplex|0|C:\OSGeo4W\apps\grass\grass-7.1.svn\fonts\gothgrt.hmp|0|utf-8|
gothitt|Gothic Italian triplex|0|C:\OSGeo4W\apps\grass\grass-7.1.svn\fonts\gothitt.hmp|0|utf-8|
greekc|Greek complex|0|C:\OSGeo4W\apps\grass\grass-7.1.svn\fonts\greekc.hmp|0|utf-8|

any idea?

in reply to:  13 comment:14 by hellik, 9 years ago

Replying to hellik:

C:\>"%GISBASE%\bin\g.mkfontcap.exe" -o

C:\> }}} any idea?

maybe the whole command line in quotes?

"%GISBASE%\bin\g.mkfontcap.exe -o"

adding the few lines above in a bat file, e.g. C:\tmp\test.bat

and running this bat file in a OSGeo4W shell

"%GISBASE%\bin\g.mkfontcap.exe" -o

and

"%GISBASE%\bin\g.mkfontcap.exe -o"

both gives the same result of an updated fontcap file.

in reply to:  9 comment:15 by hellik, 9 years ago

Replying to martinl:

Replying to martinl:

Replying to hellik:

applied an slightly typo cleaned and prettified patch by r66691.

I tested build no. 106, I checked grass71.svn.bat.done and unfortunately I don't see any message that g.mkfontcap run during installation process.

it seems that there are missing backslashes, attempt to fix it in r66704.

looking at https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/osgeo4w/postinstall.bat

it seems you're are right with missing backslashes. e.g.

1	set ICON=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@\gui\icons\grass_osgeo.ico
2	set ICON_CMD=%OSGEO4W_ROOT%\apps\grass\grass-@VERSION@\gui\icons\grass_cmd.ico
3	set BATCH=%OSGEO4W_ROOT%\bin\@GRASS_EXECUTABLE@.bat 

so it seems there is difference between %OSGEO4W_ROOT% in a OSGeo4W shell and %OSGEO4W_ROOT% in an OSGeo4W install process.

comment:16 by martinl, 9 years ago

Please try out fresh extra build (no. 108). It seems to work.

in reply to:  16 ; comment:17 by hellik, 9 years ago

Resolution: fixed
Status: newclosed

Replying to martinl:

Please try out fresh extra build (no. 108). It seems to work.

yes. installation is delayed a little bit, but fonts paths are updated.

closing ticket.

in reply to:  17 ; comment:18 by neteler, 9 years ago

Keywords: g.mkfontcap added
Resolution: fixed
Status: closedreopened

Replying to hellik:

closing ticket.

Reopening because no backport done yet.

in reply to:  18 comment:19 by hellik, 9 years ago

Resolution: fixed
Status: reopenedclosed

Replying to neteler:

Replying to hellik:

closing ticket.

Reopening because no backport done yet.

done by

Date: 2015-11-02 06:04:19 -0800 (Mon, 02 Nov 2015) New Revision: 66715

Modified:

grass/branches/releasebranch_7_0/mswindows/osgeo4w/postinstall.bat

Log: postinstall.bat: sync with trunk to fix #2784

comment:20 by martinl, 9 years ago

Resolution: fixed
Status: closedreopened

Lets wait and test the next grass70svn build before closing...

in reply to:  20 comment:21 by martinl, 9 years ago

Replying to martinl:

Lets wait and test the next grass70svn build before closing...

it was too late yesterday, we are not providing daily builds of grass70svn ;-) So let's close after RC2.

comment:22 by martinl, 9 years ago

Resolution: fixed
Status: reopenedclosed

I tested 7.0.2RC2 osgeo4w package and it seems to work. Closing.

Note: See TracTickets for help on using tickets.