Create TAR on linux build with package option only
The following configuration produces a usable linux viewer without creating a
package archive file:
autobuild configure -cConfiguration -pPlatform -- -DFMODSTUDIO:BOOL=ON
Adding the -DPACKAGE:BOOL=ON option will produce a usable viewer and create a
package archive file as well.
Cached build configurations might not reflect this change.
This commit is contained in:
@@ -915,6 +915,19 @@ class DarwinManifest(ViewerManifest):
|
|||||||
self.remove(sparsename)
|
self.remove(sparsename)
|
||||||
|
|
||||||
class LinuxManifest(ViewerManifest):
|
class LinuxManifest(ViewerManifest):
|
||||||
|
def is_packaging_viewer(self):
|
||||||
|
super(LinuxManifest, self).is_packaging_viewer()
|
||||||
|
return True # We always want a packaged viewer even without archive.
|
||||||
|
|
||||||
|
def do(self, *actions):
|
||||||
|
super(LinuxManifest, self).do(*actions)
|
||||||
|
if not 'package' in self.actions:
|
||||||
|
self.package_finish() # Always finish the package.
|
||||||
|
else:
|
||||||
|
# package_finish() was called by super.do() so just create the TAR.
|
||||||
|
self.create_archive()
|
||||||
|
return self.file_list
|
||||||
|
|
||||||
def construct(self):
|
def construct(self):
|
||||||
import shutil
|
import shutil
|
||||||
shutil.rmtree("./packaged/app_settings/shaders", ignore_errors=True);
|
shutil.rmtree("./packaged/app_settings/shaders", ignore_errors=True);
|
||||||
@@ -1049,12 +1062,8 @@ class LinuxManifest(ViewerManifest):
|
|||||||
|
|
||||||
self.path("featuretable_linux.txt")
|
self.path("featuretable_linux.txt")
|
||||||
|
|
||||||
|
|
||||||
def package_finish(self):
|
def package_finish(self):
|
||||||
installer_name = self.installer_base_name()
|
|
||||||
|
|
||||||
self.strip_binaries()
|
self.strip_binaries()
|
||||||
|
|
||||||
# Fix access permissions
|
# Fix access permissions
|
||||||
self.run_command("""
|
self.run_command("""
|
||||||
find %(dst)s -type d | xargs --no-run-if-empty chmod 755;
|
find %(dst)s -type d | xargs --no-run-if-empty chmod 755;
|
||||||
@@ -1063,16 +1072,21 @@ class LinuxManifest(ViewerManifest):
|
|||||||
find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644;
|
find %(dst)s -type f -perm 0600 | xargs --no-run-if-empty chmod 0644;
|
||||||
find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444;
|
find %(dst)s -type f -perm 0400 | xargs --no-run-if-empty chmod 0444;
|
||||||
true""" % {'dst':self.get_dst_prefix() })
|
true""" % {'dst':self.get_dst_prefix() })
|
||||||
self.package_file = installer_name + '.tar.xz'
|
|
||||||
|
|
||||||
|
def strip_binaries(self):
|
||||||
|
print "* Going strip-crazy on the packaged binaries"
|
||||||
|
# makes some small assumptions about our packaged dir structure
|
||||||
|
self.run_command(r"find %(d)r/lib %(d)r/lib32 %(d)r/lib64 -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} )
|
||||||
|
self.run_command(r"find %(d)r/bin -executable -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} )
|
||||||
|
|
||||||
|
def create_archive(self):
|
||||||
|
installer_name = self.installer_base_name()
|
||||||
# temporarily move directory tree so that it has the right
|
# temporarily move directory tree so that it has the right
|
||||||
# name in the tarfile
|
# name in the tarfile
|
||||||
self.run_command("mv %(dst)s %(inst)s" % {
|
self.run_command("mv %(dst)s %(inst)s" % {
|
||||||
'dst': self.get_dst_prefix(),
|
'dst': self.get_dst_prefix(),
|
||||||
'inst': self.build_path_of(installer_name)})
|
'inst': self.build_path_of(installer_name)})
|
||||||
try:
|
try:
|
||||||
# only create tarball if it's a release build.
|
|
||||||
if self.args['buildtype'].lower() == 'release':
|
|
||||||
# --numeric-owner hides the username of the builder for
|
# --numeric-owner hides the username of the builder for
|
||||||
# security etc.
|
# security etc.
|
||||||
self.run_command('tar -C %(dir)s --numeric-owner -cJf '
|
self.run_command('tar -C %(dir)s --numeric-owner -cJf '
|
||||||
@@ -1080,20 +1094,11 @@ class LinuxManifest(ViewerManifest):
|
|||||||
'dir': self.get_build_prefix(),
|
'dir': self.get_build_prefix(),
|
||||||
'inst_name': installer_name,
|
'inst_name': installer_name,
|
||||||
'inst_path':self.build_path_of(installer_name)})
|
'inst_path':self.build_path_of(installer_name)})
|
||||||
else:
|
|
||||||
print "Skipping %s.tar.xz for non-Release build (%s)" % \
|
|
||||||
(installer_name, self.args['buildtype'])
|
|
||||||
finally:
|
finally:
|
||||||
self.run_command("mv %(inst)s %(dst)s" % {
|
self.run_command("mv %(inst)s %(dst)s" % {
|
||||||
'dst': self.get_dst_prefix(),
|
'dst': self.get_dst_prefix(),
|
||||||
'inst': self.build_path_of(installer_name)})
|
'inst': self.build_path_of(installer_name)})
|
||||||
|
self.package_file = installer_name + '.tar.xz'
|
||||||
def strip_binaries(self):
|
|
||||||
if self.args['buildtype'].lower() == 'release' and self.is_packaging_viewer():
|
|
||||||
print "* Going strip-crazy on the packaged binaries, since this is a RELEASE build"
|
|
||||||
# makes some small assumptions about our packaged dir structure
|
|
||||||
self.run_command(r"find %(d)r/lib %(d)r/lib32 %(d)r/lib64 -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} )
|
|
||||||
self.run_command(r"find %(d)r/bin -executable -type f \! -name update_install | xargs --no-run-if-empty strip -S" % {'d': self.get_dst_prefix()} )
|
|
||||||
|
|
||||||
|
|
||||||
class Linux_i686_Manifest(LinuxManifest):
|
class Linux_i686_Manifest(LinuxManifest):
|
||||||
|
|||||||
Reference in New Issue
Block a user