更改部署方式
This commit is contained in:
parent
0e52064977
commit
1e32f960db
16
ECD.py
16
ECD.py
@ -1,16 +0,0 @@
|
|||||||
import os
|
|
||||||
import sys
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'libs'))
|
|
||||||
# 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 import MulStart
|
|
||||||
import logging
|
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO, filename=os.path.join(BASE_DIR, 'log.txt'), filemode='a', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
|
|
||||||
t = MulStart()
|
|
||||||
t.run()
|
|
@ -1,48 +0,0 @@
|
|||||||
; Script generated by the Inno Setup Script Wizard.
|
|
||||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
||||||
|
|
||||||
#define MyAppName "Easy Change Detection"
|
|
||||||
#define MyAppVersion "0.2.0"
|
|
||||||
#define MyAppPublisher "Î÷°²Àí¹¤´óѧ-ImgSciGroup"
|
|
||||||
#define MyAppURL "https://jsj.xaut.edu.cn/info/1052/2455.htm"
|
|
||||||
#define MyAppExeName "ECD.exe"
|
|
||||||
|
|
||||||
[Setup]
|
|
||||||
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
|
|
||||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
|
||||||
AppId={{78EB8520-9F1F-4396-909F-69DA29AEE98F}
|
|
||||||
AppName={#MyAppName}
|
|
||||||
AppVersion={#MyAppVersion}
|
|
||||||
;AppVerName={#MyAppName} {#MyAppVersion}
|
|
||||||
AppPublisher={#MyAppPublisher}
|
|
||||||
AppPublisherURL={#MyAppURL}
|
|
||||||
AppSupportURL={#MyAppURL}
|
|
||||||
AppUpdatesURL={#MyAppURL}
|
|
||||||
DefaultDirName={autopf}\{#MyAppName}
|
|
||||||
DisableProgramGroupPage=yes
|
|
||||||
; Uncomment the following line to run in non administrative install mode (install for current user only.)
|
|
||||||
;PrivilegesRequired=lowest
|
|
||||||
OutputBaseFilename=ECDInstaller
|
|
||||||
SetupIconFile=D:\CVEO\2021-12-22-CDGUI\rscder\logo.ico
|
|
||||||
Compression=lzma
|
|
||||||
SolidCompression=yes
|
|
||||||
WizardStyle=modern
|
|
||||||
|
|
||||||
[Languages]
|
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
|
||||||
|
|
||||||
[Tasks]
|
|
||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
|
||||||
|
|
||||||
[Files]
|
|
||||||
Source: "D:\CVEO\2021-12-22-CDGUI\rscder\package\dist-0.2.0\program\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
|
||||||
Source: "D:\CVEO\2021-12-22-CDGUI\rscder\package\dist-0.2.0\program\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
|
||||||
|
|
||||||
[Icons]
|
|
||||||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
|
||||||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
|
||||||
|
|
||||||
[Run]
|
|
||||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
|
||||||
|
|
16
keygen.py
16
keygen.py
@ -1,16 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app =QApplication(sys.argv)
|
|
||||||
license = LicenseGen()
|
|
||||||
license.show()
|
|
||||||
sys.exit(app.exec_())
|
|
5
logs/2023_03_25_11_00_10_log.txt
Normal file
5
logs/2023_03_25_11_00_10_log.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
2023-03-25 11:00:10,230 - root - INFO - lic data:2033-01-01 00:00:00
|
||||||
|
2023-03-25 11:00:10,230 - root - INFO - remain_days: 3569
|
||||||
|
2023-03-25 11:00:11,182 - root - INFO - lic data:2033-01-01 00:00:00
|
||||||
|
2023-03-25 11:00:11,182 - root - INFO - remain_days: 3569
|
||||||
|
2023-03-25 11:00:30,172 - root - INFO - nothing
|
4
logs/2023_03_25_11_02_32_log.txt
Normal file
4
logs/2023_03_25_11_02_32_log.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
2023-03-25 11:02:32,812 - root - INFO - lic data:2033-01-01 00:00:00
|
||||||
|
2023-03-25 11:02:32,812 - root - INFO - remain_days: 3569
|
||||||
|
2023-03-25 11:02:33,761 - root - INFO - lic data:2033-01-01 00:00:00
|
||||||
|
2023-03-25 11:02:33,761 - root - INFO - remain_days: 3569
|
@ -1,3 +1,3 @@
|
|||||||
from misc.main import *
|
from .main import *
|
||||||
from misc.utils import *
|
from .utils import *
|
||||||
from misc.table_layer import *
|
from .table_layer import *
|
@ -5,7 +5,7 @@ from osgeo import gdal
|
|||||||
from rscder.utils.project import Project
|
from rscder.utils.project import Project
|
||||||
import os
|
import os
|
||||||
from rscder.utils.project import BasicLayer, ResultPointLayer
|
from rscder.utils.project import BasicLayer, ResultPointLayer
|
||||||
from misc.utils import format_now
|
from .utils import format_now
|
||||||
|
|
||||||
def table_layer(pth:str,layer:BasicLayer, name, cdpath=None,
|
def table_layer(pth:str,layer:BasicLayer, name, cdpath=None,
|
||||||
th=0, method_info:dict=dict(), send_message = None):
|
th=0, method_info:dict=dict(), send_message = None):
|
||||||
|
22
rscder/ECD.py
Normal file
22
rscder/ECD.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
# sys.path.insert(0, os.path.join('..', os.path.dirname(__file__), 'libs'))
|
||||||
|
# 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.join( os.path.dirname(__file__), '..')
|
||||||
|
BASE_DIR = os.path.join( os.path.dirname(__file__), '..')
|
||||||
|
|
||||||
|
from .mul.mulstart import MulStart
|
||||||
|
import logging
|
||||||
|
from plugins.misc import format_now
|
||||||
|
|
||||||
|
logging.basicConfig(level=logging.INFO, filename=os.path.join(BASE_DIR, 'logs', format_now() + '_log.txt'), filemode='a', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
t = MulStart()
|
||||||
|
t.run()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
main()
|
@ -1 +0,0 @@
|
|||||||
from .mul.mulstart import MulStart
|
|
19
rscder/keygen.py
Normal file
19
rscder/keygen.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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.join( os.path.dirname(__file__), '..')
|
||||||
|
BASE_DIR = os.path.join( os.path.dirname(__file__), '..')
|
||||||
|
|
||||||
|
from rscder.gui.keygen import LicenseGen
|
||||||
|
from PyQt5.QtWidgets import QApplication
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app =QApplication(sys.argv)
|
||||||
|
license = LicenseGen()
|
||||||
|
license.show()
|
||||||
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
@ -1,7 +1,7 @@
|
|||||||
from PyQt5.QtGui import QIcon
|
from PyQt5.QtGui import QIcon
|
||||||
from PyQt5.QtCore import QObject
|
from PyQt5.QtCore import QObject
|
||||||
from .misc import singleton
|
from .misc import singleton
|
||||||
|
import os
|
||||||
|
|
||||||
@singleton
|
@singleton
|
||||||
class IconInstance(QObject):
|
class IconInstance(QObject):
|
||||||
@ -9,57 +9,55 @@ class IconInstance(QObject):
|
|||||||
def __init__(self, parent) -> None:
|
def __init__(self, parent) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
self.GRID_ON = QIcon('./icons/格网开.png')
|
self.GRID_ON = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/格网开.png'))
|
||||||
self.AI_DETECT = QIcon('./icons/AI变化检测.png')
|
self.AI_DETECT = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/AI变化检测.png'))
|
||||||
self.EVALUATION = QIcon('./icons/精度评估.png')
|
self.EVALUATION = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/精度评估.png'))
|
||||||
self.SPLASH = QIcon('./icons/splash.png')
|
self.SPLASH = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/splash.png'))
|
||||||
self.HELP = QIcon('./icons/帮助.png')
|
self.HELP = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/帮助.png'))
|
||||||
self.LOGO = QIcon('./icons/变化检测.png')
|
self.LOGO = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/变化检测.png'))
|
||||||
self.CHANGE = QIcon('./icons/变化检测.png')
|
self.CHANGE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/变化检测.png'))
|
||||||
self.OK = QIcon('./icons/ok.svg')
|
self.OK = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/ok.svg'))
|
||||||
self.CANCEL = QIcon('./icons/cancel.svg')
|
self.CANCEL = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/cancel.svg'))
|
||||||
self.PLUGINS = QIcon('./icons/插件配置.png')
|
self.PLUGINS = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/插件配置.png'))
|
||||||
self.CREATE = QIcon('./icons/创建工程.png')
|
self.CREATE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/创建工程.png'))
|
||||||
self.OPEN = QIcon('./icons/打开工程.png')
|
self.OPEN = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/打开工程.png'))
|
||||||
self.SAVE = QIcon('./icons/工程保存.png')
|
self.SAVE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/工程保存.png'))
|
||||||
self.TOOLS = QIcon('./icons/工具.png')
|
self.TOOLS = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/工具.png'))
|
||||||
self.TOOLBOX = QIcon('./icons/工具箱.png')
|
self.TOOLBOX = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/工具箱.png'))
|
||||||
self.LOCATION = QIcon('./icons/定位.png')
|
self.LOCATION = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/定位.png'))
|
||||||
self.UNSUPERVISED = QIcon('./icons/非监督.png')
|
self.UNSUPERVISED = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/非监督.png'))
|
||||||
self.ROAD_CHANGE = QIcon('./icons/道路变化.png')
|
self.ROAD_CHANGE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/道路变化.png'))
|
||||||
self.LANDSIDE = QIcon('./icons/海岸变化.png')
|
self.LANDSIDE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/海岸变化.png'))
|
||||||
self.SUPERVISED = QIcon('./icons/监督.png')
|
self.SUPERVISED = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/监督.png'))
|
||||||
self.VIEW_SETTING = QIcon('./icons/视图设置.png')
|
self.VIEW_SETTING = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/视图设置.png'))
|
||||||
self.FILTER = QIcon('./icons/滤波.png')
|
self.FILTER = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/滤波.png'))
|
||||||
self.PAN = QIcon('./icons/平移.png')
|
self.PAN = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/平移.png'))
|
||||||
self.CLOUD_REMOVE = QIcon('./icons/去云.png')
|
self.CLOUD_REMOVE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/去云.png'))
|
||||||
self.WEAK_SUPERVISED = QIcon('./icons/弱监督.png')
|
self.WEAK_SUPERVISED = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/弱监督.png'))
|
||||||
self.DELETE = QIcon('./icons/删除.png')
|
self.DELETE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/删除.png'))
|
||||||
self.VECTOR = QIcon('./icons/矢量.png')
|
self.VECTOR = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/矢量.png'))
|
||||||
self.WATER_CHANGE = QIcon('./icons/水体变化.png')
|
self.WATER_CHANGE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/水体变化.png'))
|
||||||
self.ZOOM_TO = QIcon('./icons/缩放到.png')
|
self.ZOOM_TO = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/缩放到.png'))
|
||||||
|
|
||||||
self.LAYER = QIcon('./icons/图层.png')
|
self.LAYER = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/图层.png'))
|
||||||
self.GRID_OFF = QIcon('./icons/格网关闭.png')
|
self.GRID_OFF = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/格网关闭.png'))
|
||||||
self.DOCUMENT = QIcon('./icons/文档.png')
|
self.DOCUMENT = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/文档.png'))
|
||||||
self.FILE = QIcon('./icons/文件.png')
|
self.FILE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/文件.png'))
|
||||||
self.SELECT = QIcon('./icons/选择要素.png')
|
self.SELECT = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/选择要素.png'))
|
||||||
self.RASTER = QIcon('./icons/影像.png')
|
self.RASTER = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/影像.png'))
|
||||||
self.VEGETATION = QIcon('./icons/植被变化.png')
|
self.VEGETATION = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/植被变化.png'))
|
||||||
self.NOISE = QIcon('./icons/噪声处理.png')
|
self.NOISE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/噪声处理.png'))
|
||||||
self.ARITHMETIC1 = QIcon('./icons/Algorithm_icon/功能-01.png')
|
self.ARITHMETIC1 = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/Algorithm_icon/功能-01.png'))
|
||||||
self.ARITHMETIC2 = QIcon('./icons/Algorithm_icon/功能-02.png')
|
self.ARITHMETIC2 = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/Algorithm_icon/功能-02.png'))
|
||||||
self.ARITHMETIC3 = QIcon('./icons/Algorithm_icon/功能-03.png')
|
self.ARITHMETIC3 = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/Algorithm_icon/功能-03.png'))
|
||||||
# self.ARITHMETIC3.QSize()
|
# self.ARITHMETIC3.QSize()
|
||||||
|
|
||||||
self.DATA_LOAD = QIcon('./icons/数据加载.png')
|
self.DATA_LOAD = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/数据加载.png'))
|
||||||
|
self.EXCIT = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/退出.png'))
|
||||||
|
self.ZOOM_IN = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/放大.png'))
|
||||||
|
self.ZOOM_OUT = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/缩小.png'))
|
||||||
|
|
||||||
self.EXCIT = QIcon('./icons/退出.png')
|
self.TABLE = QIcon(os.path.join(os.environ['ECD_BASEDIR'] , './icons/table.png'))
|
||||||
|
|
||||||
self.ZOOM_IN = QIcon('./icons/放大.png')
|
|
||||||
self.ZOOM_OUT = QIcon('./icons/缩小.png')
|
|
||||||
|
|
||||||
self.TABLE = QIcon('./icons/table.png')
|
|
||||||
|
|
||||||
def __getattr__(self, name: str) -> QIcon:
|
def __getattr__(self, name: str) -> QIcon:
|
||||||
try:
|
try:
|
||||||
|
31
setup.py
31
setup.py
@ -1,15 +1,18 @@
|
|||||||
from distutils.core import setup
|
from setuptools import setup, find_packages
|
||||||
import shutil
|
|
||||||
from Cython.Build import cythonize
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
|
|
||||||
for plugin in os.listdir('plugins'):
|
setup(
|
||||||
if os.path.isdir(os.path.join('plugins', plugin)):
|
name='rscder',
|
||||||
setup(
|
version='1.0',
|
||||||
name = plugin,
|
author='Wang Tong',
|
||||||
ext_modules = cythonize(os.path.join('plugins', plugin, '*.py'), exclude=[ f'plugins/{plugin}/__init__.py']),
|
author_email='copper.w@foxmail.com',
|
||||||
script_args = ['build_ext', '-b', 'plugin-build'],
|
description='RSCDER',
|
||||||
)
|
long_description=open('ReadMe.md', 'r'),
|
||||||
shutil.copy(os.path.join('plugins', plugin, '__init__.py'), os.path.join('plugin-build', plugin, '__init__.py'))
|
packages=find_packages(),
|
||||||
|
ext_package=[],
|
||||||
|
entry_points=dict(
|
||||||
|
console_scripts=[
|
||||||
|
'rscder = rscder.ECD:main',
|
||||||
|
'keygen = rscder.keygen:main'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
15
setup_plugins.py
Normal file
15
setup_plugins.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from distutils.core import setup
|
||||||
|
import shutil
|
||||||
|
from Cython.Build import cythonize
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
for plugin in os.listdir('plugins'):
|
||||||
|
if os.path.isdir(os.path.join('plugins', plugin)):
|
||||||
|
setup(
|
||||||
|
name = plugin,
|
||||||
|
ext_modules = cythonize(os.path.join('plugins', plugin, '*.py'), exclude=[ f'plugins/{plugin}/__init__.py']),
|
||||||
|
script_args = ['build_ext', '-b', 'plugin-build'],
|
||||||
|
)
|
||||||
|
shutil.copy(os.path.join('plugins', plugin, '__init__.py'), os.path.join('plugin-build', plugin, '__init__.py'))
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user