|  | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <falktx@falktx.com>
# SPDX-License-Identifier: GPL-2.0-or-later
# ----------------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)
from carla_host import *
# ----------------------------------------------------------------------------------------------------------------------
# Main
if __name__ == '__main__':
    import resources_rc
    # ------------------------------------------------------------------------------------------------------------------
    # Read CLI args
    initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)
    # ------------------------------------------------------------------------------------------------------------------
    # App initialization
    app = CarlaApplication("Carla2-Rack", libPrefix)
    # ------------------------------------------------------------------------------------------------------------------
    # Set-up custom signal handling
    setUpSignals()
    # ------------------------------------------------------------------------------------------------------------------
    # Init host backend
    os.environ["CARLA_NSM_NAME"] = "Carla-Rack"
    host = initHost(initName, libPrefix, False, False, True)
    host.processMode       = ENGINE_PROCESS_MODE_CONTINUOUS_RACK
    host.processModeForced = True
    loadHostSettings(host)
    # ------------------------------------------------------------------------------------------------------------------
    # Create GUI
    gui = HostWindow(host, not(LADISH_APP_NAME or NSM_URL))
    # ------------------------------------------------------------------------------------------------------------------
    # Show GUI
    gui.showIfNeeded()
    # ------------------------------------------------------------------------------------------------------------------
    # App-Loop
    app.exit_exec()
 |