fix lic path bug
This commit is contained in:
parent
6567b75af1
commit
d9bb27727b
@ -1 +1 @@
|
|||||||
U2cvLo/waByK0JLEzMsbuevhDgvFdw9E2wATS9YnC1NrtbmcSH9Rb3F2Bn5G8D8AruY/+S4tf+Lj5PRRyUXubyM2e6erbEYW7HnA9BZljgLMHnmrxpiW1woR6OEWzhJH6Y6GILPn7S0esv4oO3JjRyDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO
|
hQVdKBoOtix4FXXBeCS2xKbn62UuzVBawFZNyqe7NC7TmeLHv01DbXw5dn6zRpIAUABwwX/BlC4/ALPfUp3mQMkL54T5w8DnW7Hiy4THLr4NaarWAhaS1y4CKpwmvPQnGyFmbkdAegYs1pX8quGkszDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO
|
@ -5,7 +5,7 @@ from PyQt5.QtGui import QIcon
|
|||||||
import os
|
import os
|
||||||
from rscder.utils.icons import IconInstance
|
from rscder.utils.icons import IconInstance
|
||||||
from rscder.utils.license import LicenseHelper
|
from rscder.utils.license import LicenseHelper
|
||||||
|
from rscder.utils.setting import Settings
|
||||||
class License(QtWidgets.QDialog):
|
class License(QtWidgets.QDialog):
|
||||||
|
|
||||||
def __init__(self, parent = None, flags = QtCore.Qt.WindowFlags() ) -> None:
|
def __init__(self, parent = None, flags = QtCore.Qt.WindowFlags() ) -> None:
|
||||||
@ -69,8 +69,9 @@ class License(QtWidgets.QDialog):
|
|||||||
if not os.path.exists(pth):
|
if not os.path.exists(pth):
|
||||||
QtWidgets.QMessageBox.warning(self, "Warning", "The selected file does not exist.")
|
QtWidgets.QMessageBox.warning(self, "Warning", "The selected file does not exist.")
|
||||||
else:
|
else:
|
||||||
if not os.path.exists('lic'):
|
lic_path = Settings.General().lic_path
|
||||||
os.mkdir('lic')
|
os.makedirs(os.path.dirname(lic_path), exist_ok=True)
|
||||||
shutil.copy(pth, os.path.join("lic", "license.lic"))
|
|
||||||
|
shutil.copy(pth, lic_path)
|
||||||
self.accept()
|
self.accept()
|
||||||
self.close()
|
self.close()
|
@ -1,8 +1,6 @@
|
|||||||
from rscder.plugins.misc import AlgFrontend
|
from rscder.plugins.misc import AlgFrontend
|
||||||
from rscder.plugins.misc.utils import format_now
|
from rscder.plugins.misc.utils import format_now
|
||||||
from osgeo import gdal, gdal_array
|
from osgeo import gdal, gdal_array
|
||||||
from skimage.filters import rank
|
|
||||||
from skimage.morphology import rectangle
|
|
||||||
from rscder.plugins.filter_collection import FILTER
|
from rscder.plugins.filter_collection import FILTER
|
||||||
from PyQt5.QtWidgets import QDialog, QAction
|
from PyQt5.QtWidgets import QDialog, QAction
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
from rscder.plugins.misc import AlgFrontend
|
from rscder.plugins.misc import AlgFrontend
|
||||||
from rscder.plugins.misc.utils import format_now
|
from rscder.plugins.misc.utils import format_now
|
||||||
from osgeo import gdal, gdal_array
|
from osgeo import gdal, gdal_array
|
||||||
from skimage.filters import rank
|
|
||||||
from skimage.morphology import rectangle
|
|
||||||
from rscder.plugins.filter_collection import FILTER
|
from rscder.plugins.filter_collection import FILTER
|
||||||
from PyQt5.QtWidgets import QDialog, QAction
|
from PyQt5.QtWidgets import QDialog, QAction
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
from rscder.plugins.misc import AlgFrontend
|
from rscder.plugins.misc import AlgFrontend
|
||||||
from rscder.plugins.misc.utils import format_now
|
from rscder.plugins.misc.utils import format_now
|
||||||
from osgeo import gdal, gdal_array
|
from osgeo import gdal, gdal_array
|
||||||
from skimage.filters import rank
|
|
||||||
from skimage.morphology import rectangle
|
|
||||||
from rscder.plugins.filter_collection import FILTER
|
from rscder.plugins.filter_collection import FILTER
|
||||||
from PyQt5.QtWidgets import QDialog, QAction
|
from PyQt5.QtWidgets import QDialog, QAction
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
from threading import Thread
|
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.gui.actions import ActionManager
|
||||||
from rscder.plugins.basic import BasicPlugin
|
from rscder.plugins.basic import BasicPlugin
|
||||||
from PyQt5.QtWidgets import QAction, QToolBar, QMenu, QDialog, QHBoxLayout, QVBoxLayout, QPushButton, QWidget, QLabel, QLineEdit, QPushButton, QComboBox, QDialogButtonBox
|
from PyQt5.QtWidgets import QAction, QToolBar, QMenu, QDialog, QHBoxLayout, QVBoxLayout, QPushButton, QWidget, QLabel, QLineEdit, QPushButton, QComboBox, QDialogButtonBox
|
||||||
|
@ -145,6 +145,11 @@ class Settings(QSettings):
|
|||||||
except:
|
except:
|
||||||
return datetime.now()
|
return datetime.now()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def lic_path(self):
|
||||||
|
lic_path =os.path.join(BASE_DIR, 'lic', 'license.lic')
|
||||||
|
return lic_path
|
||||||
|
|
||||||
@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')
|
||||||
|
2
test.lic
2
test.lic
@ -1 +1 @@
|
|||||||
U2cvLo/waByK0JLEzMsbuevhDgvFdw9E2wATS9YnC1NrtbmcSH9Rb3F2Bn5G8D8AruY/+S4tf+Lj5PRRyUXubyM2e6erbEYW7HnA9BZljgLMHnmrxpiW1woR6OEWzhJH6Y6GILPn7S0esv4oO3JjRyDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO
|
hQVdKBoOtix4FXXBeCS2xKbn62UuzVBawFZNyqe7NC7TmeLHv01DbXw5dn6zRpIAUABwwX/BlC4/ALPfUp3mQMkL54T5w8DnW7Hiy4THLr4NaarWAhaS1y4CKpwmvPQnGyFmbkdAegYs1pX8quGkszDRYXecz/lw58wkdZbHktpNVKfjoe827/aKa7gmYNXO
|
Loading…
x
Reference in New Issue
Block a user