👍️[Update] Build : pythonをonefile から onedirに変更
pyinstallerのビルド設定をspecファイルに書き出し _internalフォルダはresourcesで追加
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,7 +3,6 @@ build/
|
|||||||
dist/
|
dist/
|
||||||
/config.json
|
/config.json
|
||||||
memo.txt
|
memo.txt
|
||||||
VRCT.spec
|
|
||||||
*.pyc
|
*.pyc
|
||||||
logs/
|
logs/
|
||||||
.venv/
|
.venv/
|
||||||
@@ -43,5 +42,4 @@ dist-ssr
|
|||||||
.venv
|
.venv
|
||||||
|
|
||||||
# Customize
|
# Customize
|
||||||
backend-x86_64-pc-windows-msvc.spec
|
|
||||||
/build
|
/build
|
||||||
45
backend.spec
Normal file
45
backend.spec
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
a = Analysis(
|
||||||
|
['src-python\\webui_mainloop.py'],
|
||||||
|
pathex=[],
|
||||||
|
binaries=[],
|
||||||
|
datas=[('./fonts', 'fonts/'), ('.venv/Lib/site-packages/zeroconf', 'zeroconf/'), ('.venv/Lib/site-packages/openvr', 'openvr/')],
|
||||||
|
hiddenimports=[],
|
||||||
|
hookspath=[],
|
||||||
|
hooksconfig={},
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=['pandas', 'matplotlib', 'PyQt5'],
|
||||||
|
noarchive=False,
|
||||||
|
optimize=0,
|
||||||
|
)
|
||||||
|
pyz = PYZ(a.pure)
|
||||||
|
|
||||||
|
exe = EXE(
|
||||||
|
pyz,
|
||||||
|
a.scripts,
|
||||||
|
[],
|
||||||
|
exclude_binaries=True,
|
||||||
|
name='backend-x86_64-pc-windows-msvc',
|
||||||
|
debug=False,
|
||||||
|
bootloader_ignore_signals=False,
|
||||||
|
strip=False,
|
||||||
|
upx=True,
|
||||||
|
console=True,
|
||||||
|
disable_windowed_traceback=False,
|
||||||
|
argv_emulation=False,
|
||||||
|
target_arch=None,
|
||||||
|
codesign_identity=None,
|
||||||
|
entitlements_file=None,
|
||||||
|
icon=['src-ui\\assets\\chato_icon_fill.png'],
|
||||||
|
)
|
||||||
|
coll = COLLECT(
|
||||||
|
exe,
|
||||||
|
a.binaries,
|
||||||
|
a.datas,
|
||||||
|
strip=False,
|
||||||
|
upx=True,
|
||||||
|
upx_exclude=[],
|
||||||
|
name='.',
|
||||||
|
)
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup-python": "install.bat",
|
"setup-python": "install.bat",
|
||||||
"build-python": "pyinstaller -F src-python/webui_mainloop.py --add-data ./fonts;fonts/ --add-data .venv/Lib/site-packages/zeroconf;zeroconf/ --add-data .venv/Lib/site-packages/openvr;openvr/ --distpath src-tauri/bin --exclude-module pandas --exclude-module matplotlib --exclude-module PyQt5 --clean -n backend-x86_64-pc-windows-msvc --icon=./src-ui/assets/chato_icon_fill.png",
|
"build-python": "pyinstaller backend.spec --distpath src-tauri/bin --clean --noconfirm",
|
||||||
"vite": "vite",
|
"vite": "vite",
|
||||||
"vite-build": "vite build",
|
"vite-build": "vite build",
|
||||||
"vite-preview": "vite preview",
|
"vite-preview": "vite preview",
|
||||||
|
|||||||
@@ -52,7 +52,10 @@
|
|||||||
],
|
],
|
||||||
"externalBin": [
|
"externalBin": [
|
||||||
"bin/backend"
|
"bin/backend"
|
||||||
]
|
],
|
||||||
|
"resources":{
|
||||||
|
"bin/_internal": "_internal"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user