aboutsummaryrefslogtreecommitdiffstats
path: root/mvc/windows/exe_main.py
diff options
context:
space:
mode:
authorJesús Eduardo <heckyel@hyperbola.info>2017-05-31 18:08:31 -0500
committerJesús Eduardo <heckyel@hyperbola.info>2017-05-31 18:08:31 -0500
commite1180428ed3e7634fe1596103511fbb1da05f228 (patch)
tree13de9592bcde7050b089b9644839668024c518b3 /mvc/windows/exe_main.py
downloadlibrevideoconverter-e1180428ed3e7634fe1596103511fbb1da05f228.tar.lz
librevideoconverter-e1180428ed3e7634fe1596103511fbb1da05f228.tar.xz
librevideoconverter-e1180428ed3e7634fe1596103511fbb1da05f228.zip
first commit
Diffstat (limited to 'mvc/windows/exe_main.py')
-rwxr-xr-xmvc/windows/exe_main.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/mvc/windows/exe_main.py b/mvc/windows/exe_main.py
new file mode 100755
index 0000000..bd171d3
--- /dev/null
+++ b/mvc/windows/exe_main.py
@@ -0,0 +1,22 @@
+# before anything else, settup logging
+from mvc.windows import exelogging
+exelogging.setup_logging()
+
+import os
+import sys
+
+from mvc import settings
+from mvc.windows import autoupdate
+from mvc.widgets import app
+from mvc.widgets import initialize
+from mvc.ui.widgets import Application
+
+# add the directories for ffmpeg and avconv to our search path
+exe_dir = os.path.dirname(sys.executable)
+settings.add_to_search_path(os.path.join(exe_dir, 'ffmpeg'))
+settings.add_to_search_path(os.path.join(exe_dir, 'avconv'))
+# run the app
+app.widgetapp = Application()
+app.widgetapp.connect("window-shown", lambda w: autoupdate.startup())
+initialize(app.widgetapp)
+autoupdate.shutdown()