diff --git a/gitso/trunk/ArgsParser.py b/gitso/trunk/ArgsParser.py index 3c6f648..de57dbe 100644 --- a/gitso/trunk/ArgsParser.py +++ b/gitso/trunk/ArgsParser.py @@ -46,6 +46,9 @@ class ArgsParser: if sys.platform.find('linux') != -1: self.paths['main'] = os.path.join(sys.path[0], '..', 'share', 'gitso') self.paths['copyright'] = os.path.join(sys.path[0], '..', 'share', 'doc', 'gitso', 'COPYING') + elif sys.platform == "darwin": + self.paths['main'] = sys.path[0] + self.paths['copyright'] = os.path.join(sys.path[0], 'COPYING') else: self.paths['main'] = os.path.join(sys.path[0], '..') self.paths['copyright'] = os.path.join(sys.path[0], '..', 'COPYING') @@ -64,18 +67,21 @@ class ArgsParser: if sys.platform == "darwin": if not os.path.exists('build/OSXvnc'): os.popen("mkdir build; cp arch/osx/OSXvnc.tar.gz build ; cd build ; tar xvfz OSXvnc.tar.gz > /dev/null") - if not os.path.exists('build/vncviewer'): - os.popen("cp arch/osx/vncviewer.tar.gz build ; cd build ; tar xvfz vncviewer.tar.gz > /dev/null") if not os.path.exists('build/cotvnc.app'): os.popen("cp arch/osx/cotvnc.app.tar.gz build ; cd build ; tar xvfz cotvnc.app.tar.gz > /dev/null") + self.paths['resources'] = 'build/' + self.paths['main'] = sys.path[0] + self.paths['copyright'] = os.path.join(sys.path[0], 'COPYING') + elif sys.platform == "win32": - self.paths['main'] = os.path.join(sys.path[0]) self.paths['copyright'] = os.path.join(sys.path[0], 'COPYING') + self.paths['main'] = os.path.join(sys.path[0]) self.paths['resources'] = 'arch/win32/' + else: self.paths['resources'] = 'arch/linux/' - self.paths['main'] = os.path.join(sys.path[0]) + self.paths['main'] = os.path.join(sys.path[0]) self.paths['copyright'] = os.path.join(sys.path[0], 'COPYING') elif sys.argv[i] == '--listen': # --listen diff --git a/gitso/trunk/Gitso.py b/gitso/trunk/Gitso.py index 8cfd74c..0cc0be8 100644 --- a/gitso/trunk/Gitso.py +++ b/gitso/trunk/Gitso.py @@ -23,9 +23,30 @@ You should have received a copy of the GNU General Public License along with Gitso. If not, see . """ +import sys, platform, re + +if sys.platform == 'darwin': + # If we're on Snow Leopard, we want to use Python 2.5 until we figure out what Apple's doing with 2.6 + ver = platform.mac_ver() + + if re.match('10\.6', ver[0]) <> None: + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python26.zip') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-old') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload') + sys.path.append('/Library/Python/2.5/site-packages') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC') + sys.path.append('/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode') + import wx import ConnectionWindow, ArgsParser + if __name__ == "__main__": app = wx.PySimpleApp() args = ArgsParser.ArgsParser() diff --git a/gitso/trunk/makegitso.sh b/gitso/trunk/makegitso.sh index 50f9a6c..b781dca 100755 --- a/gitso/trunk/makegitso.sh +++ b/gitso/trunk/makegitso.sh @@ -20,6 +20,7 @@ ########## +DMG="Gitso_0.6.dmg" DEB="gitso_0.6_all.deb" TARGZ="gitso_0.6_all.tar.gz" SRC="gitso_0.6_src.tar.bz2" @@ -106,13 +107,17 @@ if [ "`uname -a | grep Darwin`" != "" ]; then py2applet --make-setup Gitso.py echo -e ".." + + # To manually include the wx libraries, I'm not sure we need them... + # python setup.py py2app --includes=wx --packages=wx + python setup.py py2app rm setup.py echo -e ".." cp arch/osx/Info.plist dist/Gitso.app/Contents/ - cp copyright dist/Gitso.app/Contents/Resources/ + cp COPYING dist/Gitso.app/Contents/Resources/ cp PythonApplet.icns dist/Gitso.app/Contents/Resources/ tar xvfz arch/osx/OSXvnc.tar.gz @@ -131,14 +136,14 @@ if [ "`uname -a | grep Darwin`" != "" ]; then cp GitsoThread.py dist/Gitso.app/Contents/Resources/ cp arch/osx/libjpeg-copyright.txt dist/Gitso.app/Contents/Frameworks/ - cp arch/osx/osxvnc_echoware-copyright.txt dist/Gitso.app/Contents/Resources/OSXvnc/ + cp arch/osx/osxnvc_echoware-copyright.txt dist/Gitso.app/Contents/Resources/OSXvnc/ cp arch/osx/cotvnc-copyright.txt dist/Gitso.app/Contents/Resources/cotvnc.app/contents/Resources cp arch/osx/osxvnc-copyright.txt dist/Gitso.app/Contents/Resources/OSXvnc/ echo -e " [done]\n" echo -e "Creating Gitso.dmg " - rm -f Gitso.dmg + rm -f $DMG mkdir dist/Gitso cp arch/osx/dmg_DS_Store dist/Gitso/.DS_Store @@ -148,7 +153,7 @@ if [ "`uname -a | grep Darwin`" != "" ]; then cp -r arch/osx/Readme.rtfd dist/Gitso/Readme.rtfd echo -e "..." - hdiutil create -srcfolder dist/Gitso/ Gitso.dmg + hdiutil create -srcfolder dist/Gitso/ $DMG echo -e "... [done]\n" else echo -e "Error, you need py2applet to be installed."