[pitivi] Add manually generated files for windows
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Add manually generated files for windows
- Date: Tue, 27 Apr 2010 20:28:17 +0000 (UTC)
commit abed3107e93e4c897a46417fee6d8b364ffebaf3
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Dec 4 00:46:52 2009 +0100
Add manually generated files for windows
We don't use autotools on windows. Generate manually
*.in files
win32/configure.py | 64 ++++++++++++++++++++++++++++
win32/pitivi | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 184 insertions(+), 0 deletions(-)
---
diff --git a/win32/configure.py b/win32/configure.py
new file mode 100644
index 0000000..ecca4b8
--- /dev/null
+++ b/win32/configure.py
@@ -0,0 +1,64 @@
+# PiTiVi , Non-linear video editor
+#
+# configure.py
+#
+# Copyright (c) 2005, Edward Hervey <bilboed bilboed com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+"""
+Utilities for getting the location of various directories.
+Enables identical use for installed and uninstalled versions.
+"""
+
+import os.path
+
+LIBDIR = os.path.realpath('../lib/')
+PKGDATADIR = os.path.realpath('../share/pitivi')
+PIXMAPDIR = os.path.realpath('../share/pitivi/pixmaps')
+pitivi_version = '0.13.4'
+APPNAME = 'pitivi'
+PYGTK_REQ = '2.12'
+PYGST_REQ = '0.10'
+GST_REQ = '0.10.22'
+GNONLIN_REQ = '0.10.12'
+PYCAIRO_REQ = '1.8'
+
+def _get_root_dir():
+ return '/'.join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1])
+
+def _in_devel():
+ rd = _get_root_dir()
+ return (os.path.exists(os.path.join(rd, '.svn')) or
+ os.path.exists(os.path.join(rd, 'CVS')) or
+ os.path.exists(os.path.join(rd, '.git')))
+
+def get_pixmap_dir():
+ """ Returns the directory for program-only pixmaps """
+ _dir = os.path.dirname(os.path.abspath(__file__))
+ if _in_devel():
+ root = _dir
+ else:
+ root = PKGDATADIR
+ print (os.path.join(root, 'pixmaps'))
+ return os.path.join(root, 'pixmaps')
+
+def get_global_pixmap_dir():
+ """ Returns the directory for global pixmaps (ex : application icon) """
+ if _in_devel():
+ root = _get_root_dir()
+ else:
+ root = PIXMAPDIR
+ return root
diff --git a/win32/pitivi b/win32/pitivi
new file mode 100644
index 0000000..e30bfa7
--- /dev/null
+++ b/win32/pitivi
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+# PiTiVi , Non-linear video editor
+#
+# pitivi
+#
+# Copyright (c) 2005, Edward Hervey <bilboed bilboed com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+import os
+import sys
+import string
+import locale
+import gettext
+
+# variables
+CONFIGURED_PYTHONPATH = 'c:\Python25'
+LIBDIR = os.path.realpath('../lib')
+
+localedir = ""
+
+# Check if we're in development or installed version
+# Add the path of pitivi stuff
+# TODO : change it when it's finally in cvs
+
+def _get_root_dir():
+ return '/'.join(os.path.dirname(os.path.abspath(os.getcwd())).split('/')[:-1])
+
+def _in_devel():
+ rd = _get_root_dir()
+ return (os.path.exists(os.path.join(rd, '.svn')) or
+ os.path.exists(os.path.join(rd, 'CVS')) or
+ os.path.exists(os.path.join(rd, '.git')))
+
+def _add_pitivi_path():
+ global localedir
+ dir = os.path.dirname(os.path.abspath(os.getcwd()))
+ root = None
+ if _in_devel():
+ root = os.path.split(dir)[0]
+ localedir = os.path.join(os.path.split(dir)[0], 'locale')
+ else:
+ root = os.path.join(LIBDIR, 'pitivi', 'python')
+ localedir = os.path.join('../share/locale')
+
+ if not root in sys.path:
+ sys.path.insert(0, root)
+
+ # prepend any directories found at configure time if they're not
+ # already in the path. (if they are already in the path, the user
+ # chose to have it that way, so we leave their order)
+ for path in string.split(CONFIGURED_PYTHONPATH, ':'):
+ if path not in sys.path:
+ sys.path.insert(0, path)
+
+ # Added for i18n
+ try:
+ locale.setlocale(locale.LC_ALL, '')
+ locale.bindtextdomain('pitivi', localedir)
+ locale.textdomain('pitivi')
+
+ gettext.bindtextdomain('pitivi', localedir)
+ gettext.textdomain('pitivi')
+ except:
+ print "Couldn't set locale !, reverting to C locale"
+
+def _init_gobject_gtk_gst():
+ global localedir
+ try:
+ import pygtk
+ pygtk.require("2.0")
+
+ import gtk
+
+ import gobject
+ gobject.threads_init()
+ except ImportError:
+ raise SystemExit("PyGTK couldn't be found !")
+
+ gobject.threads_init()
+
+ try:
+ from gtk import glade
+ except ImportError:
+ raise SystemExit("Can't find glade module")
+
+ glade.bindtextdomain('pitivi', localedir)
+
+ try:
+ import pygst
+ pygst.require('0.10')
+
+ import gst
+ except ImportError:
+ raise SystemExit("Gst-Python couldn't be found!")
+
+def _run_pitivi():
+ import pitivi.application as ptv
+
+ sys.exit(ptv.main(sys.argv))
+
+try:
+ _add_pitivi_path()
+ _init_gobject_gtk_gst()
+ _run_pitivi()
+except KeyboardInterrupt:
+ print "Interrupted by user!"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]