Просмотр исходного кода

wingrass: produce bat files for scripts

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61136 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 лет назад
Родитель
Сommit
60209307e7
2 измененных файлов с 8 добавлено и 0 удалено
  1. 7 0
      include/Make/Script.make
  2. 1 0
      scripts/windows_launch.bat

+ 7 - 0
include/Make/Script.make

@@ -18,9 +18,16 @@ include $(MODULE_TOPDIR)/include/Make/Html.make
 include $(MODULE_TOPDIR)/include/Make/ScriptRules.make
 include $(MODULE_TOPDIR)/include/Make/ScriptRules.make
 
 
 SCRIPT_ACTIONS = $(SCRIPT) $(ETCPYFILES) $(ETCPYCFILES) html scriptstrings
 SCRIPT_ACTIONS = $(SCRIPT) $(ETCPYFILES) $(ETCPYCFILES) html scriptstrings
+ifdef MINGW
+SCRIPT_ACTIONS += $(BIN)/$(PGM).bat
+endif
 
 
 script: $(SCRIPT_ACTIONS)
 script: $(SCRIPT_ACTIONS)
 
 
+$(BIN)/$(PGM).bat: $(MODULE_TOPDIR)/scripts/windows_launch.bat
+	sed -e "s#SCRIPT_NAME#$(PGM)#" $(MODULE_TOPDIR)/scripts/windows_launch.bat > $@
+	unix2dos $@
+
 scriptstrings: $(STRINGDIR)/$(PGM)_to_translate.c
 scriptstrings: $(STRINGDIR)/$(PGM)_to_translate.c
 
 
 install:
 install:

+ 1 - 0
scripts/windows_launch.bat

@@ -0,0 +1 @@
+@"%GRASS_PYTHON%" "%GISBASE%/scripts/SCRIPT_NAME.py" %*