Skip to content

Commit

Permalink
v0.97.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteph committed Jun 1, 2013
1 parent b9b3a61 commit 482a777
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
14 changes: 9 additions & 5 deletions dist/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
shutil.copyfile("../misc/readme.txt", dir + "readme.txt")
filename = dir.split("/")[1]
cmdarchive = '7z a -t7z ../%s.7z *' % filename
cmdnsis = ['C:\Program Files (x86)\NSIS\makensis.exe', '/DOUTFILE=files\groove-dl_%sall.exe' % version, '/DVERSION=%s' % version, '/DSETUPDIR=%s' % os.path.abspath(dir), 'groove-dl.nsi']

if sys.platform == "win32":
cmdmerge = 'copy /b "..\\..\\misc\\7zsd.sfx\"+..\\..\\misc\\sfxconfig.txt+groove-dl_%sall.7z %s.exe' % (version, filename)
Expand All @@ -27,10 +28,13 @@
os.chdir(dir)
print ' '.join(cmdbuild); assert p.wait() == 0
os.system('upx -9 *.exe *.dll modules\\*.pyd modules\\*.dll')
print cmdarchive; assert os.system(cmdarchive) == 0
os.chdir('..')
print os.getcwd()
print cmdmerge; assert os.system(cmdmerge) == 0
os.remove(filename + ".7z")
os.chdir('../..')
p = subprocess.Popen(cmdnsis, cwd=os.getcwd())
print ' '.join(cmdnsis); assert p.wait() == 0
#print cmdarchive; assert os.system(cmdarchive) == 0
#os.chdir('..')
#print os.getcwd()
#print cmdmerge; assert os.system(cmdmerge) == 0
#os.remove(filename + ".7z")
except:
print "Failed."
12 changes: 9 additions & 3 deletions python/gui.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
version = "0.97.5"
version = "0.97.6"
import sys
import os
import shutil
Expand Down Expand Up @@ -455,8 +455,14 @@ def updatehook(self, countBlocks, Block, TotalSize):
wx.PostEvent(self.frame, evtExecFunc(func=SetStatus, attr1="Downloading v%s - %%%s..." % (self.new,int(float(countBlocks*Block)/TotalSize*100))))
def update(self):
wx.PostEvent(self.frame, evtExecFunc(func=SetStatus, attr1="Checking for updates..."))
conn = httplib.HTTPConnection("www.groove-dl.co.cc")
conn.request("GET", "/version")
conn = None
try:
conn = httplib.HTTPSConnection("raw.github.com")
conn.request("GET", "/jacktheripper51/groove-dl/gh-pages/version")
except:
wx.PostEvent(self.frame, evtExecFunc(func=SetStatus, attr1="Checking for updates failed"))
time.sleep(2)
return
self.new = conn.getresponse().read()
if self.new != version:
dlg = wx.MessageDialog(self.frame, "There is a new version available. Do you wish to update ?", "Update found", wx.YES_NO | wx.ICON_QUESTION)
Expand Down

0 comments on commit 482a777

Please sign in to comment.