Пример #1
0
    def run(self, params):
        encoding = getOS().filesEncoding
        helpDirName = u"help"
        currentdir = unicode(os.path.dirname(__file__), encoding)

        helpPath = os.path.join(currentdir, helpDirName, _("datagraph_eng"))

        exeFile = getExeFile()
        if exeFile.endswith(".exe"):
            DETACHED_PROCESS = 0x00000008
            subprocess.Popen(
                [exeFile.encode(encoding), helpPath.encode(encoding), "--readonly"], creationflags=DETACHED_PROCESS
            )
        else:
            subprocess.Popen(["python", exeFile.encode(encoding), helpPath.encode(encoding), "--readonly"])
Пример #2
0
    def run(self, params):
        encoding = getOS().filesEncoding
        helpDirName = u"help"
        currentdir = unicode(os.path.dirname(__file__), encoding)

        helpPath = os.path.join(currentdir, helpDirName, _("datagraph_eng"))

        exeFile = getExeFile()
        if exeFile.endswith(".exe"):
            DETACHED_PROCESS = 0x00000008
            subprocess.Popen([
                exeFile.encode(encoding),
                helpPath.encode(encoding), "--readonly"
            ],
                             creationflags=DETACHED_PROCESS)
        else:
            subprocess.Popen([
                "python",
                exeFile.encode(encoding),
                helpPath.encode(encoding), "--readonly"
            ])
Пример #3
0
    def OnInit (self):
        getOS().migrateConfig()
        self._fullConfigPath = getConfigPath ()
        Application.init(self._fullConfigPath)

        try:
            starter = Starter()
            starter.processConsole()
        except StarterExit:
            return True

        # Если программа запускается в виде exe-шника, то перенаправить вывод ошибок в лог
        if getExeFile().endswith (u".exe"):
            # Закоментировать следующую строку, если не надо выводить strout/strerr в лог-файл
            self.RedirectStdio (self.getLogFileName (self._fullConfigPath))
            pass

        from outwiker.gui.mainwindow import MainWindow

        self.mainWnd = MainWindow(None, -1, "")
        self.SetTopWindow (self.mainWnd)

        Application.mainWindow = self.mainWnd
        Application.actionController = ActionController (self.mainWnd, Application.config)

        registerActions(Application)
        self.mainWnd.createGui()

        Application.plugins.load (getPluginsDirList())

        self.bindActivateApp()
        self.Bind (wx.EVT_QUERY_END_SESSION, self._onEndSession)

        starter.processGUI()

        return True