12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set VERSION variable
|
- name: Set VERSION variable
|
||||||
run: |
|
run: |
|
||||||
version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
|
version=$(python -c 'import AV_Data_Capture as _; print(_.__version__)')
|
||||||
echo "::set-env name=VERSION::$version"
|
echo "::set-env name=VERSION::$version"
|
||||||
|
|
||||||
- name: Set CLOUDSCRAPER_PATH variable
|
- name: Set CLOUDSCRAPER_PATH variable
|
||||||
@@ -79,13 +79,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Set VERSION variable
|
- name: Set VERSION variable
|
||||||
run: |
|
run: |
|
||||||
$env:version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
|
$version=$(python -c 'import AV_Data_Capture as _; print(_.__version__)')
|
||||||
echo "::set-env name=VERSION::$env:version"
|
echo "::set-env name=VERSION::$version"
|
||||||
|
|
||||||
- name: Set CLOUDSCRAPER_PATH variable
|
- name: Set CLOUDSCRAPER_PATH variable
|
||||||
run: |
|
run: |
|
||||||
$env:cloudscraper_path=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1)
|
$cloudscraper_path=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1)
|
||||||
echo "::set-env name=CLOUDSCRAPER_PATH::$env:cloudscraper_path"
|
echo "::set-env name=CLOUDSCRAPER_PATH::$cloudscraper_path"
|
||||||
|
|
||||||
- name: Build with PyInstaller
|
- name: Build with PyInstaller
|
||||||
run: |
|
run: |
|
||||||
@@ -127,7 +127,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set VERSION variable
|
- name: Set VERSION variable
|
||||||
run: |
|
run: |
|
||||||
version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)')
|
version=$(python -c 'import AV_Data_Capture as _; print(_.__version__)')
|
||||||
echo "::set-env name=VERSION::$version"
|
echo "::set-env name=VERSION::$version"
|
||||||
|
|
||||||
- name: Set CLOUDSCRAPER_PATH variable
|
- name: Set CLOUDSCRAPER_PATH variable
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
import os
|
|
||||||
os.system("pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py")
|
|
||||||
os.system("rm -rf ./build")
|
|
||||||
os.system("rm -rf ./__pycache__")
|
|
||||||
os.system("rm -rf AV_Data_Capture.spec")
|
|
||||||
os.system("echo '[Make]Finish'")
|
|
||||||
15
linux_make.sh
Normal file
15
linux_make.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CLOUDSCRAPER_PATH=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1)
|
||||||
|
|
||||||
|
pyinstaller --onefile AV_Data_Capture.py \
|
||||||
|
--hidden-import ADC_function.py \
|
||||||
|
--hidden-import core.py \
|
||||||
|
--add-data "$CLOUDSCRAPER_PATH:cloudscraper"
|
||||||
|
|
||||||
|
rm -rf build
|
||||||
|
rm -rf __pycache__
|
||||||
|
rm -rf AV_Data_Capture.spec
|
||||||
|
|
||||||
|
echo "[Make]Finish"
|
||||||
|
read -n 1
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py
|
|
||||||
rmdir /s/q build
|
|
||||||
rmdir /s/q __pycache__
|
|
||||||
pause
|
|
||||||
16
py_to_exe.ps1
Normal file
16
py_to_exe.ps1
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# 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)
|
||||||
|
|
||||||
|
pyinstaller --onefile AV_Data_Capture.py `
|
||||||
|
--hidden-import ADC_function.py `
|
||||||
|
--hidden-import core.py `
|
||||||
|
--add-data "$CLOUDSCRAPER_PATH;cloudscraper"
|
||||||
|
|
||||||
|
rmdir -Recurse -Force build
|
||||||
|
rmdir -Recurse -Force __pycache__
|
||||||
|
rmdir -Recurse -Force AV_Data_Capture.spec
|
||||||
|
|
||||||
|
echo "[Make]Finish"
|
||||||
|
pause
|
||||||
Reference in New Issue
Block a user