From 9f4bec6ddf411674eb9b4817e3b50135919dba69 Mon Sep 17 00:00:00 2001 From: ystyle Date: Fri, 18 Jan 2019 18:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9E=84=E5=BB=BA=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- README.md | 3 ++- build.ps1 | 12 ++++++++++++ build.sh | 7 +++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 build.ps1 create mode 100644 build.sh diff --git a/.gitignore b/.gitignore index e39170e..a37b24f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea *.epub *.txt -*.exe \ No newline at end of file +*.exe +TmdTextEpub-* \ No newline at end of file diff --git a/README.md b/README.md index 1b9ec98..f5a0443 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,9 @@ Usage of TmdTextEpub.exe: ``` ### 示例 +1. [点击下载](https://github.com/ystyle/TmdTextEpub/releases) 1. 把小说和`TmdTextEpub.exe`放到`D`盘 -2. 按以下其中一种方法打开命令行 +1. 按以下其中一种方法打开命令行 - 按`win + r` 输入 `cmd` 然后输入以下命令 - 按`win + x + i` 输入以下命令 diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..51c3ccd --- /dev/null +++ b/build.ps1 @@ -0,0 +1,12 @@ +$env:GOOS="windows" +go build -ldflags "-s -w" -o TmdTextEpub.exe main.go + +$env:GOOS="linux" +go build -ldflags "-s -w" -o TmdTextEpub-linux main.go + +$env:GOOS="darwin" +go build -ldflags "-s -w" -o TmdTextEpub-darwin main.go + + +echo "done!" +Start-Sleep -Seconds 20 main.go \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..4b1dcea --- /dev/null +++ b/build.sh @@ -0,0 +1,7 @@ +GOOS=windows go build -ldflags "-s -w" -o TmdTextEpub.exe main.go + +GOOS=linux go build -ldflags "-s -w" -o TmdTextEpub-linux main.go + +GOOS=darwin go build -ldflags "-s -w" -o TmdTextEpub-darwin main.go + +echo "done!"