From 38739feee2b303cd1d9fb14e98b0437df54a2804 Mon Sep 17 00:00:00 2001 From: yoshiko2 Date: Fri, 25 Dec 2020 12:11:54 +0800 Subject: [PATCH] Update to 4.2.2, remove docker-entrypoint.sh and encapsulation.sh, use Python3_Crosss_Wrapper --- AV_Data_Capture.py | 2 +- docker-entrypoint.sh | 15 --------------- encapsulation.sh | 6 ------ wrapper/FreeBSD.sh | 4 ++++ wrapper/Linux.sh | 15 +++++++++++++++ 5 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 docker-entrypoint.sh delete mode 100644 encapsulation.sh create mode 100755 wrapper/FreeBSD.sh create mode 100755 wrapper/Linux.sh diff --git a/AV_Data_Capture.py b/AV_Data_Capture.py index 9d07009..3de8bba 100755 --- a/AV_Data_Capture.py +++ b/AV_Data_Capture.py @@ -130,7 +130,7 @@ def create_data_and_move_with_custom_number(file_path: str, c: config.Config, cu if __name__ == '__main__': - version = '4.2.1' + version = '4.2.2' # Parse command line args single_file_path, config_file, custom_number, auto_exit = argparse_function(version) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh deleted file mode 100644 index 76e4443..0000000 --- a/docker-entrypoint.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -git fetch --all -git reset --hard origin/master -git pull - -apt update -apt upgrade -y -pip3 install --upgrade -r requirements.txt -make - -cd bin -version=$(./AV_Data_Capture --version) -zip AV_Data_Capture-CLI-$(echo $version)-$(uname)-$(dpkg --print-architecture).zip AV_Data_Capture config.ini -mv *zip /avdc_bin diff --git a/encapsulation.sh b/encapsulation.sh deleted file mode 100644 index c3b7a78..0000000 --- a/encapsulation.sh +++ /dev/null @@ -1,6 +0,0 @@ -pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py -cp config.ini dist/ -find . -name '*.pyc' -delete -find . -name '__pycache__' -type d | xargs rm -fr -find . -name '.pytest_cache' -type d | xargs rm -fr -rm -rf build/ diff --git a/wrapper/FreeBSD.sh b/wrapper/FreeBSD.sh new file mode 100755 index 0000000..20d87e0 --- /dev/null +++ b/wrapper/FreeBSD.sh @@ -0,0 +1,4 @@ +pkg install python37 py37-requests py37-pip py37-lxml py37-pillow py37-cloudscraper py37-pysocks git zip py37-pyinstaller py37-beautifulsoup448 +pip install pyquery +pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py +cp config.ini ./dist diff --git a/wrapper/Linux.sh b/wrapper/Linux.sh new file mode 100755 index 0000000..e1c761e --- /dev/null +++ b/wrapper/Linux.sh @@ -0,0 +1,15 @@ +if ['$(dpkg --print-architecture)' != 'amd64'] || ['$(dpkg --print-architecture)' != 'i386']; then + apt install python3 python3-pip git sudo libxml2-dev libxslt-dev build-essential wget nano libcmocka-dev libcmocka0 -y + apt install zlib* libjpeg-dev -y + wget https://files.pythonhosted.org/packages/82/96/21ba3619647bac2b34b4996b2dbbea8e74a703767ce24192899d9153c058/pyinstaller-4.0.tar.gz + tar -zxvf pyinstaller-4.0.tar.gz + cd pyinstaller-4.0/bootloader + sed -i "s/ '-Werror',//" wscript + python3 ./waf distclean all + cd ../ + python3 setup.py install + cd ../ +fi +pip3 install -r requirements.txt +pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py +cp config.ini ./dist