2 # -*- coding: UTF-8 -*-
5 # graphical user interface for pdf2swf
7 # Part of the swftools package.
9 # Copyright (c) 2008,2009 Matthias Kramm <kramm@quiss.org>
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
25 from __future__ import division
31 #def main_is_frozen():
32 # return (hasattr(sys, "frozen") or # new py2exe
33 # hasattr(sys, "importers") # old py2exe
34 # or imp.is_frozen("__main__")) # tools/freeze
36 ##if not main_is_frozen():
39 ## wxversion.select("2.6")
41 ## wxversion.select("2.8")
44 # if main_is_frozen():
45 # return os.path.dirname(sys.executable)
46 # return os.path.dirname(os.path.abspath(__file__))
47 #__builtin__.get_main_dir = get_main_dir
48 #__builtin__.GPDF2SWF_BASEDIR = get_main_dir()
50 #pyver = "".join(map(str, sys.version_info[0:2]))
51 ##print >>sys.stderr, pyver
53 # sys.path.insert(0, os.path.join("..", "python%s" % pyver))
55 # sys.path.insert(0, os.path.join("..", "lib", "python"))
56 # sys.path.insert(1, os.path.join("..", "python%s" % pyver))
59 #print >>sys.stderr, wx.VERSION
60 from lib.app import Pdf2Swf
62 __builtin__.GPDF2SWF_BASEDIR = os.path.dirname(os.path.abspath(sys.argv[0]))
64 if __name__ == "__main__":
65 #print "sys.argv[0]", sys.argv[0]
66 #print "abspath sys.argv[0]",
67 #print "sys.executable", sys.executable
68 #print "abspath sys.executable", os.path.abspath(sys.executable)
69 #print "GPDF2SWF_BASEDIR", GPDF2SWF_BASEDIR
71 app.SetAppName(u"gpdf2swf")