X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=iramuteq.py;h=f33bc90f8f5525dfebedb00c715c4b9eb0aa8be1;hp=9fe152e63a43829278ae3566a35f4b1e4d065361;hb=74255fdad5e1a929fe9b199b0d58fdd185ad3c58;hpb=adc24190c47d42d5fa02f074516fc331950d8c5c diff --git a/iramuteq.py b/iramuteq.py index 9fe152e..f33bc90 100644 --- a/iramuteq.py +++ b/iramuteq.py @@ -106,7 +106,10 @@ if sys.platform == 'darwin' : else : sys.setdefaultencoding(locale.getpreferredencoding()) #chemin de l'application -AppliPath = os.path.abspath(os.path.dirname(os.path.realpath(sys.argv[0]))) +try : + AppliPath = sys._MEIPASS +except : + AppliPath = os.path.abspath(os.path.dirname(os.path.realpath(sys.argv[0]))) #chemin des images ImagePath = os.path.join(AppliPath, 'images') #configuration generale @@ -148,7 +151,6 @@ sys.stdout = printer() ConfigPath = ConstructConfigPath(UserConfigPath) - langues = {'french' : wx.LANGUAGE_FRENCH, 'english' : wx.LANGUAGE_ENGLISH,} ##################################################################### @@ -441,6 +443,7 @@ class IraFrame(wx.Frame): self.pref.read(self.ConfigPath['preferences']) if IsNew(self) : UpgradeConf(self) + self.pref.read(self.ConfigPath['preferences']) New = True else : CopyConf(self) @@ -508,7 +511,7 @@ vous devez signaler le chemin de l'éxecutable de R dans les préférences.""" def OnVerif(self, evt) : pack = CheckRPackages(self) if pack : - dlg = wx.MessageDialog(self, u"Installation OK", u"Installation", wx.OK | wx.NO_DEFAULT | wx.ICON_INFORMATION) + dlg = wx.MessageDialog(self, u"Installation OK", u"Installation", wx.OK | wx.ICON_INFORMATION) dlg.CenterOnParent() if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]: evt.Veto()