Changeset 37873
- Timestamp:
- Jun 13, 2009, 7:27:48 PM (15 years ago)
- Location:
- grass/trunk/lib/init
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
grass/trunk/lib/init/Makefile
r37863 r37873 32 32 FILES = \ 33 33 $(ARCH_BINDIR)/$(START_UP).sh \ 34 $(ARCH_BINDIR)/$(START_UP) \35 34 $(ETC)/Init.sh \ 36 35 $(ETC)/functions.sh \ … … 56 55 ifneq ($(strip $(MINGW)),) 57 56 FILES += \ 57 $(ARCH_BINDIR)/$(START_UP).py \ 58 58 $(ARCH_BINDIR)/$(START_UP).bat \ 59 59 $(ETC)/Init.bat 60 else 61 FILES += \ 62 $(ARCH_BINDIR)/$(START_UP) 63 60 64 endif 61 65 … … 76 80 chmod a+x $@ 77 81 82 ifneq ($(strip $(MINGW)),) 83 $(ARCH_BINDIR)/$(START_UP).py: grass.py 84 else 78 85 $(ARCH_BINDIR)/$(START_UP): grass.py 86 endif 79 87 rm -f $@ 80 88 sed \ 81 -e 's#@GISBASE@#$( GISBASE)#' \89 -e 's#@GISBASE@#$(RUN_GISBASE)#' \ 82 90 -e 's#@GRASS_VERSION_NUMBER@#$(GRASS_VERSION_NUMBER)#' \ 83 91 -e 's#@LD_LIBRARY_PATH_VAR@#$(LD_LIBRARY_PATH_VAR)#' \ -
grass/trunk/lib/init/grass.py
r37864 r37873 38 38 config_projshare = "@CONFIG_PROJSHARE@" 39 39 40 gisbase = os.path.normpath(gisbase) 41 40 42 tmpdir = None 41 43 lockfile = None … … 191 193 if not grass_gui: 192 194 # Check for a reference to the GRASS user interface in the grassrc file 193 kv = read_gisrc() 194 if 'GRASS_GUI' not in kv: 195 # Set the GRASS user interface to the default if needed 196 grass_gui = default_gui 195 if os.access(gisrc, os.R_OK): 196 kv = read_gisrc() 197 if 'GRASS_GUI' not in kv: 198 # Set the GRASS user interface to the default if needed 199 grass_gui = default_gui 197 200 else: 198 201 grass_gui = kv['GRASS_GUI'] 199 202 203 if not grass_gui: 204 grass_gui = default_gui 205 200 206 if grass_gui == 'gui': 201 207 grass_gui = default_gui … … 271 277 if not os.getenv('GRASS_PYTHON'): 272 278 if windows: 273 os.environ['GRASS_PYTHON'] = "python w.exe"279 os.environ['GRASS_PYTHON'] = "python.exe" 274 280 else: 275 281 os.environ['GRASS_PYTHON'] = "python" … … 320 326 321 327 def grass_intro(): 322 path = gfile("locale", locale, "etc", "grass_intro") 323 if not os.access(path, os.R_OK): 328 if locale: 329 path = gfile("locale", locale, "etc", "grass_intro") 330 if not os.access(path, os.R_OK): 331 path = gfile("etc", "grass_intro") 332 else: 324 333 path = gfile("etc", "grass_intro") 325 334 f = open(path, 'r') … … 583 592 # Check for gui interface 584 593 if grass_gui == "wxpython": 585 call([gfile("etc", "wxpython", " scripts", "wxgui")])594 call([gfile("etc", "wxpython", "wxgui.py")]) 586 595 587 596 def clear_screen(): … … 802 811 os.environ['GISBASE'] = gisbase 803 812 813 # set HOME 814 if windows and not os.getenv('HOME'): 815 os.environ['HOME'] = os.path.join(os.getenv('HOMEDRIVE'), os.getenv('HOMEPATH')) 816 804 817 atexit.register(cleanup) 805 818
Note:
See TracChangeset
for help on using the changeset viewer.
