瀏覽代碼

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 年之前
父節點
當前提交
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
 
 SCRIPT_ACTIONS = $(SCRIPT) $(ETCPYFILES) $(ETCPYCFILES) html scriptstrings
+ifdef MINGW
+SCRIPT_ACTIONS += $(BIN)/$(PGM).bat
+endif
 
 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
 
 install:

+ 1 - 0
scripts/windows_launch.bat

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