#!/usr/bin/env python2 import sys, signal def sigint(*a): print("\n*break*") sys.exit(0) if __name__ == "__main__": signal.signal(signal.SIGINT, sigint) from syncthing_gtk.tools import init_logging, IS_WINDOWS init_logging() if IS_WINDOWS: from syncthing_gtk import windows windows.fix_localized_system_error_messages() windows.dont_use_localization_in_gtk() from syncthing_gtk import App App(".", "./icons").run(sys.argv)
from syncthing_gtk.tools import init_logging init_logging() if portable: # Override syncthing_binary value in _Configuration class from syncthing_gtk.configuration import _Configuration _Configuration.WINDOWS_OVERRIDE["syncthing_binary"] = ( str, ".\\data\\syncthing.exe") from syncthing_gtk import windows, Configuration config = Configuration() # Force dark theme if reqested if config["force_dark_theme"]: os.environ["GTK_THEME"] = "Adwaita:dark" # Fix various windows-only problems windows.fix_localized_system_error_messages() windows.override_menu_borders() from gi.repository import Gtk Gtk.IconTheme.get_default().prepend_search_path( os.path.abspath(os.path.join(os.getcwd(), "icons", "32x32", "apps"))) Gtk.IconTheme.get_default().prepend_search_path( os.path.abspath(os.path.join(os.getcwd(), "icons"))) from syncthing_gtk import App if portable: App("./", "./icons").run(sys.argv) else: App(path, os.path.join(path, "icons")).run(sys.argv)
#!/c/Python27/python.exe # Note: this one is used by Windows import sys, os, gi, cairo, _winreg if __name__ == "__main__": path = "." if not os.path.exists("./app.glade"): # Usually from syncthing_gtk.tools import get_install_path path = get_install_path() # Tell cx_Freeze that I really need this library gi.require_foreign('cairo') from syncthing_gtk.tools import init_logging init_logging() from syncthing_gtk import windows windows.fix_localized_system_error_messages() windows.dont_use_localization_in_gtk() windows.override_menu_borders() from syncthing_gtk import App App(path, os.path.join(path, "icons")).run(sys.argv)
#!/usr/bin/env python2 import sys, signal def sigint(*a): print("\n*break*") sys.exit(0) if __name__ == "__main__": from syncthing_gtk import App signal.signal(signal.SIGINT, sigint) App("-w" not in sys.argv, ".", "./icons").run()