From a184b0af1fbc1e45dcfaaf5aaec7c62a84af6285 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Jan 2017 02:49:40 +0000 Subject: [PATCH] Remove log tab under windows, ship a CarlaDebug.exe instead --- data/windows/app-console.py | 31 +++++++++++++++++++++++++++++ data/windows/{app.py => app-gui.py} | 0 data/windows/build-win32.sh | 5 ++++- data/windows/build-win64.sh | 5 ++++- source/carla_host.py | 3 +++ source/carla_settings.py | 4 ++++ source/carla_shared.py | 2 +- 7 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 data/windows/app-console.py rename data/windows/{app.py => app-gui.py} (100%) diff --git a/data/windows/app-console.py b/data/windows/app-console.py new file mode 100644 index 000000000..e23e1d35c --- /dev/null +++ b/data/windows/app-console.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# ------------------------------------------------------------------------------------------------------------ +# Imports (cx_Freeze) + +from cx_Freeze import setup, Executable + +# ------------------------------------------------------------------------------------------------------------ +# Imports (Custom Stuff) + +from carla_host import VERSION + +# ------------------------------------------------------------------------------------------------------------ + +options = { + "icon": ".\\resources\\ico\\carla.ico", + "packages": [], + "includes": ["re", "sip", "subprocess", "inspect"], + "build_exe": ".\\data\\windows\\Carla\\", + "optimize": True, + "compressed": True +} + +setup(name = "Carla", + version = VERSION, + description = "Carla Plugin Host", + options = {"build_exe": options}, + executables = [Executable(".\\source\\carla")]) + +# ------------------------------------------------------------------------------------------------------------ diff --git a/data/windows/app.py b/data/windows/app-gui.py similarity index 100% rename from data/windows/app.py rename to data/windows/app-gui.py diff --git a/data/windows/build-win32.sh b/data/windows/build-win32.sh index 3d114ffa1..af4af8220 100755 --- a/data/windows/build-win32.sh +++ b/data/windows/build-win32.sh @@ -43,8 +43,11 @@ make BUILDING_FOR_WINDOWS=true $JOBS export PYTHONPATH=`pwd`/source rm -rf ./data/windows/Carla +mkdir -p ./data/windows/Carla/Debug cp ./source/carla ./source/Carla.pyw -$PYTHON_EXE ./data/windows/app.py build_exe +$PYTHON_EXE ./data/windows/app-console.py build_exe +mv ./data/windows/Carla/carla.exe ./data/windows/Carla/Debug/Carla.exe +$PYTHON_EXE ./data/windows/app-gui.py build_exe rm -f ./source/Carla.pyw cd data/windows/ diff --git a/data/windows/build-win64.sh b/data/windows/build-win64.sh index 160aa06b9..bb6ade164 100755 --- a/data/windows/build-win64.sh +++ b/data/windows/build-win64.sh @@ -45,8 +45,11 @@ make BUILDING_FOR_WINDOWS=true LDFLAGS="-L/opt/mingw32/i686-w64-mingw32/lib/" wi export PYTHONPATH=`pwd`/source rm -rf ./data/windows/Carla +mkdir -p ./data/windows/Carla/Debug cp ./source/carla ./source/Carla.pyw -$PYTHON_EXE ./data/windows/app.py build_exe +$PYTHON_EXE ./data/windows/app-console.py build_exe +mv ./data/windows/Carla/carla.exe ./data/windows/Carla/Debug/Carla.exe +$PYTHON_EXE ./data/windows/app-gui.py build_exe rm -f ./source/Carla.pyw cd data/windows/ diff --git a/source/carla_host.py b/source/carla_host.py index 6a015c633..a19b84d04 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -199,6 +199,9 @@ class HostWindow(QMainWindow): else: self.ui.act_engine_start.setEnabled(True) + if WINDOWS: + self.ui.tabWidget.removeTab(2) + if not self.host.isControl: self.ui.act_file_connect.setEnabled(False) self.ui.act_file_connect.setVisible(False) diff --git a/source/carla_settings.py b/source/carla_settings.py index 58846602b..015cac411 100755 --- a/source/carla_settings.py +++ b/source/carla_settings.py @@ -242,6 +242,10 @@ class CarlaSettingsW(QDialog): self.ui.ch_main_manage_uis.setEnabled(False) self.ui.ch_main_manage_uis.setVisible(False) + if WINDOWS: + self.ui.ch_main_show_logs.setEnabled(False) + self.ui.ch_main_show_logs.setVisible(False) + if host.isControl: self.ui.lw_page.hideRow(self.TAB_INDEX_CANVAS) self.ui.lw_page.hideRow(self.TAB_INDEX_ENGINE) diff --git a/source/carla_shared.py b/source/carla_shared.py index 359cc9c41..92b42dfc4 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -238,7 +238,7 @@ CARLA_DEFAULT_MAIN_PRO_THEME_COLOR = "Black" CARLA_DEFAULT_MAIN_REFRESH_INTERVAL = 20 CARLA_DEFAULT_MAIN_USE_CUSTOM_SKINS = True CARLA_DEFAULT_MAIN_MANAGE_UIS = True -CARLA_DEFAULT_MAIN_SHOW_LOGS = True +CARLA_DEFAULT_MAIN_SHOW_LOGS = bool(not WINDOWS) # Canvas CARLA_DEFAULT_CANVAS_THEME = "Modern Dark"