Beispiel #1
0
    def finishReplay(self, reply):
        if reply.error() != QNetworkReply.NoError:
            QtWidgets.QMessageBox.warning(self, "Network Error", reply.errorString())
        else:
            filename = os.path.join(util.CACHE_DIR, str("tutorial.fafreplay"))
            replay = QtCore.QFile(filename)
            replay.open(QtCore.QIODevice.WriteOnly | QtCore.QIODevice.Text)
            replay.write(reply.readAll())
            replay.close()

            fa.replay(filename, True)
Beispiel #2
0
 def finishReplay(self, reply):
     if reply.error() != QNetworkReply.NoError:
         QtGui.QMessageBox.warning(self, "Network Error", reply.errorString())
     else:
         filename = os.path.join(util.CACHE_DIR, str("tutorial.fafreplay"))
         replay  = QtCore.QFile(filename)
         replay.open(QtCore.QIODevice.WriteOnly | QtCore.QIODevice.Text)
         replay.write(reply.readAll())
         replay.close()
 
         fa.replay(filename, True)
Beispiel #3
0
    app = QtGui.QApplication(sys.argv)
    # Set application icon to nicely stack in the system task bar
    app.setWindowIcon(util.icon("window_icon.png", True))

    # We can now set our excepthook since the app has been initialized
    sys.excepthook = excepthook

    if platform.system() == "Windows":
        import ctypes
        if getattr(ctypes.windll.shell32, "SetCurrentProcessExplicitAppUserModelID", None) is not None:
            myappid = 'com.faforever.lobby'
            ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)

    if len(sys.argv) == 1:
        #Do the magic   
        sys.path += ['.'] 
        runFAF()
    else:  
        # Try to interpret the argument as a replay.
        if sys.argv[1].lower().endswith(".fafreplay") or sys.argv[1].lower().endswith(".scfareplay"):
            import fa
            fa.replay(sys.argv[1], True)  # Launch as detached process

    #End of show
    app.closeAllWindows()    
    app.quit()
    
    #End the application, perform some housekeeping
    logger.info("<<< --------------------------- Application Shutdown")    

Beispiel #4
0
    # We can now set our excepthook since the app has been initialized
    sys.excepthook = excepthook

    if platform.system() == "Windows":
        import ctypes
        if getattr(ctypes.windll.shell32,
                   "SetCurrentProcessExplicitAppUserModelID",
                   None) is not None:
            myappid = 'com.faforever.lobby'
            ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
                myappid)

    if len(sys.argv) == 1:
        #Do the magic
        sys.path += ['.']
        runFAF()
    else:
        # Try to interpret the argument as a replay.
        if sys.argv[1].lower().endswith(
                ".fafreplay") or sys.argv[1].lower().endswith(".scfareplay"):
            import fa
            fa.replay(sys.argv[1], True)  # Launch as detached process

    #End of show
    app.closeAllWindows()
    app.quit()

    #End the application, perform some housekeeping
    logger.info("<<< --------------------------- Application Shutdown")
Beispiel #5
0
            myappid = 'com.faforever.lobby'
            ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
                myappid)

    logger = logging.getLogger(__name__)
    logger.info(">>> --------------------------- Application Launch")

    # Set application icon to nicely stack in the system task bar
    app.setWindowIcon(util.THEME.icon("window_icon.png", True))

    # We can now set our excepthook since the app has been initialized
    sys.excepthook = excepthook

    if len(trailing_args) == 0:
        # Do the magic
        sys.path += ['.']
        runFAF()
    else:
        # Try to interpret the argument as a replay.
        if trailing_args[0].lower().endswith(".fafreplay") or trailing_args[
                0].lower().endswith(".scfareplay"):
            import fa
            fa.replay(trailing_args[0], True)  # Launch as detached process

    # End of show
    app.closeAllWindows()
    app.quit()

    # End the application, perform some housekeeping
    logger.info("<<< --------------------------- Application Shutdown")