aboutsummaryrefslogtreecommitdiff
path: root/lin_build.sh
diff options
context:
space:
mode:
authorSmallFox <2806143047@qq.com>2026-04-08 15:02:49 +0800
committerSmallFox <2806143047@qq.com>2026-04-08 15:02:49 +0800
commita4f2ef9fc0d3d5b941a982b265c68faad682f2d5 (patch)
tree5d4e44fd638c31efc30f0ad605fcd5de4030c9a3 /lin_build.sh
parent2eb16b22f8bb9e08fc690be09ab92b29f4911d3d (diff)
parent00c5ce748b56c672d2f4e796d3f0b263200f95f8 (diff)
Merge branch 'feat/linux-support'HEADmaster
Diffstat (limited to 'lin_build.sh')
-rwxr-xr-xlin_build.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/lin_build.sh b/lin_build.sh
new file mode 100755
index 0000000..f8f0b21
--- /dev/null
+++ b/lin_build.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# 检查 Mono 编译器是否存在
+if ! command -v mcs &> /dev/null; then
+ echo "ERROR: mcs command not found. Please install Mono."
+ exit 1
+fi
+
+cd "$(dirname "$0")/NotePad/NotePad/"
+
+mkdir -p bin/Linux
+
+# 使用 Mono 编译
+mcs \
+ -target:winexe \
+ -out:bin/Linux/NotePad.exe \
+ -r:System.Windows.Forms \
+ -r:System.Drawing \
+ -r:System \
+ -r:System.Data \
+ -r:System.Xml \
+ Form1.cs Form1.Designer.cs Program.cs
+
+if [ $? -eq 0 ]; then
+ echo "SUCCESS"
+else
+ echo "FAILED"
+ exit 1
+fi