[GRASS-dev] Re: [GRASS GIS] #1178: WinGrass: g.extension - problem with path to $GISBASE

GRASS GIS trac at osgeo.org
Fri Oct 1 14:52:22 EDT 2010


#1178: WinGrass: g.extension - problem with path to $GISBASE
---------------------------------------------------------------+------------
 Reporter:  hellik                                             |       Owner:  grass-dev@…              
     Type:  defect                                             |      Status:  new                      
 Priority:  major                                              |   Milestone:  6.4.1                    
Component:  Installation                                       |     Version:  svn-releasebranch64      
 Keywords:  wingrass, g.extension, path, installation, addons  |    Platform:  MSWindows Vista          
      Cpu:  x86-32                                             |  
---------------------------------------------------------------+------------

Comment(by hellik):

 Replying to [comment:14 hellik]:
 >
 > {{{
 > ;Get the short form of the install path (to allow for paths with spaces)
 > VAR /GLOBAL INST_DIR_SHORT
 > GetFullPathName /SHORT $INST_DIR_SHORT $INSTALL_DIR
 > }}}
 >

 as information the reference from the nsis-manual
 http://nsis.sourceforge.net/Docs/Chapter4.html#4.9

 {{{
 4.9.3.9 GetFullPathName

 [/SHORT] user_var(output) path_or_file

 Assign to the user variable $x, the full path of the file specified. If
 the path portion of the parameter is not found, the error flag will be set
 and $x will be empty. If /SHORT is specified, the path is converted to the
 short filename form. However, if /SHORT is not specified, the path isn't
 converted to its long filename form. To get the long filename, call
 GetLongPathName using the System plug-in. Note that GetLongPathName is
 only available on Windows 98, Windows 2000 and above.

 StrCpy $INSTDIR $PROGRAMFILES\NSIS
 SetOutPath $INSTDIR
 GetFullPathName $0 ..
 DetailPrint $0 # will print C:\Program Files
 GetFullPathName /SHORT $0 $INSTDIR
 DetailPrint $0 # will print C:\Progra~1\NSIS

 StrCpy $0 C:\Progra~1\NSIS
 System::Call 'kernel32::GetLongPathName(t r0, t .r1, i ${NSIS_MAX_STRLEN})
 i .r2'
 StrCmp $2 error +2
 StrCpy $0 $1
 DetailPrint $0 # will print C:\Program Files\NSIS, where supported
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1178#comment:15>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list