diff --git a/.gitignore b/.gitignore index ff86293..92c6e69 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ dsa_priv.pem .DS_Store *~ Linux/dist -Windows/dist +Windows/bungloo \ No newline at end of file diff --git a/Qt/Bungloo.py b/Qt/Bungloo.py index 005f8f1..e597e95 100755 --- a/Qt/Bungloo.py +++ b/Qt/Bungloo.py @@ -4,8 +4,9 @@ import os, sys, pickle, subprocess, shutil from PyQt4 import QtCore, QtGui, QtWebKit, QtNetwork RUNNING_LOCAL = os.path.basename(sys.argv[0]) == "Bungloo.py" +RUNNING_ON_WINDOWS = os.name == "nt" -if RUNNING_LOCAL: +if RUNNING_LOCAL or RUNNING_ON_WINDOWS: import Windows, Helper else: from bungloo import Windows, Helper diff --git a/Qt/Helper.py b/Qt/Helper.py index 8938fb3..791a58d 100644 --- a/Qt/Helper.py +++ b/Qt/Helper.py @@ -5,7 +5,7 @@ from PyQt4.QtGui import * from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply from PyQt4.QtWebKit import QWebView -import os +import os, sys import array diff --git a/Windows/deploy.ps1 b/Windows/deploy.ps1 index 4dcff82..8441559 100644 --- a/Windows/deploy.ps1 +++ b/Windows/deploy.ps1 @@ -5,4 +5,8 @@ Copy-Item ../WebKit bungloo -Recurse Copy-Item ../images bungloo -Recurse Copy-Item setup.py bungloo touch bungloo/__init__.py -Copy-Item msvcp90.dll bungloo \ No newline at end of file +Copy-Item msvcp90.dll bungloo +cd bungloo +python setup.py py2exe +cd .. +rm bungloo \ No newline at end of file diff --git a/Windows/setup.py b/Windows/setup.py index 9e5bbcb..0ea0ceb 100644 --- a/Windows/setup.py +++ b/Windows/setup.py @@ -7,13 +7,11 @@ import py2exe files = [] for dirname, dirnames, filenames in os.walk('WebKit'): for filename in filenames: - print dirname, filename - files += [(dirname, os.path.join(dirname, filename))] - + files += [(dirname, [os.path.join(dirname, filename)])] for dirname, dirnames, filenames in os.walk('images'): for filename in filenames: - files += [(dirname, os.path.join(dirname, filename))] + files += [(dirname, [os.path.join(dirname, filename)])] setup( name = "Bungloo", @@ -22,9 +20,12 @@ setup( author_email = "spam@jeenaparadies.net", url = "http://jabs.nu/bungloo", license = "BSD license", - #data_files = files, + data_files = files, windows = ["Bungloo.py"], options = { - "py2exe": {"includes": ["sip", "PyQt4.QtCore", "PyQt4.QtGui", "PyQt4.QtNetwork"]} + "py2exe": { + "includes": ["sip", "ssl", "PyQt4.QtCore", "PyQt4.QtGui", "PyQt4.QtNetwork"], + "bundle_files": 2 + } } )