Update build_GrampsWin32.py due to not working

svn: r19719
This commit is contained in:
Stephen George 2012-05-31 01:13:28 +00:00
parent 33f168ed6e
commit 83099375e3
2 changed files with 8 additions and 4 deletions

View File

@ -17,7 +17,7 @@ The following procedure is capable of creating a Windows installer from either W
or Linux OS's as long as the correct tools are installed.
The following programs are required to be installed and on the path
- python
- python (currently only tested on python 2.6 - not ready for python 3.x yet)
- nsis at least V2.42 (http://nsis.sourceforge.net or apt-get install nsis)
- msgfmt (for windows http://gnuwin32.sourceforge.net/packages/gettext.htm)

View File

@ -81,6 +81,7 @@ class buildbase(gobject.GObject):
self.out_dir = '.' # the directory to output final installer to, and the expand source to
self.repository_path = '.' #where the source comes from, either SVN root or a tarball
self.bBuildInstaller = True
self.tarbase3 = '.'
def getbuild_src(self):
return os.path.join(self.build_root, 'src')
@ -452,12 +453,12 @@ class buildbase(gobject.GObject):
tar = tarfile.open(self.repository_path)
tar.extractall(self.out_dir)
tar.close()
base = os.path.basename(self.repository_path)
extractDir = os.path.join(self.out_dir, base.replace('.tar.gz', '') )
#base = os.path.basename(self.repository_path)
extractDir = os.path.join(self.out_dir, self.tarbase3 )
try:
os.rename( extractDir, self.build_root)
except WindowsError, e:
log.error("FAILED: extractDir=%s, build_root=%s" % (extractDir, self.build_root))
log.error("FAILED: \n\t extractDir=%s \n\t build_root=%s" % (extractDir, self.build_root))
raise WindowsError, e
else:
log.error( "Sorry %s is not a tar file" % self.repository_path )
@ -474,6 +475,9 @@ class buildbase(gobject.GObject):
file = tar.extractfile(member)
lines = file.readlines()
vers = self.getVersionFromLines(lines)
if 'TODO' in member: #need to get path this will extract too, grab it of one of the files
self.tarbase3, rest = member.split('/', 1)
print '==ExtractPath', self.tarbase3
tar.close()
log.debug( 'Version (%s)' % (vers) )
return vers