Ejemplo n.º 1
0
import os
import sys
import multiprocessing
import logging.config

from check_os import check_environment, check_free_space, error_and_exit, setup_gui_logging, \
    should_kill_other_tribler_instances


if __name__ == "__main__":
    # Exit if we cant read/write files, etc.
    check_environment()

    multiprocessing.freeze_support()

    should_kill_other_tribler_instances()

    check_free_space()

    # Set up logging
    setup_gui_logging()

    try:
        from TriblerGUI.tribler_app import TriblerApplication
        from TriblerGUI.tribler_window import TriblerWindow

        app = TriblerApplication("triblerapp", sys.argv)

        if app.is_running():
            for arg in sys.argv[1:]:
                if os.path.exists(arg) and arg.endswith(".torrent"):
Ejemplo n.º 2
0
    reactor.callWhenRunning(start_tribler)
    reactor.run()


if __name__ == "__main__":
    # Check whether we need to start the core or the user interface
    if 'CORE_PROCESS' in os.environ:
        base_path = os.environ['CORE_BASE_PATH']
        api_port = os.environ['CORE_API_PORT']
        start_tribler_core(base_path, api_port)
    else:
        try:
            enable_fault_handler()

            # Exit if we cant read/write files, etc.
            check_environment()

            should_kill_other_tribler_instances()

            check_free_space()

            # Set up logging
            setup_gui_logging()

            from TriblerGUI.tribler_app import TriblerApplication
            from TriblerGUI.tribler_window import TriblerWindow

            app = TriblerApplication("triblerapp", sys.argv)

            if app.is_running():
                for arg in sys.argv[1:]: