加快打包速度

This commit is contained in:
copper 2022-05-31 18:09:01 +08:00
parent f5b3679835
commit a5060225f1
9 changed files with 20 additions and 59 deletions

4
.gitignore vendored
View File

@ -218,3 +218,7 @@ default/
plugins/*/*.c plugins/*/*.c
share/* share/*
share
nuitka.help
log.txt

2
ECD.py
View File

@ -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['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'share')
os.environ['ECD_BASEDIR'] = os.path.dirname(__file__) os.environ['ECD_BASEDIR'] = os.path.dirname(__file__)
BASE_DIR = os.path.dirname(__file__) BASE_DIR = os.path.dirname(__file__)
import distutils
import distutils.version
from rscder import MulStart from rscder import MulStart
import logging import logging

View File

@ -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 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
xcopy icons package\ECD.dist\icons /Y /E
@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 @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

View File

@ -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'<RCC>\n')
f.write(f' <qresource prefix="/">\n')
for icon in os.listdir(icon_path):
f.write(f' <file alias="{}">{"icons/" + icon}</file>\n')
f.write(f' </qresource>\n')
f.write(f'</RCC>\n')
# subprocess.run(['pyrcc5', 'res.qrc', '-o', 'rc.py'], cwd=os.path.join(path, '..'))
# shutil.rmtree(icon_path)

View File

@ -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 rscder.gui.keygen import LicenseGen
from PyQt5.QtWidgets import QApplication from PyQt5.QtWidgets import QApplication
import sys import sys

36
log.txt
View File

@ -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

View File

@ -1,6 +1,5 @@
import math import math
import os import os
import pdb
from rscder.gui.actions import ActionManager from rscder.gui.actions import ActionManager
from rscder.plugins.basic import BasicPlugin from rscder.plugins.basic import BasicPlugin
from PyQt5.QtWidgets import QAction, QDialog, QHBoxLayout, QVBoxLayout, QPushButton from PyQt5.QtWidgets import QAction, QDialog, QHBoxLayout, QVBoxLayout, QPushButton

View File

@ -126,7 +126,7 @@ class Settings(QSettings):
@property @property
def license(self): def license(self):
lic_path =os.path.join(BASE_DIR, 'lic', 'license.lic') 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 return False
with open(lic_path, 'r') as f: with open(lic_path, 'r') as f:

View File

@ -1,14 +1,14 @@
1. lic文件生成 1. lic文件生成
点击RSCDer.exe,复制所显示的mac地址 点击ECD.exe,复制所显示的mac地址
点击keygen.exe,粘贴mac地址设置截止日期并选择保存路径无需输入后缀名 点击keygen.exe,粘贴mac地址设置截止日期并选择保存路径无需输入后缀名
点击Generate 点击Generate
2. lic文件导入 2. lic文件导入
点击RSCDer.exe点击Open选择生成的lic文件 点击ECD.exe点击Open选择生成的lic文件
点击OK 点击OK
3. 新建项目与数据导入 3. 新建项目与数据导入
点击RSCDer.exe 点击ECD.exe
点击新建项目 点击新建项目
选择路径、名称 选择路径、名称
将会在路径下看到与名称相同的文件夹 将会在路径下看到与名称相同的文件夹