瀏覽代碼

Update build script to account for building on Cygwin

build.sh: add block for cygwin on windows
Christopher Nelson 4 年之前
父節點
當前提交
d6ad20fa6d
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      build.sh

+ 10 - 0
build.sh

@@ -21,6 +21,16 @@ elif [[ "$OSTYPE" == "msys" ]]; then
 	else
 		./txt2gam.exe glife.txt "${QSPFILE}" 1> /dev/null
 	fi
+elif [[ "$OSTYPE" == "cygwin" ]]; then
+	# Unsure if non-AMD CPUs give this or AMD64, tested on an actual AMD brand chip
+	# requires a python install visible to cygwin (for the txtmerge above)
+	if [[ "$PROCESSOR_ARCHITECTURE" == "x86_64" ]]; then
+		./txt2gam64.exe glife.txt "${QSPFILE}" 1> /dev/null
+	elif [[ "$PROCESSOR_ARCHITECTURE" == "AMD64" ]]; then
+		./txt2gam64.exe glife.txt "${QSPFILE}" 1> /dev/null
+	else
+		./txt2gam.exe glife.txt "${QSPFILE}" 1> /dev/null
+	fi
 fi
 if [ -d "${DESTDIR}" ]; then
 	cp --reflink=auto "${QSPFILE}" "${DESTDIR}"