Permalink
Browse files

[Update App] Wikireader Update

Signed-off-by: Hank Wang <drapho@gmail.com>
  • Loading branch information...
hanksudo committed Aug 7, 2012
1 parent d5cd25a commit 42472f8b9268bf12f5dae85b130ea2ab7cdc8af7
View
@@ -0,0 +1,5 @@
+dist
+*.exe
+test
+*.pyc
+*.pyo
View
@@ -0,0 +1,51 @@
+# WikiReader
+## Package Note
+
+### Windows
+
+[Pyinstaller - pack applcation to exe](http://www.pyinstaller.org/)
+
+```
+python Makespec.py -F -w --icon=icon.ico "Wikireader Update.py"
+python Build.py .\Wikireader Update\Wikireader Update.spec
+```
+
+### Mac
+
+**py2app - Create standalone Mac OS X applications with Python**
+
+```
+pip install py2app
+./build.sh
+```
+
+run **build.sh** to simple package the app.
+
+### Ubuntu Linux
+sudo apt-get install gtk2-engines-pixbuf
+sudo apt-get install python-wxgtk2.8
+sudo apt-get install python-wxtools
+
+
+## Mac : Code Sign for ML
+
+disable
+sudo spctl --master-disable
+
+[Sign for Gatekeeper](http://web.archiveorange.com/archive/v/cW70Ll4ViLCVNwKOE3gl)
+
+Download Mac Developer then install to keychain
+
+```
+codesign -f -s "Developer ID Application" dist/WikiReader.app/
+# check
+spctl -a -v dist/WikiReader.app
+```
+
+#### Refernce
+
+http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/OSXWorkflowGuide/DistributingApplicationsOutside/DistributingApplicationsOutside.html
+
+https://developer.apple.com/library/mac/#documentation/security/Conceptual/CodeSigningGuide/Procedures/Procedures.html
+
+http://www.red-sweater.com/blog/2390/developer-id-gotcha
View
@@ -0,0 +1,24 @@
+import os
+
+def opj(path):
+ """Convert paths to the platform-specific separator"""
+ st = apply(os.path.join, tuple(path.split('/')))
+ # HACK: on Linux, a leading / gets lost...
+ if path.startswith('/'):
+ st = '/' + st
+ return st
+
+def getProgramFolder():
+ moduleFile = __file__
+ moduleDir = os.path.split(os.path.abspath(moduleFile))[0]
+ programFolder = os.path.abspath(moduleDir)
+ return programFolder
+
+def resource_path(relative):
+ return os.path.join(
+ os.environ.get(
+ "_MEIPASS2",
+ os.path.abspath(".")
+ ),
+ relative
+ )
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 42472f8

Please sign in to comment.