Fix face recognition in compile
This commit is contained in:
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -50,12 +50,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pyinstaller \
|
pyinstaller \
|
||||||
--onefile Movie_Data_Capture.py \
|
--onefile Movie_Data_Capture.py \
|
||||||
--collect-submodules "ImageProcessing" \
|
--python-option u \
|
||||||
--collect-data "face_recognition_models" \
|
--hidden-import "ImageProcessing.cnn" \
|
||||||
--collect-data "cloudscraper" \
|
--add-data "$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1):cloudscraper" \
|
||||||
--collect-data "opencc" \
|
--add-data "$(python -c 'import opencc as _; print(_.__path__[0])' | tail -n 1):opencc" \
|
||||||
|
--add-data "$(python -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1):face_recognition_models" \
|
||||||
--add-data "Img:Img" \
|
--add-data "Img:Img" \
|
||||||
--add-data "scrapinglib:scrapinglib" \
|
--add-data "scrapinglib:scrapinglib" `
|
||||||
--add-data "config.ini:." \
|
--add-data "config.ini:." \
|
||||||
|
|
||||||
- name: Build with PyInstaller for windows
|
- name: Build with PyInstaller for windows
|
||||||
@@ -63,12 +64,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pyinstaller `
|
pyinstaller `
|
||||||
--onefile Movie_Data_Capture.py `
|
--onefile Movie_Data_Capture.py `
|
||||||
--collect-submodules "ImageProcessing" `
|
--python-option u `
|
||||||
--collect-data "face_recognition_models" `
|
--hidden-import "ImageProcessing.cnn" `
|
||||||
--collect-data "cloudscraper" `
|
--add-data "$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1);cloudscraper" `
|
||||||
--collect-data "opencc" `
|
--add-data "$(python -c 'import opencc as _; print(_.__path__[0])' | tail -n 1);opencc" `
|
||||||
|
--add-data "$(python -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1);face_recognition_models" `
|
||||||
--add-data "Img;Img" `
|
--add-data "Img;Img" `
|
||||||
--add-data "scrapinglib;scrapinglib" `
|
--add-data "scrapinglib:scrapinglib" `
|
||||||
--add-data "config.ini;." `
|
--add-data "config.ini;." `
|
||||||
|
|
||||||
- name: Copy config.ini
|
- name: Copy config.ini
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
# If you can't run this script, please execute the following command in PowerShell.
|
# If you can't run this script, please execute the following command in PowerShell.
|
||||||
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
||||||
|
|
||||||
# bugfix:set submodules find path
|
$CLOUDSCRAPER_PATH = $( python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1 )
|
||||||
$Env:PYTHONPATH=$pwd.path
|
$OPENCC_PATH = $( python -c 'import opencc as _; print(_.__path__[0])' | select -Last 1 )
|
||||||
$PYTHONPATH=$pwd.path
|
$FACE_RECOGNITION_MODELS = $( python -c 'import face_recognition_models as _; print(_.__path__[0])' | select -Last 1 )
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
mkdir __pycache__
|
mkdir __pycache__
|
||||||
|
|
||||||
pyinstaller --collect-submodules "ImageProcessing" `
|
pyinstaller --onefile Movie_Data_Capture.py `
|
||||||
--collect-data "face_recognition_models" `
|
--hidden-import "ImageProcessing.cnn" `
|
||||||
--collect-data "cloudscraper" `
|
--python-option u `
|
||||||
--collect-data "opencc" `
|
--add-data "$FACE_RECOGNITION_MODELS;face_recognition_models" `
|
||||||
|
--add-data "$CLOUDSCRAPER_PATH;cloudscraper" `
|
||||||
|
--add-data "$OPENCC_PATH;opencc" `
|
||||||
--add-data "Img;Img" `
|
--add-data "Img;Img" `
|
||||||
--add-data "config.ini;." `
|
--add-data "config.ini;." `
|
||||||
--add-data "scrapinglib;scrapinglib" `
|
--add-data "scrapinglib;scrapinglib" `
|
||||||
--onefile Movie_Data_Capture.py
|
|
||||||
|
|
||||||
|
|
||||||
rmdir -Recurse -Force build
|
rmdir -Recurse -Force build
|
||||||
rmdir -Recurse -Force __pycache__
|
rmdir -Recurse -Force __pycache__
|
||||||
|
|||||||
Reference in New Issue
Block a user