Repository: duolabmeng6/GoEasyDesigner
Branch: main
Commit: 956b2c2ee0b3
Files: 187
Total size: 972.8 KB
Directory structure:
gitextract_we96msoa/
├── .github/
│ ├── release-drafter.yml
│ ├── releasesText.md
│ └── workflows/
│ ├── debug.yml
│ ├── jekyll-gh-pages.yml
│ └── 发布软件.yml
├── .gitignore
├── .gitmodules
├── CNAME
├── GoEasyDesigner/
│ ├── .gitignore
│ ├── Dockerfile
│ ├── Terminal/
│ │ ├── Terminal_darwin.go
│ │ ├── Terminal_darwin_test.go
│ │ ├── Terminal_window.go
│ │ └── Terminal_window_test.go
│ ├── app.go
│ ├── build/
│ │ ├── README.md
│ │ ├── darwin/
│ │ │ ├── Info.dev.plist
│ │ │ └── Info.plist
│ │ ├── dmg.sh
│ │ └── windows/
│ │ ├── info.json
│ │ ├── installer/
│ │ │ ├── project.nsi
│ │ │ └── wails_tools.nsh
│ │ └── wails.exe.manifest
│ ├── docker-compose.yml
│ ├── frontend/
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── jsconfig.json
│ │ ├── package.json
│ │ ├── postcss.config.js
│ │ ├── public/
│ │ │ ├── 1.html
│ │ │ ├── cdn.tailwindcss.com_3.4.5.js
│ │ │ ├── font-awesome.css
│ │ │ ├── releases_latest.json
│ │ │ └── 自定义组件/
│ │ │ ├── ColorfulText/
│ │ │ │ ├── ColorfulText.js
│ │ │ │ ├── ColorfulText.vue
│ │ │ │ └── ColorfulTextAttr.vue
│ │ │ ├── TimeProgressBar/
│ │ │ │ ├── TimeProgressBar.js
│ │ │ │ ├── TimeProgressBar.vue
│ │ │ │ └── TimeProgressBarAttr.vue
│ │ │ ├── components.json
│ │ │ ├── 流光边框/
│ │ │ │ ├── 流光边框.js
│ │ │ │ ├── 流光边框.vue
│ │ │ │ └── 流光边框属性.vue
│ │ │ └── 登录框/
│ │ │ ├── 登录框.js
│ │ │ ├── 登录框.vue
│ │ │ └── 登录框属性.vue
│ │ ├── src/
│ │ │ ├── Helper.js
│ │ │ ├── action/
│ │ │ │ └── app.js
│ │ │ ├── app10.vue
│ │ │ ├── app11.vue
│ │ │ ├── assets/
│ │ │ │ ├── base.css
│ │ │ │ └── main.css
│ │ │ ├── components/
│ │ │ │ ├── RenderDesignComponent.vue
│ │ │ │ ├── RenderDesignComponentPreview.vue
│ │ │ │ ├── RenderDesignComponentWin.vue
│ │ │ │ ├── Shape.vue
│ │ │ │ ├── boxs/
│ │ │ │ │ ├── el/
│ │ │ │ │ │ ├── Button/
│ │ │ │ │ │ │ ├── Button.js
│ │ │ │ │ │ │ ├── Button.vue
│ │ │ │ │ │ │ └── ButtonAttr.vue
│ │ │ │ │ │ ├── CheckBox/
│ │ │ │ │ │ │ ├── CheckBox.js
│ │ │ │ │ │ │ ├── CheckBox.vue
│ │ │ │ │ │ │ └── CheckBoxAttr.vue
│ │ │ │ │ │ ├── CommonLayout/
│ │ │ │ │ │ │ ├── CommonLayout.js
│ │ │ │ │ │ │ ├── CommonLayout.vue
│ │ │ │ │ │ │ └── CommonLayoutAttr.vue
│ │ │ │ │ │ ├── Container/
│ │ │ │ │ │ │ ├── Container.js
│ │ │ │ │ │ │ └── ContainerAttr.vue
│ │ │ │ │ │ ├── ControlButton/
│ │ │ │ │ │ │ ├── ControlButton.js
│ │ │ │ │ │ │ ├── ControlButton.vue
│ │ │ │ │ │ │ └── ControlButtonAttr.vue
│ │ │ │ │ │ ├── CustomComponent/
│ │ │ │ │ │ │ ├── CustomComponent.js
│ │ │ │ │ │ │ ├── CustomComponent.vue
│ │ │ │ │ │ │ └── CustomComponentAttr.vue
│ │ │ │ │ │ ├── FlexLayout/
│ │ │ │ │ │ │ ├── FlexLayout.js
│ │ │ │ │ │ │ ├── FlexLayout.vue
│ │ │ │ │ │ │ └── FlexLayoutAttr.vue
│ │ │ │ │ │ ├── Label/
│ │ │ │ │ │ │ ├── Label.js
│ │ │ │ │ │ │ ├── Label.vue
│ │ │ │ │ │ │ └── LabelAttr.vue
│ │ │ │ │ │ ├── Menu/
│ │ │ │ │ │ │ ├── Menu.js
│ │ │ │ │ │ │ ├── Menu.vue
│ │ │ │ │ │ │ └── MenuAttr.vue
│ │ │ │ │ │ ├── ProgressBar/
│ │ │ │ │ │ │ ├── ProgressBar.js
│ │ │ │ │ │ │ ├── ProgressBar.vue
│ │ │ │ │ │ │ └── ProgressBarAttr.vue
│ │ │ │ │ │ ├── RadioButton/
│ │ │ │ │ │ │ ├── RadioButton.js
│ │ │ │ │ │ │ ├── RadioButton.vue
│ │ │ │ │ │ │ └── RadioButtonAttr.vue
│ │ │ │ │ │ ├── Switch/
│ │ │ │ │ │ │ ├── Switch.js
│ │ │ │ │ │ │ ├── Switch.vue
│ │ │ │ │ │ │ └── SwitchAttr.vue
│ │ │ │ │ │ ├── Table/
│ │ │ │ │ │ │ ├── Table.js
│ │ │ │ │ │ │ ├── Table.vue
│ │ │ │ │ │ │ └── TableAttr.vue
│ │ │ │ │ │ ├── Tabs/
│ │ │ │ │ │ │ ├── Tabs.js
│ │ │ │ │ │ │ ├── Tabs.vue
│ │ │ │ │ │ │ └── TabsAttr.vue
│ │ │ │ │ │ ├── TabsTW/
│ │ │ │ │ │ │ ├── TabsTW.js
│ │ │ │ │ │ │ ├── TabsTW.vue
│ │ │ │ │ │ │ ├── TabsTWAttr.vue
│ │ │ │ │ │ │ └── fontawesome_free_icon_names.js
│ │ │ │ │ │ ├── TextEdit/
│ │ │ │ │ │ │ ├── TextEdit.js
│ │ │ │ │ │ │ ├── TextEdit.vue
│ │ │ │ │ │ │ └── TextEditAttr.vue
│ │ │ │ │ │ ├── Tooltip/
│ │ │ │ │ │ │ ├── Tooltip.js
│ │ │ │ │ │ │ ├── Tooltip.vue
│ │ │ │ │ │ │ └── TooltipAttr.vue
│ │ │ │ │ │ └── Tree/
│ │ │ │ │ │ ├── Tree.js
│ │ │ │ │ │ ├── Tree.vue
│ │ │ │ │ │ └── TreeAttr.vue
│ │ │ │ │ ├── td/
│ │ │ │ │ │ ├── Button/
│ │ │ │ │ │ │ ├── Button.js
│ │ │ │ │ │ │ ├── Button.vue
│ │ │ │ │ │ │ └── ButtonAttr.vue
│ │ │ │ │ │ ├── Link/
│ │ │ │ │ │ │ ├── Link.js
│ │ │ │ │ │ │ ├── Link.vue
│ │ │ │ │ │ │ └── LinkAttr.vue
│ │ │ │ │ │ ├── Progress/
│ │ │ │ │ │ │ ├── Progress.js
│ │ │ │ │ │ │ ├── Progress.vue
│ │ │ │ │ │ │ └── ProgressAttr.vue
│ │ │ │ │ │ ├── Select/
│ │ │ │ │ │ │ ├── Select.js
│ │ │ │ │ │ │ ├── Select.vue
│ │ │ │ │ │ │ └── SelectAttr.vue
│ │ │ │ │ │ └── Switch/
│ │ │ │ │ │ ├── Switch.js
│ │ │ │ │ │ ├── Switch.vue
│ │ │ │ │ │ └── SwitchAttr.vue
│ │ │ │ │ └── tw/
│ │ │ │ │ └── Button/
│ │ │ │ │ ├── Button.js
│ │ │ │ │ ├── Button.vue
│ │ │ │ │ └── ButtonAttr.vue
│ │ │ │ ├── common/
│ │ │ │ │ └── IconSelector.vue
│ │ │ │ └── designer/
│ │ │ │ ├── PreviewDialog.vue
│ │ │ │ ├── header/
│ │ │ │ │ └── ToolBtn.vue
│ │ │ │ ├── left/
│ │ │ │ │ ├── ComponentLeft.vue
│ │ │ │ │ ├── PropertyTable.vue
│ │ │ │ │ └── TreeSelectBox.vue
│ │ │ │ └── public/
│ │ │ │ ├── DraggableDivider.vue
│ │ │ │ ├── WindowAttr.vue
│ │ │ │ ├── common-event-component.vue
│ │ │ │ ├── common-properties.vue
│ │ │ │ ├── 代码编辑器.vue
│ │ │ │ ├── 支持库.vue
│ │ │ │ ├── 新建项目对话框.vue
│ │ │ │ ├── 项目管理.vue
│ │ │ │ └── 项目配置对话框.vue
│ │ │ ├── helpDoc/
│ │ │ │ └── systemFcDoc.json
│ │ │ ├── i18n/
│ │ │ │ ├── index.js
│ │ │ │ └── locales/
│ │ │ │ ├── en.json
│ │ │ │ └── zh-Hans.json
│ │ │ ├── main.js
│ │ │ ├── public.js
│ │ │ ├── stores/
│ │ │ │ ├── HistoryManager.js
│ │ │ │ └── appStore.js
│ │ │ ├── update_github_latest_releases.sh
│ │ │ ├── 提示语法生成器.js
│ │ │ ├── 测试代码编辑器.vue
│ │ │ ├── 编辑器/
│ │ │ │ ├── 窗口事件代码模板.js
│ │ │ │ ├── 编辑器提示数据.js
│ │ │ │ └── 编辑器语法文件.js
│ │ │ └── 编辑的语法提示.js
│ │ ├── tailwind.config.js
│ │ ├── vite.config.js
│ │ └── wailsjs/
│ │ ├── go/
│ │ │ └── main/
│ │ │ ├── App.d.ts
│ │ │ └── App.js
│ │ └── runtime/
│ │ ├── package.json
│ │ ├── runtime.d.ts
│ │ └── runtime.js
│ ├── go.mod
│ ├── go.sum
│ ├── main.go
│ ├── myfunc/
│ │ ├── myfunc.go
│ │ └── myfunc_test.go
│ ├── mymodel/
│ │ ├── Version.go
│ │ ├── git项目操作.go
│ │ ├── git项目操作_test.go
│ │ ├── 文件监视模块.go
│ │ ├── 文件监视模块_test.go
│ │ ├── 自动更新模块.go
│ │ └── 自动更新模块_test.go
│ ├── ssh_nginx/
│ │ ├── Caddyfile
│ │ ├── default.conf
│ │ └── docker-compose.yml
│ └── wails.json
├── LICENSE
├── QtEsayDesigner IDE插件.jar
├── README.md
├── README.zh-Hans.md
├── script/
│ └── main.go
└── tool/
└── 一键环境配置.e
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/release-drafter.yml
================================================
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 新功能'
labels:
- '新功能'
- title: '🐛 Bug 修复'
labels:
- 'bug'
- title: '🧰 日常维护'
label: '日常维护'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
# GoEasyDesigner 窗口设计师
* 基于 go 语言 使用 wails框架, 支持 window macos linux 等系统.
$CHANGES
no-changes-template: |
快下载体验~
================================================
FILE: .github/releasesText.md
================================================
# GoEasyDesigner 窗口设计师
奋斗了{{用了多少时间}},本次更新内容如下:
{{最新发布信息}}
{{变更内容}}
================================================
FILE: .github/workflows/debug.yml
================================================
name: WailsBuild
on:
workflow_dispatch:
# push:
# paths-ignore:
# - '**/*.md'
# - '**/*.yml'
# - .gitignore
# - .editorconfig
# - appveyor.yml
# - 'azure-pipelines*.yml'
# - 'ci/azure-pipelines/template*.yml'
pull_request:
paths-ignore:
- '**/*.md'
- .gitignore
- .editorconfig
- appveyor.yml
- 'azure-pipelines*.yml'
- 'ci/azure-pipelines/template*.yml'
jobs:
build-windows:
timeout-minutes: 20
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
C:\npm\cache
key: ${{ runner.os }}-js-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-js-
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.21.0'
cache-dependency-path: |
**/go.sum
**/go.mod
go-version-file: 'go.mod'
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
#- name: install webview2
# run: |
# npm config get cache
# choco install webview2-runtime
#- name: garble
# run: go install mvdan.cc/garble@latest
#- name: nsis
# run: choco install nsis
#- name: upx
# run: choco install upx
- name: build
run: |
cd GoEasyDesigner
wails build -debug
- uses: actions/upload-artifact@v3
with:
name: debug-${{ runner.os }}
path: GoEasyDesigner/build/bin/GoEasyDesigner.exe
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
/home/runner/.npm
key: ${{ runner.os }}-js-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-js-
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.21.0'
cache-dependency-path: |
**/go.sum
**/go.mod
go-version-file: 'go.mod'
- name: Install linux dependencies
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
#- name: garble
# run: go install mvdan.cc/garble@latest
#- name: nsis
# run: apt install nsis
#- name: upx
# run: apt install upx
- name: build
run: |
npm config get cache
cd GoEasyDesigner
wails build -debug
- uses: actions/upload-artifact@v3
with:
name: debug-${{ runner.os }}
path: GoEasyDesigner/build/bin/GoEasyDesigner
build-MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
/Users/runner/.npm
key: ${{ runner.os }}-js-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-js-
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.21.0'
cache-dependency-path: |
**/go.sum
**/go.mod
go-version-file: 'go.mod'
- name: install wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
#- name: garble
# run: go install mvdan.cc/garble@latest
#- name: nsis
# run: apt install nsis
#- name: upx
# run: apt install upx
- name: build
run: |
npm config get cache
cd GoEasyDesigner
wails build -debug
- uses: actions/upload-artifact@v3
with:
name: debug-${{ runner.os }}
path: GoEasyDesigner/build/bin/GoEasyDesigner.app
================================================
FILE: .github/workflows/jekyll-gh-pages.yml
================================================
name: 部署 GitHub Pages
on:
# Runs on pushes targeting the default branch
# push:
# branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# push:
# paths-ignore:
# - '**/*.md'
# - '**/*.yml'
# - .gitignore
# - .editorconfig
# workflow_run:
# workflows: ["发布软件"]
# types:
# - completed
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- uses: actions/cache@v3
with:
path: |
/home/runner/.npm
key: ${{ runner.os }}-js-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-js-
- name: install
run: |
cd GoEasyDesigner/frontend/src
./update_github_latest_releases.sh
cd ../
npm i
npm run build
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./GoEasyDesigner/frontend/dist
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
- name: Deploy file
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
with:
server: ${{ secrets.FTP_SERVER }}
port: ${{ secrets.FTP_PORT }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local_path: './GoEasyDesigner/frontend/dist/*'
remote_path: '/config/www'
sftp_only: true
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
================================================
FILE: .github/workflows/发布软件.yml
================================================
name: 发布软件
on:
workflow_dispatch:
push:
paths-ignore:
- '**/*.md'
- '**/*.yml'
- .gitignore
- .editorconfig
permissions: write-all # 给所有工作写权限
jobs:
jobs_v:
name: 构建版本号和变更信息
runs-on: ubuntu-latest
outputs:
version: ${{ steps.create_version.outputs.NewVersion }} # 版本号
body: ${{ steps.create_body.outputs.Body }} # 版本变更内容
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: 检查是否 "发布"
run: |
latest_commit_message=$(git log -1 --pretty=%B)
if [[ $latest_commit_message == *"发布"* ]]; then
echo "找到发布关键字继续工作流"
else
echo "没有找到发布关键字停止工作流"
exit 1 # 停止工作流程
fi
- name: 递增版本号
id: create_version
uses: duolabmeng6/action-autotag-python@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 获取更新日志
id: create_body
uses: duolabmeng6/action-Releases-log@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILE: .github/releasesText.md
KEYS: bug,改进,优化,新增,删除
- name: 查看版本号和更新日志
run: |
echo ${{ format('version={0}', steps.create_version.outputs.NewVersion ) }}
echo "${{ steps.create_body.outputs.Body }}"
jobs_macos:
# 暂停
#if: false
needs: [ jobs_v ]
name: 构建macos软件
runs-on: macos-latest
env:
version: ${{ needs.jobs_v.outputs.version }}
body: ${{ needs.jobs_v.outputs.Body }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: 构建缓存
uses: actions/cache@v4
with:
path: |
/Users/runner/.npm
key: ${{ runner.os }}-js-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-js-
- name: 查看文件
run: |
pwd
ls -la
echo "New Body: ${{ env.body }}"
- name: 安装 go
uses: actions/setup-go@v4
with:
go-version: '^1.23.8'
cache-dependency-path: |
**/go.sum
**/go.mod
go-version-file: 'go.mod'
- name: 安装 pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- run: go version
- name: 安装 wails 工具
run: |
go install github.com/wailsapp/wails/v2/cmd/wails@latest
wails
- name: 生成 Version.go 文件
run: |
echo -e "package mymodel\n\nvar Version = \"${version}\"" > GoEasyDesigner/mymodel/Version.go
cat GoEasyDesigner/mymodel/Version.go
- name: 编译
run: |
pwd
cd GoEasyDesigner
wails build
ls -la
- name: 查看编译的文件保存
run: |
ls -la
mkdir -p /tmp/artifacts
cp -r GoEasyDesigner/build/bin/GoEasyDesigner.app /tmp/artifacts/GoEasyDesigner.app
cp -r GoEasyDesigner/build/dmg.sh /tmp/artifacts/dmg.sh
chmod +x /tmp/artifacts/GoEasyDesigner.app/Contents/MacOS/GoEasyDesigner
- name: 创建压缩包
run: |
cd /tmp/artifacts/
./dmg.sh
zip -r ./GoEasyDesigner_MacOS.zip ./GoEasyDesigner.app
- name: 上传产物
uses: actions/upload-artifact@v4
with:
name: macos
path: |
/tmp/artifacts/*.zip
/tmp/artifacts/*.dmg
jobs_window:
needs: jobs_v # 等待 jobs_v 任务完成才执行
name: 构建window软件
timeout-minutes: 20
runs-on: windows-latest
env:
version: ${{ needs.jobs_v.outputs.version }}
body: ${{ needs.jobs_v.outputs.Body }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: 构建缓存
uses: actions/cache@v4
with:
path: |
C:\npm\cache
key: ${{ runner.os }}-js-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-js-
- name: 读入环境信息
run: |
echo ${{ format('version {0}', env.version ) }} # 版本号
- name: 安装 go
uses: actions/setup-go@v4
with:
go-version: '^1.23.8'
cache-dependency-path: |
**/go.sum
**/go.mod
go-version-file: 'go.mod'
- name: 安装 pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- run: go version
- name: 安装 UPX
uses: crazy-max/ghaction-upx@v2
with:
install-only: true
- name: 安装 wails 工具
run: |
go install github.com/wailsapp/wails/v2/cmd/wails@latest
wails
- name: 生成 Version.go 文件
shell: bash
run: |
echo -e "package mymodel\n\nvar Version = \"${version}\"" > GoEasyDesigner/mymodel/Version.go
cat GoEasyDesigner/mymodel/Version.go
- name: 编译exe
run: |
cd GoEasyDesigner
wails build -webview2 embed -upx
ls
- name: 上传产物
uses: actions/upload-artifact@v4
with:
name: window
path: |
GoEasyDesigner/build/bin/*.exe
jobs4:
needs: [ jobs_v,jobs_macos,jobs_window ]
name: 发布版本
runs-on: ubuntu-latest
env:
version: ${{ needs.jobs_v.outputs.version }}
body: ${{ needs.jobs_v.outputs.Body }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: 下载产物
id: download
uses: actions/download-artifact@v4
with:
path: ./
- name: 读入环境信息
run: |
echo ${{ format('version {0}', env.version ) }}
echo ${{steps.download.outputs.download-path}}
ls -R
- name: 发布文件
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true # 覆盖文件
#draft: true # 草稿 自己可见 版本号会保持一样 默认是自动发布 latest
#prerelease: true # 预发布 别人可以看到 版本号会继续加
tag: ${{ env.version }} # 版本号 v0.1.0
body: ${{ env.body }}
artifacts: "macos/*.zip,macos/*.dmg,window/*.exe,window/*.zip"
================================================
FILE: .gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.vscode
*.lockb
GoEasyDesigner/frontend/package.json.md5
package-lock.json
package.json.md5
wails-demo/frontend/package.json.md5
wails-demo/frontend/package-lock.json
GoEasyDesigner/ssh_nginx/.env
================================================
FILE: .gitmodules
================================================
[submodule "go-easy-demo"]
path = go-easy-demo
url = https://github.com/duolabmeng6/wails-template-vue-go-easy
================================================
FILE: CNAME
================================================
ggg.yx24.me
================================================
FILE: GoEasyDesigner/.gitignore
================================================
build/bin
node_modules
frontend/dist
================================================
FILE: GoEasyDesigner/Dockerfile
================================================
FROM node:18-alpine
WORKDIR /app
COPY ./frontend .
RUN npm install --registry=http://registry.npmmirror.com
RUN npm run build
# docker build -t my-node-app .
# docker run -v ./frontend:/app -p 3000:3000 -it --rm --name my-running-app my-node-app /bin/sh
FROM nginx:alpine-slim
COPY --from=0 /app/dist /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3005
================================================
FILE: GoEasyDesigner/Terminal/Terminal_darwin.go
================================================
//go:build darwin
// +build darwin
package Terminal
import (
"bufio"
"errors"
"fmt"
"os/exec"
"sync"
"syscall"
)
type Terminal struct {
cmd *exec.Cmd
stdout *bufio.Scanner
isRunning bool
isDone bool
lock sync.Mutex
}
func NewTerminal() *Terminal {
return &Terminal{}
}
func (t *Terminal) StartCommand(command string, fn func(string, error)) bool {
t.lock.Lock()
defer t.lock.Unlock()
if t.isRunning {
fn("", fmt.Errorf("已有命令在运行"))
return false
}
cmd := exec.Command("bash", "-c", command)
cmd.SysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}
stdout, err := cmd.StdoutPipe()
if err != nil {
fn("", err)
return false
}
if err := cmd.Start(); err != nil {
fn("", err)
return false
}
t.cmd = cmd
t.stdout = bufio.NewScanner(stdout)
t.isRunning = true
go func() {
for t.stdout.Scan() {
output := t.stdout.Text()
fn(output, nil)
}
if err := t.stdout.Err(); err != nil {
fn("", err)
}
t.lock.Lock()
t.isRunning = false
t.isDone = true
t.lock.Unlock()
}()
go func() {
cmd.Wait()
t.lock.Lock()
t.isRunning = false
t.lock.Unlock()
println("命令已完成")
fn("", errors.New("命令已完成"))
}()
return true
}
func (t *Terminal) StopCommand() {
t.lock.Lock()
defer t.lock.Unlock()
if t.isRunning {
err := syscall.Kill(-t.cmd.Process.Pid, syscall.SIGKILL)
if err != nil {
return
}
}
}
func (t *Terminal) StopCommand2() {
t.lock.Lock()
defer t.lock.Unlock()
//发送 ctrl + c 的信号 让程序平稳的退出
// 向进程发送Ctrl+C信号
process := t.cmd.Process
if process != nil {
//err := process.Signal(syscall.SIGHUP)
err := syscall.Kill(-t.cmd.Process.Pid, syscall.SIGTERM)
if err != nil {
// 处理错误
}
}
}
func (t *Terminal) IsCommandDone() bool {
t.lock.Lock()
defer t.lock.Unlock()
return t.isDone
}
================================================
FILE: GoEasyDesigner/Terminal/Terminal_darwin_test.go
================================================
package Terminal
import (
"testing"
"time"
)
func TestNewTerminalMac(t *testing.T) {
terminal := NewTerminal()
if terminal == nil {
t.Error("NewTerminalWindow() failed")
}
//
命令 := `
cd /Users/ll/Documents/GitHub/GoEasyDesigner/wails-demo/frontend
npm run dev
`
terminal.StartCommand(命令, func(output string, err error) {
if err != nil {
print("err:", output)
print("err2:", err.Error())
//t.Error(err.Error())
}
println(output)
})
time.Sleep(3 * time.Second)
terminal.StopCommand2()
println("停止命令2")
time.Sleep(10 * time.Second)
terminal.StopCommand()
println("停止命令1")
}
================================================
FILE: GoEasyDesigner/Terminal/Terminal_window.go
================================================
//go:build windows
// +build windows
package Terminal
import (
"bufio"
"errors"
"fmt"
"github.com/duolabmeng6/goefun/ecore"
"os/exec"
"sync"
"syscall"
)
type Terminal struct {
cmd *exec.Cmd
stdout *bufio.Scanner
isRunning bool
isDone bool
lock sync.Mutex
}
func NewTerminal() *Terminal {
return &Terminal{}
}
func (t *Terminal) StartCommand(command string, fn func(string, error)) bool {
t.lock.Lock()
defer t.lock.Unlock()
if t.isRunning {
fn("", fmt.Errorf("已有命令在运行"))
return false
}
cmd := exec.Command("cmd", "/C", command)
// 隐藏黑色窗口
// For Windows, use Start instead of Run to hide the console window
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
stdout, err := cmd.StdoutPipe()
if err != nil {
fn("", err)
return false
}
if err := cmd.Start(); err != nil {
fn("", err)
return false
}
t.cmd = cmd
t.stdout = bufio.NewScanner(stdout)
t.isRunning = true
go func() {
for t.stdout.Scan() {
output := t.stdout.Text()
output = ecore.E文本编码转换(output, "", "utf8")
fn(output, nil)
}
if err := t.stdout.Err(); err != nil {
fn("", err)
}
t.lock.Lock()
t.isRunning = false
t.isDone = true
t.lock.Unlock()
}()
go func() {
cmd.Wait()
t.lock.Lock()
t.isRunning = false
t.lock.Unlock()
println("命令已完成")
fn("", errors.New("命令已完成"))
}()
return true
}
func (t *Terminal) StopCommand() {
t.lock.Lock()
defer t.lock.Unlock()
if t.isRunning {
if err := t.cmd.Process.Kill(); err != nil {
fmt.Println("无法终止命令:", err)
}
}
}
func (t *Terminal) IsCommandDone() bool {
t.lock.Lock()
defer t.lock.Unlock()
return t.isDone
}
================================================
FILE: GoEasyDesigner/Terminal/Terminal_window_test.go
================================================
package Terminal
import (
"testing"
"time"
)
func TestNewTerminalWindow(t *testing.T) {
terminal := NewTerminal()
if terminal == nil {
t.Error("NewTerminalWindow() failed")
}
//
命令 := `
set PATH=%PATH%;C:\Users\l\go\bin
set PATH=%PATH%;C:\Users\l\go\go1.21.0\bin
set PATH=%PATH%;C:\Program Files\nodejs
set PATH=%PATH%;C:\Program Files\nodejs\node_modules\npm\bin
wails
`
terminal.StartCommand(命令, func(output string, err error) {
if err != nil {
t.Error(err.Error())
}
println(output)
})
time.Sleep(3 * time.Second)
}
================================================
FILE: GoEasyDesigner/app.go
================================================
package main
import (
"changeme/Terminal"
"changeme/myfunc"
"changeme/mymodel"
"context"
"fmt"
"github.com/duolabmeng6/goefun/ecore"
"github.com/wailsapp/wails/v2/pkg/runtime"
"log"
"os"
"regexp"
)
// App struct
type App struct {
ctx context.Context
//terminal *TerminalWin.TerminalWin
terminal *Terminal.Terminal
IDE插件端口号 string
S设计文件路径 string
文件监视 *mymodel.E文件监视模块
}
// NewApp creates a new App application struct
func NewApp() *App {
a := &App{}
a.文件监视, _ = mymodel.New文件监视模块()
go func() {
a.文件监视.E开始()
}()
return a
}
// startup is called when the app starts. The context is saved
// so we can call the runtime methods
func (a *App) startup(ctx context.Context) {
a.ctx = ctx
}
// Greet returns a greeting for the given name
func (a *App) Greet(name string) string {
return fmt.Sprintf("Hello %s, It's show time!", name)
}
func (a *App) E取配置信息() string {
data := map[string]string{
"IDE插件端口号": a.IDE插件端口号,
"设计文件路径": a.S设计文件路径,
"Version": mymodel.Version,
}
return ecore.E到文本(data)
}
func (a *App) E保存(设计文件路径 string, 保存内容 string) string {
// println("保存", 设计文件路径, 保存内容)
// 把文件保存到指定路径
os.WriteFile(设计文件路径, []byte(保存内容), 0644)
return "保存成功"
}
func (a *App) E创建函数(窗口事件文件路径 string, 插入函数 string, 插件URL地址 string) string {
println("保存", 窗口事件文件路径, 插入函数)
// 把文件保存到指定路径
//os.WriteFile(设计文件路径, []byte(保存内容), 0644)
//读入文件
data, err := os.ReadFile(窗口事件文件路径)
if err != nil {
return "读入文件失败"
}
新内容 := myfunc.InsertCode(string(data), 插入函数)
os.WriteFile(窗口事件文件路径, []byte(新内容), 0644)
if 插件URL地址 == "" {
return "保存成功"
}
//插件URL地址 := "http://127.0.0.1:13403"
跳转位置 := ecore.E寻找文本(新内容, 插入函数, 0, false)
println("新内容", 新内容)
println("插入函数", 插入函数)
println("跳转位置", 跳转位置)
myfunc.E发送跳转代码到ide(插件URL地址, 窗口事件文件路径, 跳转位置)
return "保存成功"
}
func (a *App) E发送跳转代码到ide(插件URL地址 string, 窗口事件文件路径 string, 跳转位置 int) bool {
return myfunc.E发送跳转代码到ide(插件URL地址, 窗口事件文件路径, 跳转位置)
}
func (a *App) E发送跳转代码到ide_命令行方式(ide string, 文件路径 string, 跳转字符串 string) bool {
return myfunc.E发送跳转代码到ide_命令行方式(ide, 文件路径, 跳转字符串)
}
func (a *App) E打开文件对话框() string {
println("E打开文件对话框")
result, err := runtime.OpenFileDialog(a.ctx, runtime.OpenDialogOptions{
Title: "打开文件",
})
if err != nil {
return ""
}
return result
}
func (a *App) E保存件对话框() string {
println("E保存件对话框")
result, err := runtime.SaveFileDialog(a.ctx, runtime.SaveDialogOptions{
Title: "保存文件",
DefaultFilename: "design.json",
})
if err != nil {
return ""
}
return result
}
func (a *App) E读入文件(文件路径 string) string {
return ecore.E读入文本(文件路径)
}
func (a *App) E文件枚举(目录 string) []string {
var files []string
_ = ecore.E文件枚举(目录, ".js|.json", &files, true, false)
return files
}
func (a *App) E运行命令(项目根目录 string, 执行命令 string) string {
//项目根目录 := "/Users/ll/Documents/GitHub/GoEasyDesigner/wails-demo"
//执行命令 := "wails dev"
// 命令 := "cd " + 项目根目录 + " && " + 执行命令
// runtime.EventsEmit(a.ctx, "运行命令", "开始运行 "+命令)
// result := myfunc.E运行命令(项目根目录, 执行命令, func(回显内容 string) {
// println("回显内容", 回显内容)
// regex := regexp.MustCompile("\x1b\\[[0-9;]*m")
// cleaned := regex.ReplaceAllString(回显内容, "")
// runtime.EventsEmit(a.ctx, "运行命令", cleaned)
// })
//a.terminal = TerminalWin.NewTerminalWin()
a.terminal = Terminal.NewTerminal()
命令 := "cd " + 项目根目录 + " && " + 执行命令
runtime.EventsEmit(a.ctx, "运行命令", "开始运行 "+命令)
a.terminal.StartCommand(命令, func(output string, err error) {
if err != nil {
log.Println("命令执行错误:", err)
if err.Error() == "命令已完成" {
runtime.EventsEmit(a.ctx, "运行命令", err.Error())
} else {
runtime.EventsEmit(a.ctx, "运行命令", "报错:"+err.Error())
}
} else {
println("回显内容", output)
regex := regexp.MustCompile("\x1b\\[[0-9;]*m")
cleaned := regex.ReplaceAllString(output, "")
runtime.EventsEmit(a.ctx, "运行命令", cleaned)
}
})
return "运行命令成功"
}
func (a *App) E停止命令() string {
a.terminal.StopCommand()
return "停止命令成功"
}
func (a *App) E检查更新() string {
if myfunc.E是否为macOS系统() {
mymodel.E检查更新_Mac()
}
if myfunc.E是否为window系统() {
mymodel.E检查更新_window()
}
return "检查更新"
}
func (a *App) E取文件修改时间(文件路径 string) string {
// 获取文件最新的修改时间
文件信息, err := os.Stat(文件路径)
if err != nil {
return ""
}
//转换为时间戳
时间戳 := 文件信息.ModTime().Unix()
return fmt.Sprintf("%d", 时间戳)
}
func (a *App) E添加文件监视(文件路径 string) string {
a.文件监视.E添加监视文件(文件路径, func(文件路径 string) {
println("文件被修改,触发处理函数:", 文件路径)
// 在这里可以添加通知你的程序的逻辑
runtime.EventsEmit(a.ctx, "文件被修改", 文件路径)
})
return "添加文件监视"
}
func (a *App) E清空文件监视() string {
a.文件监视.E清空()
return "清空文件监视"
}
func (a *App) E打开选择文件夹对话框() string {
println("E打开选择文件夹对话框")
result, err := runtime.OpenDirectoryDialog(a.ctx, runtime.OpenDialogOptions{
Title: "选择文件夹",
})
if err != nil {
return ""
}
return result
}
func (a *App) E取当前目录() string {
return ecore.E取当前目录()
}
func (a *App) E下载github项目(github项目地址 string, 保存目录 string) string {
err := mymodel.E下载github项目(github项目地址, 保存目录)
if err != nil {
return err.Error()
}
return "success"
}
func (a *App) E文件是否存在(路径 string) bool {
return ecore.E文件是否存在(路径)
}
func (a *App) E搜索文件(路径 string, 文件名 string) []string {
//func E文件枚举(欲寻找的目录 string, 欲寻找的文件名 string, files *[]string, 是否带路径 bool, 是否遍历子目录 bool) error {
var files []string
ecore.E文件枚举(路径, 文件名, &files, true, true)
//for _, v := range files {
// println(v)
//}
return files
}
func (a *App) E取运行目录() string {
return ecore.E取运行目录()
}
================================================
FILE: GoEasyDesigner/build/README.md
================================================
# Build Directory
The build directory is used to house all the build files and assets for your application.
The structure is:
* bin - Output directory
* darwin - macOS specific files
* windows - Windows specific files
## Mac
The `darwin` directory holds files specific to Mac builds.
These may be customised and used as part of the build. To return these files to the default state, simply delete them
and
build with `wails build`.
The directory contains the following files:
- `Info.plist` - the main plist file used for Mac builds. It is used when building using `wails build`.
- `Info.dev.plist` - same as the main plist file but used when building using `wails dev`.
## Windows
The `windows` directory contains the manifest and rc files used when building with `wails build`.
These may be customised for your application. To return these files to the default state, simply delete them and
build with `wails build`.
- `icon.ico` - The icon used for the application. This is used when building using `wails build`. If you wish to
use a different icon, simply replace this file with your own. If it is missing, a new `icon.ico` file
will be created using the `appicon.png` file in the build directory.
- `installer/*` - The files used to create the Windows installer. These are used when building using `wails build`.
- `info.json` - Application details used for Windows builds. The data here will be used by the Windows installer,
as well as the application itself (right click the exe -> properties -> details)
- `wails.exe.manifest` - The main application manifest file.
================================================
FILE: GoEasyDesigner/build/darwin/Info.dev.plist
================================================
CFBundlePackageType
APPL
CFBundleName
{{.Info.ProductName}}
CFBundleExecutable
{{.Name}}
CFBundleIdentifier
com.wails.{{.Name}}
CFBundleVersion
{{.Info.ProductVersion}}
CFBundleGetInfoString
{{.Info.Comments}}
CFBundleShortVersionString
{{.Info.ProductVersion}}
CFBundleIconFile
iconfile
LSMinimumSystemVersion
10.13.0
NSHighResolutionCapable
true
NSHumanReadableCopyright
{{.Info.Copyright}}
NSAppTransportSecurity
NSAllowsLocalNetworking
================================================
FILE: GoEasyDesigner/build/darwin/Info.plist
================================================
CFBundlePackageType
APPL
CFBundleName
{{.Info.ProductName}}
CFBundleExecutable
{{.Name}}
CFBundleIdentifier
com.wails.{{.Name}}
CFBundleVersion
{{.Info.ProductVersion}}
CFBundleGetInfoString
{{.Info.Comments}}
CFBundleShortVersionString
{{.Info.ProductVersion}}
CFBundleIconFile
iconfile
LSMinimumSystemVersion
10.13.0
NSHighResolutionCapable
true
NSHumanReadableCopyright
{{.Info.Copyright}}
================================================
FILE: GoEasyDesigner/build/dmg.sh
================================================
#!/bin/bash
APP_NAME="GoEasyDesigner"
APP_VERSION="$version"
DMG_NAME="${APP_NAME}-${APP_VERSION}.dmg"
TEMP_DIR="./install"
mkdir -p "${TEMP_DIR}"
cp -r "./${APP_NAME}.app" "${TEMP_DIR}"
# 创建 Applications 文件夹的快捷方式
ln -s "/Applications" "${TEMP_DIR}/Applications"
# 创建空的镜像文件
hdiutil create -srcfolder "${TEMP_DIR}" -volname "${APP_NAME}" -format UDZO "${DMG_NAME}"
echo "${DMG_NAME} 已经创建完成!"
================================================
FILE: GoEasyDesigner/build/windows/info.json
================================================
{
"fixed": {
"file_version": "{{.Info.ProductVersion}}"
},
"info": {
"0000": {
"ProductVersion": "{{.Info.ProductVersion}}",
"CompanyName": "{{.Info.CompanyName}}",
"FileDescription": "{{.Info.ProductName}}",
"LegalCopyright": "{{.Info.Copyright}}",
"ProductName": "{{.Info.ProductName}}",
"Comments": "{{.Info.Comments}}"
}
}
}
================================================
FILE: GoEasyDesigner/build/windows/installer/project.nsi
================================================
Unicode true
####
## Please note: Template replacements don't work in this file. They are provided with default defines like
## mentioned underneath.
## If the keyword is not defined, "wails_tools.nsh" will populate them with the values from ProjectInfo.
## If they are defined here, "wails_tools.nsh" will not touch them. This allows to use this project.nsi manually
## from outside of Wails for debugging and development of the installer.
##
## For development first make a wails nsis build to populate the "wails_tools.nsh":
## > wails build --target windows/amd64 --nsis
## Then you can call makensis on this file with specifying the path to your binary:
## For a AMD64 only installer:
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app.exe
## For a ARM64 only installer:
## > makensis -DARG_WAILS_ARM64_BINARY=..\..\bin\app.exe
## For a installer with both architectures:
## > makensis -DARG_WAILS_AMD64_BINARY=..\..\bin\app-amd64.exe -DARG_WAILS_ARM64_BINARY=..\..\bin\app-arm64.exe
####
## The following information is taken from the ProjectInfo file, but they can be overwritten here.
####
## !define INFO_PROJECTNAME "GoEasyDesigner" # Default "{{.Name}}"
## !define INFO_COMPANYNAME "MyCompany" # Default "{{.Info.CompanyName}}"
## !define INFO_PRODUCTNAME "MyProduct" # Default "{{.Info.ProductName}}"
## !define INFO_PRODUCTVERSION "1.0.0" # Default "{{.Info.ProductVersion}}"
## !define INFO_COPYRIGHT "Copyright" # Default "{{.Info.Copyright}}"
###
## !define PRODUCT_EXECUTABLE "Application.exe" # Default "${INFO_PROJECTNAME}.exe"
## !define UNINST_KEY_NAME "UninstKeyInRegistry" # Default "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
####
## !define REQUEST_EXECUTION_LEVEL "admin" # Default "admin" see also https://nsis.sourceforge.io/Docs/Chapter4.html
####
## Include the wails tools
####
!include "wails_tools.nsh"
# The version information for this two must consist of 4 parts
VIProductVersion "${INFO_PRODUCTVERSION}.0"
VIFileVersion "${INFO_PRODUCTVERSION}.0"
VIAddVersionKey "CompanyName" "${INFO_COMPANYNAME}"
VIAddVersionKey "FileDescription" "${INFO_PRODUCTNAME} Installer"
VIAddVersionKey "ProductVersion" "${INFO_PRODUCTVERSION}"
VIAddVersionKey "FileVersion" "${INFO_PRODUCTVERSION}"
VIAddVersionKey "LegalCopyright" "${INFO_COPYRIGHT}"
VIAddVersionKey "ProductName" "${INFO_PRODUCTNAME}"
!include "MUI.nsh"
!define MUI_ICON "..\icon.ico"
!define MUI_UNICON "..\icon.ico"
# !define MUI_WELCOMEFINISHPAGE_BITMAP "resources\leftimage.bmp" #Include this to add a bitmap on the left side of the Welcome Page. Must be a size of 164x314
!define MUI_FINISHPAGE_NOAUTOCLOSE # Wait on the INSTFILES page so the user can take a look into the details of the installation steps
!define MUI_ABORTWARNING # This will warn the user if they exit from the installer.
!insertmacro MUI_PAGE_WELCOME # Welcome to the installer page.
# !insertmacro MUI_PAGE_LICENSE "resources\eula.txt" # Adds a EULA page to the installer
!insertmacro MUI_PAGE_DIRECTORY # In which folder install page.
!insertmacro MUI_PAGE_INSTFILES # Installing page.
!insertmacro MUI_PAGE_FINISH # Finished installation page.
!insertmacro MUI_UNPAGE_INSTFILES # Uinstalling page
!insertmacro MUI_LANGUAGE "English" # Set the Language of the installer
## The following two statements can be used to sign the installer and the uninstaller. The path to the binaries are provided in %1
#!uninstfinalize 'signtool --file "%1"'
#!finalize 'signtool --file "%1"'
Name "${INFO_PRODUCTNAME}"
OutFile "..\..\bin\${INFO_PROJECTNAME}-${ARCH}-installer.exe" # Name of the installer's file.
InstallDir "$PROGRAMFILES64\${INFO_COMPANYNAME}\${INFO_PRODUCTNAME}" # Default installing folder ($PROGRAMFILES is Program Files folder).
ShowInstDetails show # This will always show the installation details.
Function .onInit
!insertmacro wails.checkArchitecture
FunctionEnd
Section
!insertmacro wails.setShellContext
!insertmacro wails.webview2runtime
SetOutPath $INSTDIR
!insertmacro wails.files
CreateShortcut "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
CreateShortCut "$DESKTOP\${INFO_PRODUCTNAME}.lnk" "$INSTDIR\${PRODUCT_EXECUTABLE}"
!insertmacro wails.writeUninstaller
SectionEnd
Section "uninstall"
!insertmacro wails.setShellContext
RMDir /r "$AppData\${PRODUCT_EXECUTABLE}" # Remove the WebView2 DataPath
RMDir /r $INSTDIR
Delete "$SMPROGRAMS\${INFO_PRODUCTNAME}.lnk"
Delete "$DESKTOP\${INFO_PRODUCTNAME}.lnk"
!insertmacro wails.deleteUninstaller
SectionEnd
================================================
FILE: GoEasyDesigner/build/windows/installer/wails_tools.nsh
================================================
# DO NOT EDIT - Generated automatically by `wails build`
!include "x64.nsh"
!include "WinVer.nsh"
!include "FileFunc.nsh"
!ifndef INFO_PROJECTNAME
!define INFO_PROJECTNAME "{{.Name}}"
!endif
!ifndef INFO_COMPANYNAME
!define INFO_COMPANYNAME "{{.Info.CompanyName}}"
!endif
!ifndef INFO_PRODUCTNAME
!define INFO_PRODUCTNAME "{{.Info.ProductName}}"
!endif
!ifndef INFO_PRODUCTVERSION
!define INFO_PRODUCTVERSION "{{.Info.ProductVersion}}"
!endif
!ifndef INFO_COPYRIGHT
!define INFO_COPYRIGHT "{{.Info.Copyright}}"
!endif
!ifndef PRODUCT_EXECUTABLE
!define PRODUCT_EXECUTABLE "${INFO_PROJECTNAME}.exe"
!endif
!ifndef UNINST_KEY_NAME
!define UNINST_KEY_NAME "${INFO_COMPANYNAME}${INFO_PRODUCTNAME}"
!endif
!define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINST_KEY_NAME}"
!ifndef REQUEST_EXECUTION_LEVEL
!define REQUEST_EXECUTION_LEVEL "admin"
!endif
RequestExecutionLevel "${REQUEST_EXECUTION_LEVEL}"
!ifdef ARG_WAILS_AMD64_BINARY
!define SUPPORTS_AMD64
!endif
!ifdef ARG_WAILS_ARM64_BINARY
!define SUPPORTS_ARM64
!endif
!ifdef SUPPORTS_AMD64
!ifdef SUPPORTS_ARM64
!define ARCH "amd64_arm64"
!else
!define ARCH "amd64"
!endif
!else
!ifdef SUPPORTS_ARM64
!define ARCH "arm64"
!else
!error "Wails: Undefined ARCH, please provide at least one of ARG_WAILS_AMD64_BINARY or ARG_WAILS_ARM64_BINARY"
!endif
!endif
!macro wails.checkArchitecture
!ifndef WAILS_WIN10_REQUIRED
!define WAILS_WIN10_REQUIRED "This product is only supported on Windows 10 (Server 2016) and later."
!endif
!ifndef WAILS_ARCHITECTURE_NOT_SUPPORTED
!define WAILS_ARCHITECTURE_NOT_SUPPORTED "This product can't be installed on the current Windows architecture. Supports: ${ARCH}"
!endif
${If} ${AtLeastWin10}
!ifdef SUPPORTS_AMD64
${if} ${IsNativeAMD64}
Goto ok
${EndIf}
!endif
!ifdef SUPPORTS_ARM64
${if} ${IsNativeARM64}
Goto ok
${EndIf}
!endif
IfSilent silentArch notSilentArch
silentArch:
SetErrorLevel 65
Abort
notSilentArch:
MessageBox MB_OK "${WAILS_ARCHITECTURE_NOT_SUPPORTED}"
Quit
${else}
IfSilent silentWin notSilentWin
silentWin:
SetErrorLevel 64
Abort
notSilentWin:
MessageBox MB_OK "${WAILS_WIN10_REQUIRED}"
Quit
${EndIf}
ok:
!macroend
!macro wails.files
!ifdef SUPPORTS_AMD64
${if} ${IsNativeAMD64}
File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_AMD64_BINARY}"
${EndIf}
!endif
!ifdef SUPPORTS_ARM64
${if} ${IsNativeARM64}
File "/oname=${PRODUCT_EXECUTABLE}" "${ARG_WAILS_ARM64_BINARY}"
${EndIf}
!endif
!macroend
!macro wails.writeUninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
SetRegView 64
WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${INFO_COMPANYNAME}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "${INFO_PRODUCTNAME}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${INFO_PRODUCTVERSION}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$INSTDIR\${PRODUCT_EXECUTABLE}"
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
!macroend
!macro wails.deleteUninstaller
Delete "$INSTDIR\uninstall.exe"
SetRegView 64
DeleteRegKey HKLM "${UNINST_KEY}"
!macroend
!macro wails.setShellContext
${If} ${REQUEST_EXECUTION_LEVEL} == "admin"
SetShellVarContext all
${else}
SetShellVarContext current
${EndIf}
!macroend
# Install webview2 by launching the bootstrapper
# See https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#online-only-deployment
!macro wails.webview2runtime
!ifndef WAILS_INSTALL_WEBVIEW_DETAILPRINT
!define WAILS_INSTALL_WEBVIEW_DETAILPRINT "Installing: WebView2 Runtime"
!endif
SetRegView 64
# If the admin key exists and is not empty then webview2 is already installed
ReadRegStr $0 HKLM "SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
${If} $0 != ""
Goto ok
${EndIf}
${If} ${REQUEST_EXECUTION_LEVEL} == "user"
# If the installer is run in user level, check the user specific key exists and is not empty then webview2 is already installed
ReadRegStr $0 HKCU "Software\Microsoft\EdgeUpdate\Clients{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" "pv"
${If} $0 != ""
Goto ok
${EndIf}
${EndIf}
SetDetailsPrint both
DetailPrint "${WAILS_INSTALL_WEBVIEW_DETAILPRINT}"
SetDetailsPrint listonly
InitPluginsDir
CreateDirectory "$pluginsdir\webview2bootstrapper"
SetOutPath "$pluginsdir\webview2bootstrapper"
File "tmp\MicrosoftEdgeWebview2Setup.exe"
ExecWait '"$pluginsdir\webview2bootstrapper\MicrosoftEdgeWebview2Setup.exe" /silent /install'
SetDetailsPrint both
ok:
!macroend
================================================
FILE: GoEasyDesigner/build/windows/wails.exe.manifest
================================================
true/pm
permonitorv2,permonitor
================================================
FILE: GoEasyDesigner/docker-compose.yml
================================================
version: "3"
services:
goeasy:
container_name: goeasy
build: .
ports:
- "3005:3005"
================================================
FILE: GoEasyDesigner/frontend/README.md
================================================
# Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `