From 66df092f4ed9c62b8d9c1498c93cae2b1d50ec02 Mon Sep 17 00:00:00 2001
From: Matthias Kramm <kramm@quiss.org>
Date: Thu, 20 May 2010 18:17:02 -0700
Subject: [PATCH] gpdf2swf fixes

---
 configure.in                 |    2 +-
 installer/installer.c        |    2 +-
 wx/Makefile                  |    1 +
 wx/gui/__init__.py           |    2 --
 wx/gui/{main.py => gmain.py} |    0
 wx/gui/options/viewer.py     |    7 +++++--
 6 files changed, 8 insertions(+), 6 deletions(-)
 rename wx/gui/{main.py => gmain.py} (100%)

diff --git a/configure.in b/configure.in
index 515718a..d26a100 100644
--- a/configure.in
+++ b/configure.in
@@ -34,7 +34,7 @@ if test "x$enable_lame" = "xno";then
 fi,DISABLE_LAME=)
 
 PACKAGE=swftools
-VERSION=2010-02-06-1900
+VERSION=2010-05-20-1815
 
 # ------------------------------------------------------------------
 
diff --git a/installer/installer.c b/installer/installer.c
index 58c7765..b62721d 100644
--- a/installer/installer.c
+++ b/installer/installer.c
@@ -558,7 +558,7 @@ static HRESULT (WINAPI *f_SHGetSpecialFolderPath)(HWND hwnd, LPTSTR lpszPath, in
 
 BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
     if(message == WM_INITDIALOG) {
-	pdf2swf_dir = concatPaths(install_path, "gpdf2swf");
+	pdf2swf_dir = install_path; //concatPaths(install_path, "gpdf2swf");
 	pdf2swf_path = concatPaths(pdf2swf_dir, "gpdf2swf.exe");
 	FILE*fi = fopen(pdf2swf_path, "rb");
 	if(fi) {
diff --git a/wx/Makefile b/wx/Makefile
index 57fc5f5..3ed15ef 100644
--- a/wx/Makefile
+++ b/wx/Makefile
@@ -13,5 +13,6 @@ pdf2swf_gui.exe: gpdf2swf.py gui/*.py viewers/*.py
 	ln -f /xpython/xpython.exe ./gpdf2swf.exe
 	#ln -f gpdf2swf.exe ../win32_gui/
 	ln -f gpdf2swf.exe ../win32/
+	cp -R viewers/* ../win32/viewers/
 
 .PHONY: exe
diff --git a/wx/gui/__init__.py b/wx/gui/__init__.py
index a12f187..25f7df3 100644
--- a/wx/gui/__init__.py
+++ b/wx/gui/__init__.py
@@ -22,5 +22,3 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-from main import *
-from dialogs import *
diff --git a/wx/gui/main.py b/wx/gui/gmain.py
similarity index 100%
rename from wx/gui/main.py
rename to wx/gui/gmain.py
diff --git a/wx/gui/options/viewer.py b/wx/gui/options/viewer.py
index 94ab7fa..16758f8 100644
--- a/wx/gui/options/viewer.py
+++ b/wx/gui/options/viewer.py
@@ -47,8 +47,11 @@ class Viewers:
 
     def import_viewers(self):
         for file in self.viewers:
-            _temp = imp.load_source("viewers.%s" % file, os.path.join(os.getcwdu(), "viewers/%s.py" % file))
-            self.modules.append(_temp)
+            try:
+                _temp = imp.load_source("viewers.%s" % file, os.path.join(os.getcwdu(), "viewers/%s.py" % file))
+                self.modules.append(_temp)
+            except:
+                print "Could not load %s" % file
 
 
 
-- 
1.7.10.4