Cleanup
[carla.git] / source / frontend / carla-rack
blobe959feb650ebe46a50e3472eec6b85f989eaed9c
1 #!/usr/bin/env python3
2 # SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <falktx@falktx.com>
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 # ----------------------------------------------------------------------------------------------------------------------
6 # Imports (Custom Stuff)
8 from carla_host import *
10 # ----------------------------------------------------------------------------------------------------------------------
11 # Main
13 if __name__ == '__main__':
14     import resources_rc
16     # ------------------------------------------------------------------------------------------------------------------
17     # Read CLI args
19     initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)
21     # ------------------------------------------------------------------------------------------------------------------
22     # App initialization
24     app = CarlaApplication("Carla2-Rack", libPrefix)
26     # ------------------------------------------------------------------------------------------------------------------
27     # Set-up custom signal handling
29     setUpSignals()
31     # ------------------------------------------------------------------------------------------------------------------
32     # Init host backend
34     os.environ["CARLA_NSM_NAME"] = "Carla-Rack"
36     host = initHost(initName, libPrefix, False, False, True)
37     host.processMode       = ENGINE_PROCESS_MODE_CONTINUOUS_RACK
38     host.processModeForced = True
39     loadHostSettings(host)
41     # ------------------------------------------------------------------------------------------------------------------
42     # Create GUI
44     gui = HostWindow(host, not(LADISH_APP_NAME or NSM_URL))
46     # ------------------------------------------------------------------------------------------------------------------
47     # Show GUI
49     gui.showIfNeeded()
51     # ------------------------------------------------------------------------------------------------------------------
52     # App-Loop
54     app.exit_exec()