mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 03:52:07 +08:00
python
This commit is contained in:
@@ -52,8 +52,8 @@ module.exports = {
|
||||
},
|
||||
python_w: {
|
||||
directory: './python',
|
||||
cmd: 'pyinstaller',
|
||||
args: ['-n=pyapp', '-F', './main.py'],
|
||||
cmd: 'python',
|
||||
args: ['./setup.py', 'build'],
|
||||
},
|
||||
python_m: {
|
||||
directory: './python',
|
||||
|
||||
24
python/setup.py
Normal file
24
python/setup.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from cx_Freeze import setup, Executable
|
||||
|
||||
# 创建可执行文件的配置
|
||||
executableApp = Executable(
|
||||
script="main.py",
|
||||
target_name="pyapp",
|
||||
)
|
||||
|
||||
# 打包的参数配置
|
||||
options = {
|
||||
"build_exe": {
|
||||
"build_exe":"./dist/",
|
||||
"excludes": ["*.txt"],
|
||||
"optimize": 2,
|
||||
}
|
||||
}
|
||||
|
||||
setup(
|
||||
name="pyapp",
|
||||
version="1.0",
|
||||
description="python app",
|
||||
options=options,
|
||||
executables=[executableApp]
|
||||
)
|
||||
Reference in New Issue
Block a user