diff --git a/.gitignore b/.gitignore index 6da575d..5bfbff1 100644 --- a/.gitignore +++ b/.gitignore @@ -218,3 +218,7 @@ default/ plugins/*/*.c share/* +share + +nuitka.help +log.txt \ No newline at end of file diff --git a/ECD.py b/ECD.py index 7b1db83..3b846d8 100644 --- a/ECD.py +++ b/ECD.py @@ -3,6 +3,8 @@ os.environ['PROJ_LIB'] = os.path.join(os.path.dirname(__file__), 'share/proj') os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'share') os.environ['ECD_BASEDIR'] = os.path.dirname(__file__) BASE_DIR = os.path.dirname(__file__) +import distutils +import distutils.version from rscder import MulStart import logging diff --git a/build.bat b/build.bat index 31bf153..06d7929 100644 --- a/build.bat +++ b/build.bat @@ -1,5 +1,6 @@ -nuitka ECD.py --standalone --plugin-enable=pyqt5 --include-qt-plugins=sensible,styles --plugin-enable=numpy --show-progress --include-package=qgis --windows-disable-console --output-dir=package --windows-icon-from-ico=logo.ico -xcopy icons package\ECD.dist\icons /Y /E +nuitka ECD.py --standalone --plugin-enable=pyqt5 --include-qt-plugins=sensible,styles --plugin-enable=numpy --nofollow-import-to=cv2 --nofollow-import-to=scipy --nofollow-import-to=yaml --nofollow-import-to=matplotlib --nofollow-import-to=PIL --nofollow-import-to=skimage --nofollow-import-to=numpy --nofollow-import-to=osgeo --nofollow-import-to=cryptography --nofollow-import-to=brotli --nofollow-import-to=cffi --show-progress --include-package=qgis --include-package=distutils --output-dir=package --windows-icon-from-ico=logo.ico --windows-disable-console + +@REM nuitka ECD.py --standalone --plugin-enable=pyqt5 --include-qt-plugins=sensible,styles --plugin-enable=numpy --plugin-enable=anti-bloat --show-progress --include-package=qgis --output-dir=package --windows-icon-from-ico=logo.ico @REM nuitka keygen.py --standalone --plugin-enable=qt-plugins --plugin-enable=numpy --show-progress --plugin-enable=pylint-warnings --output-dir=package --windows-disable-console --windows-icon-from-ico=logo.ico --no-pyi-file diff --git a/generate_rc.py b/generate_rc.py deleted file mode 100644 index b243945..0000000 --- a/generate_rc.py +++ /dev/null @@ -1,16 +0,0 @@ -import shutil -import subprocess -import os -path = os.path.dirname(os.path.realpath(__file__)) -icon_path = os.path.join(path, 'icons') - -with open(os.path.join(path, 'res.qrc'), 'w') as f: - f.write(f'\n') - f.write(f' \n') - for icon in os.listdir(icon_path): - f.write(f' {"icons/" + icon}\n') - f.write(f' \n') - f.write(f'\n') - -# subprocess.run(['pyrcc5', 'res.qrc', '-o', 'rc.py'], cwd=os.path.join(path, '..')) -# shutil.rmtree(icon_path) \ No newline at end of file diff --git a/keygen.py b/keygen.py index c6ed530..c8d3831 100644 --- a/keygen.py +++ b/keygen.py @@ -1,3 +1,10 @@ +import os + +os.environ['PROJ_LIB'] = os.path.join(os.path.dirname(__file__), 'share/proj') +os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'share') +os.environ['ECD_BASEDIR'] = os.path.dirname(__file__) +BASE_DIR = os.path.dirname(__file__) + from rscder.gui.keygen import LicenseGen from PyQt5.QtWidgets import QApplication import sys diff --git a/log.txt b/log.txt deleted file mode 100644 index 3852e80..0000000 --- a/log.txt +++ /dev/null @@ -1,36 +0,0 @@ -2022-05-28 21:40:04,316 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-28 21:40:04,316 - root - INFO - remain_days: 186 -2022-05-28 21:40:05,077 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-28 21:40:05,077 - root - INFO - remain_days: 186 -2022-05-31 13:03:21,977 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:03:21,997 - root - INFO - remain_days: 183 -2022-05-31 13:03:23,512 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:03:23,512 - root - INFO - remain_days: 183 -2022-05-31 13:04:56,664 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:04:56,664 - root - INFO - remain_days: 183 -2022-05-31 13:04:57,954 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:04:57,954 - root - INFO - remain_days: 183 -2022-05-31 13:07:34,863 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:07:34,864 - root - INFO - remain_days: 183 -2022-05-31 13:07:36,227 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:07:36,227 - root - INFO - remain_days: 183 -2022-05-31 13:08:31,271 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:08:31,271 - root - INFO - remain_days: 183 -2022-05-31 13:08:32,678 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:08:32,679 - root - INFO - remain_days: 183 -2022-05-31 13:11:22,682 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:11:22,682 - root - INFO - remain_days: 183 -2022-05-31 13:11:24,048 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:11:24,048 - root - INFO - remain_days: 183 -2022-05-31 13:12:18,251 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:12:18,251 - root - INFO - remain_days: 183 -2022-05-31 13:12:19,616 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:12:19,616 - root - INFO - remain_days: 183 -2022-05-31 13:13:44,594 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:13:44,594 - root - INFO - remain_days: 183 -2022-05-31 13:13:45,939 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:13:45,939 - root - INFO - remain_days: 183 -2022-05-31 13:20:24,284 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:20:24,284 - root - INFO - remain_days: 183 -2022-05-31 13:20:25,661 - root - INFO - lic data:2022-12-01 00:00:00 -2022-05-31 13:20:25,661 - root - INFO - remain_days: 183 diff --git a/plugins/basic_change/main.py b/plugins/basic_change/main.py index 4be822b..0e8e8e0 100644 --- a/plugins/basic_change/main.py +++ b/plugins/basic_change/main.py @@ -1,6 +1,5 @@ import math import os -import pdb from rscder.gui.actions import ActionManager from rscder.plugins.basic import BasicPlugin from PyQt5.QtWidgets import QAction, QDialog, QHBoxLayout, QVBoxLayout, QPushButton diff --git a/rscder/utils/setting.py b/rscder/utils/setting.py index c1373cb..268f77e 100644 --- a/rscder/utils/setting.py +++ b/rscder/utils/setting.py @@ -126,7 +126,7 @@ class Settings(QSettings): @property def license(self): lic_path =os.path.join(BASE_DIR, 'lic', 'license.lic') - if not os.path.join(lic_path): + if not os.path.exists(lic_path): return False with open(lic_path, 'r') as f: diff --git a/使用手册.txt b/使用手册.txt index 1aeb405..4afb49c 100644 --- a/使用手册.txt +++ b/使用手册.txt @@ -1,14 +1,14 @@ 1. lic文件生成 -点击RSCDer.exe,复制所显示的mac地址 +点击ECD.exe,复制所显示的mac地址 点击keygen.exe,粘贴mac地址,设置截止日期,并选择保存路径(无需输入后缀名) 点击Generate 2. lic文件导入 -点击RSCDer.exe,点击Open,选择生成的lic文件 +点击ECD.exe,点击Open,选择生成的lic文件 点击OK 3. 新建项目与数据导入 -点击RSCDer.exe +点击ECD.exe 点击新建项目 选择路径、名称 将会在路径下看到与名称相同的文件夹