Project

Profile

Help

Revision e43bc209

Added by Vincent Le Goff about 3 years ago

Fix #105: CocoMUD crashes when connecting to a world on Linux

View differences:

src/setup.py
33 33

  
34 34
client = Executable(
35 35
    script="cocomud.py",
36
    base="Win32GUI",
36
    base="Console",
37
    #base="Win32GUI",
37 38
)
38 39

  
39 40
updater = Executable(
40 41
    script="updater.py",
41
    base="Win32GUI",
42
    #base="Win32GUI",
42 43
)
43 44

  
44 45
dbg_updater = Executable(
......
53 54

  
54 55
    # Requests
55 56
    "cacert.pem",
56

  
57
    # UniversalSpeech DLLs
58
    "../dolapi.dll",
59
    "../jfwapi.dll",
60
    "../nvdaControllerClient.dll",
61
    "../SAAPI32.dll",
62
    "../UniversalSpeech.dll",
63 57
]
64 58

  
59
if os.name == "nt":
60
    includefiles += [
61
        # UniversalSpeech DLLs
62
        "../dolapi.dll",
63
        "../jfwapi.dll",
64
        "../nvdaControllerClient.dll",
65
        "../SAAPI32.dll",
66
        "../UniversalSpeech.dll",
67
    ]
68

  
65 69
if os.path.exists("build/CocoMUD"):
66 70
    shutil.rmtree("build/CocoMUD")
67 71

  
......
74 78
            "excludes": ["_gtkagg", "_tkagg", "bsddb", "curses",
75 79
                    "pywin.debugger", "pywin.debugger.dbgcon",
76 80
                    "pywin.dialogs", "tcl", "Tkconstants", "Tkinter"],
77
            "packages": ["accesspanel", "redmine.resources"],
81
            "packages": ["accesspanel", "redminelib.resources", "_cffi_backend"],
78 82
    }},
79 83
    executables = [client, updater, dbg_updater]
80 84
)
src/task/import_worlds.py
29 29
"""Asynchronous task to import worlds from the website."""
30 30

  
31 31
from collections import namedtuple
32
from redmine import Redmine
32
from redminelib import Redmine
33 33
from ytranslate import t
34 34

  
35 35
from task.base import BaseTask
src/ui/dialogs/alias.py
161 161
            aliases.append(alias)
162 162

  
163 163
        self.world.save_config()
164
        self.Destroy()
164
        self.EndModal(wx.ID_OK)
165 165

  
166 166
    def OnClose(self, e):
167 167
        """Simply exit the dialog."""
......
176 176
            act_aliases[alias.alias] = alias.action
177 177

  
178 178
        if dlg_aliases == act_aliases:
179
            self.Destroy()
179
            self.EndModal(wx.ID_CANCEL)
180 180
        else:
181 181
            value = wx.MessageBox(t("ui.message.alias.unsaved"),
182 182
                    t("ui.alert.confirm"),
183 183
                    wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
184 184

  
185 185
            if value == wx.YES:
186
                self.Destroy()
186
                self.EndModal(wx.ID_CANCEL)
187 187

  
188 188

  
189 189
class EditAliasDialog(wx.Dialog):
......
255 255
            self.alias.re_alias = self.alias.find_regex(self.alias.alias)
256 256
            if self.alias not in self.aliases:
257 257
                self.aliases.append(self.alias)
258
            self.Destroy()
258
            self.EndModal(wx.ID_OK)
259 259

  
260 260
    def OnCancel(self, e):
261 261
        """Simply exit the dialog."""
262
        self.Destroy()
262
        self.EndModal(wx.ID_CANCEL)
263

  
src/ui/dialogs/bug.py
74 74

  
75 75
    def OnClose(self, e):
76 76
        """The user clicked on the 'close' button."""
77
        self.Destroy()
77
        self.EndDialog(wx.ID_CANCEL)
78

  
src/ui/dialogs/connection.py
228 228

  
229 229
        self.session.world = world
230 230
        self.session.character = character
231
        self.Destroy()
231
        self.EndModal(wx.ID_OK)
232 232

  
233 233
    def OnImport(self, e):
234 234
        """The user clicked on the import button."""
src/ui/dialogs/macro.py
215 215
            macros.append(macro)
216 216

  
217 217
        self.world.save_config()
218
        self.Destroy()
218
        self.EndModal(wx.ID_OK)
219 219

  
220 220
    def OnClose(self, e):
221 221
        """Simply exit the dialog."""
......
230 230
            act_macros[macro.key, macro.modifiers] = macro.action
231 231

  
232 232
        if dlg_macros == act_macros:
233
            self.Destroy()
233
            self.EndModal(wx.ID_CANCEL)
234 234
        else:
235 235
            value = wx.MessageBox(t("ui.message.macro.unsaved"),
236 236
                    t("ui.alert.confirm"),
237 237
                    wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
238 238

  
239 239
            if value == wx.YES:
240
                self.Destroy()
240
                self.EndModal(wx.ID_CANCEL)
241 241

  
242 242

  
243 243
class EditMacroDialog(wx.Dialog):
......
328 328
            self.macro.action = action
329 329
            if self.macro not in self.macros:
330 330
                self.macros.append(self.macro)
331
            self.Destroy()
331
            self.EndModal(wx.ID_OK)
332 332

  
333 333
    def OnCancel(self, e):
334 334
        """Simply exit the dialog."""
335
        self.Destroy()
335
        self.EndModal(wx.ID_CANCEL)
336

  
src/ui/dialogs/preferences.py
404 404
            wx.MessageBox(t("ui.dialog.preferences.update_richtext"),
405 405
                    t("ui.button.restart"), wx.OK | wx.ICON_INFORMATION)
406 406

  
407
        self.Destroy()
407
        self.EndModal(wx.ID_OK)
408 408

  
409 409
    def OnCancel(self, e):
410 410
        """Simply exit the dialog."""
411
        self.Destroy()
411
        self.EndModal(wx.ID_OK)
412

  
src/ui/dialogs/trigger.py
162 162
            triggers.append(trigger)
163 163

  
164 164
        self.world.save_config()
165
        self.Destroy()
165
        self.EndModal(wx.ID_OK)
166 166

  
167 167
    def OnClose(self, e):
168 168
        """Simply exit the dialog."""
......
177 177
            act_triggers[trigger.reaction] = trigger.action
178 178

  
179 179
        if dlg_triggers == act_triggers:
180
            self.Destroy()
180
            self.EndModal(wx.ID_CANCEL)
181 181
        else:
182 182
            value = wx.MessageBox(t("ui.message.trigger.unsaved"),
183 183
                    t("ui.alert.confirm"),
184 184
                    wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
185 185

  
186 186
            if value == wx.YES:
187
                self.Destroy()
187
                self.EndModal(wx.ID_CANCEL)
188 188

  
189 189

  
190 190
class EditTriggerDialog(wx.Dialog):
......
283 283
            self.trigger.mark = mark
284 284
            if self.trigger not in self.triggers:
285 285
                self.triggers.append(self.trigger)
286
            self.Destroy()
286
            self.EndModal(wx.ID_OK)
287 287

  
288 288
    def OnCancel(self, e):
289 289
        """Simply exit the dialog."""
290
        self.Destroy()
290
        self.EndModal(wx.ID_OK)
291

  
src/ui/window.py
236 236

  
237 237
    def InitUI(self, world=None):
238 238
        self.create_updater(just_checking=True)
239
        session = Session(None, None)
239 240
        if world is None:
240
            session = Session(None, None)
241 241
            dialog = ConnectionDialog(self.engine, session)
242 242
            self.connection = dialog
243 243
            value = dialog.ShowModal()
tools/export_wiki.py
17 17
import urllib2
18 18

  
19 19
from BeautifulSoup import BeautifulSoup
20
from redmine import Redmine
20
from redminelib import Redmine
21 21

  
22 22
# Create an argument parser
23 23
parser = argparse.ArgumentParser(

Also available in: Unified diff