def run(): print("LiSiCA initialiser program") if not os.path.isdir(os.path.join(HOME_DIRECTORY,"LiSiCA")): configure=Configuration() exe_filename=configure.exe_File() upgrader=Upgrader() jsonData=upgrader.findLatestVersion() url=jsonData['zipball_url'] installer_Object=Installer() installer_Object.downloadInstall(url) installer_Object.extractInstall() else : lisica_Folder=os.path.join(HOME_DIRECTORY,"LiSiCA") import FileStructure file_StructureObj=FileStructure.Directory_Structure(lisica_Folder) if file_StructureObj.check()==True: pass else: tkMessageBox.showerror("Missing Files", """LiSiCA Directory is corrupted. Missing files or folders. Try reinstalling the plugin """) #modify this exe_path="so" import License if License.checkLicenseStatus()==None: License.activate(exe_path) else: import Plugin_GUI Plugin_GUI.main()
def run(): print("Initialising LiSiCA...") try: sys.path.remove('') except: pass upgraderObj = UpgraderGitlab() if upgraderObj.firstUpgrade(): upgraderObj.findLatestVersionGUI() upgraderObj.upgrade() sys.path.append(os.path.normpath(os.path.join(LISICA_DIRECTORY,"modules"))) import License if License.checkVersionGUI()==None: upgraderObj.findLatestVersionGUI() upgraderObj.upgrade() del upgraderObj configure=Configuration() exe_filename=configure.exe_File() exe_path=os.path.normpath(os.path.join(LISICA_DIRECTORY,"bin",exe_filename)) st = os.stat(exe_path) os.chmod(exe_path, st.st_mode | stat.S_IEXEC) if License.checkLicenseStatus()==None: active=License.activate(exe_path) #if not active==1: #pass else: import Plugin_GUI Plugin_GUI.main()