# Soundboard Engine - customizable soundboard # Copyright (C) 2026 Vidhu Kant Sharma # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . import os import platform import sys from pathlib import Path from PySide6.QtWidgets import QApplication from Soundboard import Soundboard from SoundboardEngine import SoundboardEngineWindow APP_VERSION = "0.1.1" if __name__ == "__main__": config_path = ( Path(sys.argv[1]).resolve() if len(sys.argv) > 1 and sys.argv[1].endswith(".json") else Path("soundboard.json").resolve() ) if not config_path.exists(): print(f"Error: Could not find soundboard JSON at {config_path}") sys.exit(1) os.chdir(config_path.parent) _soundboard = Soundboard(config_path) _soundboard.build() if platform.system() == "Linux": os.environ["QT_QPA_PLATFORMTHEME"] = "gtk3" app = QApplication(sys.argv) app.setStyle("Fusion") app.setOrganizationName("VidhuKant") app.setApplicationName(_soundboard.soundboard_id) window = SoundboardEngineWindow(_soundboard, APP_VERSION) window.show() sys.exit(app.exec())