Primer depuración. Limpieza archivos innecesarios, cambios de nombres y preparación para Puma.

This commit is contained in:
2025-05-25 22:25:31 -03:00
parent d883ddd0d0
commit a5d5fe6288
37 changed files with 287 additions and 163 deletions
+42 -42
View File
@@ -2,9 +2,9 @@ import os
import subprocess
import tarfile
class FSViewerManifest:
def fs_installer_basename(self):
if self.fs_is_avx2():
class PMViewerManifest:
def pm_installer_basename(self):
if self.pm_is_avx2():
opt_string = "AVX2"
else:
opt_string = "LEGACY"
@@ -17,14 +17,14 @@ class FSViewerManifest:
'app_name_oneword':self.app_name_oneword()
}
return "Phoenix-%(app_name)s_%(optimized)s-%(version_dashes)s" % substitution_strings
return "Puma-%(app_name)s_%(optimized)s-%(version_dashes)s" % substitution_strings
def fs_is_opensim(self):
def pm_is_opensim(self):
return self.args['viewer_flavor'] == 'oss' #Havok would be hvk
def fs_is_avx2(self):
def pm_is_avx2(self):
return self.args['avx2'] == 'ON'
def fs_splice_grid_substitution_strings( self, subst_strings ):
def pm_splice_grid_substitution_strings( self, subst_strings ):
ret = subst_strings
if 'grid' in self.args and self.args['grid'] != None:
@@ -36,30 +36,30 @@ class FSViewerManifest:
return ret
def fs_get_substitution_strings( self ):
def pm_get_substitution_strings( self ):
substitution_strings = {
'version' : '.'.join(self.args['version']),
'version_short' : '.'.join(self.args['version'][:-1]),
'version_dashes' : '-'.join(self.args['version']),
'channel':self.channel(),
'channel_oneword':self.fs_channel_oneword(),
'channel_unique':self.fs_channel_unique(),
'subchannel_underscores':'_'.join(self.fs_channel_unique().split()),
'channel_oneword':self.pm_channel_oneword(),
'channel_unique':self.pm_channel_unique(),
'subchannel_underscores':'_'.join(self.pm_channel_unique().split()),
'app_name' : self.app_name()
}
return self.fs_splice_grid_substitution_strings( substitution_strings )
return self.pm_splice_grid_substitution_strings( substitution_strings )
def fs_channel_legacy_oneword(self):
def pm_channel_legacy_oneword(self):
return "".join(self.channel().split())
def fs_channel_oneword(self):
return "".join(self.fs_channel_unique().split())
def pm_channel_oneword(self):
return "".join(self.pm_channel_unique().split())
def fs_channel_unique(self):
def pm_channel_unique(self):
return self.channel().replace("Puma", "").strip()
def fs_sign_win_binaries(self):
def pm_sign_win_binaries(self):
signtool_path = os.getenv('SIGNTOOL_PATH')
codesigning_dlib_path = os.getenv('CODESIGNING_DLIB_PATH')
metadata_file = os.getenv("CODESIGNING_METADATA_PATH")
@@ -89,7 +89,7 @@ class FSViewerManifest:
except Exception as e:
print(f"Couldn't sign binary: {exe_path}. Error: {e}")
def fs_sign_win_installer(self, substitution_strings):
def pm_sign_win_installer(self, substitution_strings):
signtool_path = os.getenv('SIGNTOOL_PATH')
codesigning_dlib_path = os.getenv('CODESIGNING_DLIB_PATH')
metadata_file = os.getenv("CODESIGNING_METADATA_PATH")
@@ -109,7 +109,7 @@ class FSViewerManifest:
except Exception as e:
print(f"Couldn't sign windows installer: {installer_path}. Error: {e}")
def fs_delete_linux_symbols( self ):
def pm_delete_linux_symbols( self ):
debugDir = os.path.join( self.get_dst_prefix(), "bin", ".debug" )
if os.path.exists( debugDir ):
@@ -121,34 +121,34 @@ class FSViewerManifest:
if os.path.isfile( debugFile ):
os.unlink( debugFile )
def fs_save_linux_symbols( self ):
def pm_save_linux_symbols( self ):
#AO: Try to package up symbols
# New Method, for reading cross platform stack traces on a linux/mac host
print("Packaging symbols")
self.fs_save_symbols("linux")
self.pm_save_symbols("linux")
def fs_linux_tar_excludes(self):
installer_name_components = ['Phoenix',self.app_name(),self.args.get('arch'),'.'.join(self.args['version'])]
installer_name_components = ['Puma',self.app_name(),self.args.get('arch'),'.'.join(self.args['version'])]
installer_name = "_".join(installer_name_components)
return "--exclude=%s/bin/.debug" % installer_name
def fs_save_windows_symbols(self):
self.fs_save_symbols("windows")
def pm_save_windows_symbols(self):
self.pm_save_symbols("windows")
pdbName = "puma-bin.pdb"
try:
subprocess.check_call( [ "pdbcopy.exe" ,
self.args['configuration'] + "\\puma-bin.pdb",
self.args['configuration'] + "\\puma-bin-public.pdb",
self.args['configuration'] + "\\firestorm-bin.pdb",
self.args['configuration'] + "\\firestorm-bin-public.pdb",
"-p"
], stderr=subprocess.PIPE,stdout=subprocess.PIPE )
pdbName = "puma-bin-public.pdb"
except:
print("Cannot run pdbcopy, packaging private symbols")
tarName = "%s/Phoenix_%s_%s_%s_pdbsymbols-windows-%d.tar.xz" % (self.args['configuration'].lower(),
self.fs_channel_legacy_oneword(),
tarName = "%s/Puma_%s_%s_%s_pdbsymbols-windows-%d.tar.xz" % (self.args['configuration'].lower(),
self.pm_channel_legacy_oneword(),
'-'.join(self.args['version']),
self.args['viewer_flavor'],
self.address_size)
@@ -159,7 +159,7 @@ class FSViewerManifest:
symbolTar.add( "%s/%s" % (self.args['configuration'].lower(),pdbName), pdbName )
symbolTar.close()
def fs_strip_windows_manifest(self, aFile ):
def pm_strip_windows_manifest(self, aFile ):
try:
from win32api import BeginUpdateResource, UpdateResource, EndUpdateResource
@@ -170,10 +170,10 @@ class FSViewerManifest:
except:
pass
def fs_copy_windows_manifest(self):
def pm_copy_windows_manifest(self):
from shutil import copyfile
self.fs_strip_windows_manifest( "%s/slplugin.exe" % self.args['configuration'].lower() )
self.fs_strip_windows_manifest( "%s/llplugin/dullahan_host.exe" % self.args['configuration'].lower() )
self.pm_strip_windows_manifest( "%s/slplugin.exe" % self.args['configuration'].lower() )
self.pm_strip_windows_manifest( "%s/llplugin/dullahan_host.exe" % self.args['configuration'].lower() )
if self.prefix(src=os.path.join(self.args['build'], os.pardir, os.pardir, 'indra', 'tools', 'manifests')):
self.path( "compatibility.manifest", "slplugin.exe.manifest" )
self.end_prefix()
@@ -181,16 +181,16 @@ class FSViewerManifest:
self.path( "compatibility.manifest", "dullahan_host.exe.manifest" )
self.end_prefix()
def fs_save_osx_symbols( self ):
self.fs_save_symbols("darwin")
def pm_save_osx_symbols( self ):
self.pm_save_symbols("darwin")
def fs_save_symbols(self, osname):
def pm_save_symbols(self, osname):
if (os.path.exists("%s/puma-symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(),
osname,
self.address_size))):
# Rename to add version numbers
sName = "%s/Phoenix_%s_%s_%s_symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(),
self.fs_channel_legacy_oneword(),
sName = "%s/Puma_%s_%s_%s_symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(),
self.pm_channel_legacy_oneword(),
'-'.join( self.args['version'] ),
self.args['viewer_flavor'],
osname,
@@ -201,7 +201,7 @@ class FSViewerManifest:
os.rename("%s/puma-symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(), osname, self.address_size), sName)
def fs_generate_breakpad_symbols_for_file( self, aFile ):
def pm_generate_breakpad_symbols_for_file( self, aFile ):
from os import makedirs, remove
from os.path import join, isfile
import subprocess
@@ -230,14 +230,14 @@ class FSViewerManifest:
if isfile( symbolFile ):
remove( symbolFile )
def fs_save_breakpad_symbols(self, osname):
def pm_save_breakpad_symbols(self, osname):
from glob import glob
import sys
from os.path import isdir, join
from shutil import rmtree
import tarfile
components = ['Phoenix',self.app_name(),self.args.get('arch'),'.'.join(self.args['version'])]
components = ['Puma',self.app_name(),self.args.get('arch'),'.'.join(self.args['version'])]
symbolsName = "_".join(components)
symbolsName = symbolsName + "_" + self.args["viewer_flavor"] + "-" + osname + "-" + str(self.address_size) + ".tar.bz2"
@@ -246,12 +246,12 @@ class FSViewerManifest:
files = glob( "%s/bin/*" % self.args['dest'] )
for f in files:
self.fs_generate_breakpad_symbols_for_file( f )
self.pm_generate_breakpad_symbols_for_file( f )
files = glob( "%s/lib/*.so" % self.args['dest'] )
for f in files:
if f.find( "libcef.so" ) == -1:
self.fs_generate_breakpad_symbols_for_file( f )
self.pm_generate_breakpad_symbols_for_file( f )
if isdir( "symbols" ):
for a in self.args: