Merge pull request #40 from greenflute/master

packaging for linux and mac
This commit is contained in:
Dongle 2024-07-16 07:08:43 +08:00 committed by GitHub
commit 7c493bf104
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 32 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -3,8 +3,8 @@
"version": "2.2.3",
"description": "An Electron application with React and TypeScript",
"main": "./out/main/index.js",
"author": "example.com",
"homepage": "https://electron-vite.org",
"author": "Yu RuoTong <yuruotong1@163.com> (https://github.com/yuruotong1/autoMate)",
"homepage": "https://github.com/yuruotong1/autoMate",
"repository": "https://github.com/yuruotong1/autoMate/tree/master/app",
"scripts": {
"format": "prettier --write .",
@ -21,6 +21,22 @@
"build:mac": "electron-vite build && electron-builder --mac --config",
"build:linux": "electron-vite build && electron-builder --linux --config"
},
"build": {
"appId": "com.yuruotong.automate",
"mac": {
"target": "dmg"
},
"win": {
"target": "exe"
},
"linux": {
"target": [
"deb",
"rpm",
"snap"
]
}
},
"dependencies": {
"@ai-sdk/openai": "^0.0.33",
"@ant-design/pro-chat": "^1.15.0",

14
package.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
cd server
. ./.venv/bin/activate
pip install -r requirements.txt
echo y | pyinstaller main.spec
mkdir -p ./dist/autoMateServer/_internal/litellm
# cp ./.venv/lib/python*/site-packages/litellm/*.json ./dist/autoMateServer/_internal/litellm
cp "$(find ./.venv/lib -maxdepth 1 -type d -name 'python*' | head -n 1)"/site-packages/litellm/*.json ./dist/autoMateServer/_internal/litellm
cd ../app
target_dir=./dist
rm -rf $target_dir/*.*
npm run build:linux
npm run build:mac

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 20 KiB