fix lic path bug

This commit is contained in:
copper 2023-07-29 16:51:51 +08:00
parent 6567b75af1
commit d9bb27727b
8 changed files with 13 additions and 13 deletions

View File

@ -1 +1 @@
U2cvLo/waByK0JLEzMsbuevhDgvFdw9E2wATS9YnC1NrtbmcSH9Rb3F2Bn5G8D8AruY/+S4tf+Lj5PRRyUXubyM2e6erbEYW7HnA9BZljgLMHnmrxpiW1woR6OEWzhJH6Y6GILPn7S0esv4oO3JjRyDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO
hQVdKBoOtix4FXXBeCS2xKbn62UuzVBawFZNyqe7NC7TmeLHv01DbXw5dn6zRpIAUABwwX/BlC4/ALPfUp3mQMkL54T5w8DnW7Hiy4THLr4NaarWAhaS1y4CKpwmvPQnGyFmbkdAegYs1pX8quGkszDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO

View File

@ -5,7 +5,7 @@ from PyQt5.QtGui import QIcon
import os
from rscder.utils.icons import IconInstance
from rscder.utils.license import LicenseHelper
from rscder.utils.setting import Settings
class License(QtWidgets.QDialog):
def __init__(self, parent = None, flags = QtCore.Qt.WindowFlags() ) -> None:
@ -69,8 +69,9 @@ class License(QtWidgets.QDialog):
if not os.path.exists(pth):
QtWidgets.QMessageBox.warning(self, "Warning", "The selected file does not exist.")
else:
if not os.path.exists('lic'):
os.mkdir('lic')
shutil.copy(pth, os.path.join("lic", "license.lic"))
lic_path = Settings.General().lic_path
os.makedirs(os.path.dirname(lic_path), exist_ok=True)
shutil.copy(pth, lic_path)
self.accept()
self.close()

View File

@ -1,8 +1,6 @@
from rscder.plugins.misc import AlgFrontend
from rscder.plugins.misc.utils import format_now
from osgeo import gdal, gdal_array
from skimage.filters import rank
from skimage.morphology import rectangle
from rscder.plugins.filter_collection import FILTER
from PyQt5.QtWidgets import QDialog, QAction
from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,8 +1,6 @@
from rscder.plugins.misc import AlgFrontend
from rscder.plugins.misc.utils import format_now
from osgeo import gdal, gdal_array
from skimage.filters import rank
from skimage.morphology import rectangle
from rscder.plugins.filter_collection import FILTER
from PyQt5.QtWidgets import QDialog, QAction
from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,8 +1,6 @@
from rscder.plugins.misc import AlgFrontend
from rscder.plugins.misc.utils import format_now
from osgeo import gdal, gdal_array
from skimage.filters import rank
from skimage.morphology import rectangle
from rscder.plugins.filter_collection import FILTER
from PyQt5.QtWidgets import QDialog, QAction
from PyQt5 import QtCore, QtGui, QtWidgets

View File

@ -1,6 +1,6 @@
from functools import partial
from threading import Thread
from plugins.misc.main import AlgFrontend
from rscder.plugins.misc.main import AlgFrontend
from rscder.gui.actions import ActionManager
from rscder.plugins.basic import BasicPlugin
from PyQt5.QtWidgets import QAction, QToolBar, QMenu, QDialog, QHBoxLayout, QVBoxLayout, QPushButton, QWidget, QLabel, QLineEdit, QPushButton, QComboBox, QDialogButtonBox

View File

@ -145,6 +145,11 @@ class Settings(QSettings):
except:
return datetime.now()
@property
def lic_path(self):
lic_path =os.path.join(BASE_DIR, 'lic', 'license.lic')
return lic_path
@property
def license(self):
lic_path =os.path.join(BASE_DIR, 'lic', 'license.lic')

View File

@ -1 +1 @@
U2cvLo/waByK0JLEzMsbuevhDgvFdw9E2wATS9YnC1NrtbmcSH9Rb3F2Bn5G8D8AruY/+S4tf+Lj5PRRyUXubyM2e6erbEYW7HnA9BZljgLMHnmrxpiW1woR6OEWzhJH6Y6GILPn7S0esv4oO3JjRyDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO
hQVdKBoOtix4FXXBeCS2xKbn62UuzVBawFZNyqe7NC7TmeLHv01DbXw5dn6zRpIAUABwwX/BlC4/ALPfUp3mQMkL54T5w8DnW7Hiy4THLr4NaarWAhaS1y4CKpwmvPQnGyFmbkdAegYs1pX8quGkszDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO