Ignore:
Timestamp:
12/18/12 10:08:43 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Added support for a secondary instance (#157)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/mlx.py

    r298 r373  
    33from i18n import setLanguage
    44from sound import initializeSound
     5from util import secondaryInstallation
    56
    67import os
     
    5152
    5253    instance.close()
    53     os.execv(programPath, args)   
     54    os.execv(programPath, args)
    5455
    5556#--------------------------------------------------------------------------------------
     
    6061
    6162    global instance
    62     instance = SingleInstance("mlx", raiseCallbackWrapper)
     63    instance = SingleInstance("mlx" + ("-secondary" if secondaryInstallation
     64                                       else ""), raiseCallbackWrapper)
    6365    if not instance: return
    6466
     
    6971
    7072    if (len(sys.argv)<=1 or sys.argv[1]!="usedeflang") and config.setupLocale():
    71         restart(["usedeflang"])
     73        restart(["usedeflang"] + (["secondary"] if secondaryInstallation else []))
    7274
    7375    setLanguage(programDirectory, config.getLanguage())
    74    
     76
    7577    from .gui.gui import GUI
    7678    gui = GUI(programDirectory, config)
    77    
     79
    7880    sys.stdout = StdIOHandler(gui)
    7981    sys.stderr = StdIOHandler(gui)
Note: See TracChangeset for help on using the changeset viewer.