diff options
Diffstat (limited to 'lin_build.sh')
| -rwxr-xr-x | lin_build.sh | 29 |
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 |
