forked from mvdctop/Movie_Data_Capture
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpy_to_exe.ps1
29 lines (22 loc) · 1004 Bytes
/
py_to_exe.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# If you can't run this script, please execute the following command in PowerShell.
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
$CLOUDSCRAPER_PATH = $( python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1 )
$OPENCC_PATH = $( python -c 'import opencc as _; print(_.__path__[0])' | select -Last 1 )
$FACE_RECOGNITION_MODELS = $( python -c 'import face_recognition_models as _; print(_.__path__[0])' | select -Last 1 )
$Env:PYTHONPATH=$pwd.path
$PYTHONPATH=$pwd.path
mkdir build
mkdir __pycache__
pyinstaller --collect-submodules "scrapinglib" `
--collect-submodules "ImageProcessing" `
--collect-data "face_recognition_models" `
--collect-data "cloudscraper" `
--collect-data "opencc" `
--add-data "Img;Img" `
--add-data "config.ini;." `
--onefile Movie_Data_Capture.py
rmdir -Recurse -Force build
rmdir -Recurse -Force __pycache__
rmdir -Recurse -Force Movie_Data_Capture.spec
echo "[Make]Finish"
pause