-
Notifications
You must be signed in to change notification settings - Fork 73
Automate EXE building for Windows #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
rmdir /q /s import-mailbox-to-gmail | ||
rmdir /q /s import-mailbox-to-gmail-64 | ||
rmdir /q /s build | ||
rmdir /q /s dist | ||
del /q /f import-mailbox-to-gmail-%1-windows.zip | ||
del /q /f import-mailbox-to-gmail-%1-windows-x64.zip | ||
|
||
c:\python27-32\scripts\pyinstaller -F --distpath=import-mailbox-to-gmail import-mailbox-to-gmail.spec | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you make the paths (e.g. |
||
xcopy LICENSE import-mailbox-to-gmail\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add some error handling here, e.g. |
||
del import-mailbox-to-gmail\w9xpopen.exe | ||
"%ProgramFiles(x86)%\7-Zip\7z.exe" a -tzip import-mailbox-to-gmail-%1-windows.zip import-mailbox-to-gmail\ -xr!.svn | ||
|
||
c:\python27\scripts\pyinstaller -F --distpath=import-mailbox-to-gmail-64 import-mailbox-to-gmail.spec | ||
xcopy LICENSE import-mailbox-to-gmail-64\ | ||
xcopy whatsnew.txt import-mailbox-to-gmail-64\ | ||
"%ProgramFiles(x86)%\7-Zip\7z.exe" a -tzip import-mailbox-to-gmail-%1-windows-x64.zip import-mailbox-to-gmail-64\ -xr!.svn |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- mode: python -*- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add some comment(s) to the file? All of these lines just seem arbitrary. :) At least mention it's for pyinstaller. |
||
a = Analysis(['import-mailbox-to-gmail.py'], | ||
hiddenimports=[], | ||
hookspath=None, | ||
runtime_hooks=None) | ||
for d in a.datas: | ||
if 'pyconfig' in d[0]: | ||
a.datas.remove(d) | ||
break | ||
a.datas += [('httplib2/cacerts.txt', 'c:\python27\lib\site-packages\httplib2\cacerts.txt', 'DATA')] | ||
pyz = PYZ(a.pure) | ||
exe = EXE(pyz, | ||
a.scripts, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
name='import-mailbox-to-gmail.exe', | ||
debug=False, | ||
strip=None, | ||
upx=True, | ||
console=True ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add
cd "%~dp0"
to the top of the file.