"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scripts/build/build-mac.py" between
seafile-7.0.4.tar.gz and seafile-7.0.5.tar.gz

About: Seafile (server) provides a cloud storage with file encryption and group sharing, and emphasis on reliability and high performance.

build-mac.py  (seafile-7.0.4):build-mac.py  (seafile-7.0.5)
skipping to change at line 341 skipping to change at line 341
self.append_cflags(macros) self.append_cflags(macros)
class SeafileClient(Project): class SeafileClient(Project):
name = 'seafile-client' name = 'seafile-client'
def __init__(self): def __init__(self):
Project.__init__(self) Project.__init__(self)
cmake_defines = { cmake_defines = {
'CMAKE_OSX_ARCHITECTURES': 'x86_64', 'CMAKE_OSX_ARCHITECTURES': 'x86_64',
'CMAKE_OSX_DEPLOYMENT_TARGET': '10.7', 'CMAKE_OSX_DEPLOYMENT_TARGET': '10.9',
'CMAKE_BUILD_TYPE': 'Release', 'CMAKE_BUILD_TYPE': 'Release',
'BUILD_SHIBBOLETH_SUPPORT': 'ON', 'BUILD_SHIBBOLETH_SUPPORT': 'ON',
'BUILD_SPARKLE_SUPPORT': 'ON', 'BUILD_SPARKLE_SUPPORT': 'ON',
} }
cmake_defines_formatted = ' '.join(['-D{}={}'.format(k, v) for k, v in c make_defines.iteritems()]) cmake_defines_formatted = ' '.join(['-D{}={}'.format(k, v) for k, v in c make_defines.iteritems()])
self.build_commands = [ self.build_commands = [
'rm -f CMakeCache.txt', 'rm -f CMakeCache.txt',
'cmake -G Xcode {}'.format(cmake_defines_formatted), 'cmake -GXcode {}'.format(cmake_defines_formatted),
'xcodebuild -target seafile-applet -configuration Release -jobs {}'. format(NUM_CPU), 'xcodebuild -target seafile-applet -configuration Release -jobs {}'. format(NUM_CPU),
'rm -rf seafile-applet.app', 'rm -rf seafile-applet.app',
'cp -r Release/seafile-applet.app seafile-applet.app', 'cp -r Release/seafile-applet.app seafile-applet.app',
'mkdir -p seafile-applet.app/Contents/Frameworks', 'mkdir -p seafile-applet.app/Contents/Frameworks',
'macdeployqt seafile-applet.app', 'macdeployqt seafile-applet.app',
] ]
def get_version(self): def get_version(self):
return conf[CONF_SEAFILE_CLIENT_VERSION] return conf[CONF_SEAFILE_CLIENT_VERSION]
skipping to change at line 863 skipping to change at line 863
def sign_files(appdir): def sign_files(appdir):
webengine_app = join( webengine_app = join(
appdir, appdir,
'Contents/Frameworks/QtWebEngineCore.framework/Versions/5/Helpers/QtWebE ngineProcess.app' 'Contents/Frameworks/QtWebEngineCore.framework/Versions/5/Helpers/QtWebE ngineProcess.app'
) )
# The webengine app must be signed first, otherwise the sign of # The webengine app must be signed first, otherwise the sign of
# QtWebengineCore.framework would fail. # QtWebengineCore.framework would fail.
if exists(webengine_app): if exists(webengine_app):
do_sign(webengine_app) entitlements = join(Seafile().projdir, 'scripts/build/osx.entitlements')
do_sign(
webengine_app,
extra_args=['--entitlements', entitlements]
)
patterns = [ patterns = [
'Contents/Frameworks/*.framework', 'Contents/Frameworks/*.framework',
'Contents/PlugIns/*/*.dylib', 'Contents/PlugIns/*/*.dylib',
'Contents/Frameworks/*.dylib', 'Contents/Frameworks/*.dylib',
'Contents/Resources/seaf-daemon', 'Contents/Resources/seaf-daemon',
] ]
files_to_sign = [] files_to_sign = []
for p in patterns: for p in patterns:
skipping to change at line 901 skipping to change at line 905
global _keychain_unlocked global _keychain_unlocked
if not _keychain_unlocked: if not _keychain_unlocked:
_keychain_unlocked = True _keychain_unlocked = True
run('security -v unlock-keychain -p vagrant || true') run('security -v unlock-keychain -p vagrant || true')
def do_sign(path, extra_args=None): def do_sign(path, extra_args=None):
unlock_keychain() unlock_keychain()
args = [ args = [
'codesign', 'codesign',
'--verbose=4', '--verbose=4',
'-o', 'runtime',
'--timestamp',
'--verify', '--verify',
# '--no-strict', # '--no-strict',
'--force', '--force',
'--preserve-metadata=entitlements', '--preserve-metadata=entitlements',
'-s', CERT_ID, '-s', CERT_ID,
] ]
extra_args = extra_args or [] extra_args = extra_args or []
if extra_args: if extra_args:
args.extend(extra_args) args.extend(extra_args)
skipping to change at line 991 skipping to change at line 997
dst_dmg = os.path.join(conf[CONF_OUTPUTDIR], branded_dmg) dst_dmg = os.path.join(conf[CONF_OUTPUTDIR], branded_dmg)
# move msi to outputdir # move msi to outputdir
must_copy(src_dmg, dst_dmg) must_copy(src_dmg, dst_dmg)
print '---------------------------------------------' print '---------------------------------------------'
print 'The build is successfully. Output is:' print 'The build is successfully. Output is:'
print '>>\t%s' % dst_dmg print '>>\t%s' % dst_dmg
print '---------------------------------------------' print '---------------------------------------------'
def notarize_dmg():
pkg = os.path.join(conf[CONF_BUILDDIR], 'app-{}.dmg'.format(conf[CONF_VERSIO
N]))
info('Try to notarize {}'.format(pkg))
notarize_script = join(Seafile().projdir, 'scripts/build/notarize.sh')
cmdline = '{} {}'.format(notarize_script, pkg)
ret = run(cmdline)
if ret != 0:
error('failed to notarize: %s' % cmdline)
info('Successfully notarized {}'.format(pkg))
def build_and_sign_fsplugin(): def build_and_sign_fsplugin():
""" """
Build and sign the fsplugin. The final output would be "${buildder}/Seafile FinderSync.appex" Build and sign the fsplugin. The final output would be "${buildder}/Seafile FinderSync.appex"
""" """
fsplugin = SeafileFinderSyncPlugin() fsplugin = SeafileFinderSyncPlugin()
fsplugin.uncompress() fsplugin.uncompress()
fsplugin.build() fsplugin.build()
with cd(fsplugin.projdir): with cd(fsplugin.projdir):
appex_src = 'fsplugin/{}'.format(FSPLUGIN_APPEX_NAME) appex_src = 'fsplugin/{}'.format(FSPLUGIN_APPEX_NAME)
appex_dst = join(conf[CONF_BUILDDIR], basename(appex_src)) appex_dst = join(conf[CONF_BUILDDIR], basename(appex_src))
skipping to change at line 1054 skipping to change at line 1070
copy_sparkle_framework() copy_sparkle_framework()
copy_shared_libs() copy_shared_libs()
def local_workflow(): def local_workflow():
build_projects() build_projects()
generate_app_tar_gz() generate_app_tar_gz()
build_and_sign_fsplugin() build_and_sign_fsplugin()
gen_dmg() gen_dmg()
notarize_dmg()
copy_dmg() copy_dmg()
def master_workflow(): def master_workflow():
send_sources_to_slave() send_sources_to_slave()
build_on_slave() build_on_slave()
get_app_tgz_from_slave() get_app_tgz_from_slave()
build_and_sign_fsplugin() build_and_sign_fsplugin()
gen_dmg() gen_dmg()
notarize_dmg()
copy_dmg() copy_dmg()
def slave_workflow(): def slave_workflow():
build_projects() build_projects()
generate_app_tar_gz() generate_app_tar_gz()
def generate_app_tar_gz(): def generate_app_tar_gz():
# output_app_tgz = join(conf[CONF_BUILDDIR], '..', 'seafile-applet.app.tar.g z') # output_app_tgz = join(conf[CONF_BUILDDIR], '..', 'seafile-applet.app.tar.g z')
output_app_tgz = join(conf[CONF_BUILDDIR], 'seafile-applet.app.tar.gz') output_app_tgz = join(conf[CONF_BUILDDIR], 'seafile-applet.app.tar.gz')
with cd(SeafileClient().projdir): with cd(SeafileClient().projdir):
skipping to change at line 1097 skipping to change at line 1115
def main(): def main():
setup_logging() setup_logging()
parse_args() parse_args()
info('{} script started'.format(abspath(__file__))) info('{} script started'.format(abspath(__file__)))
info('NUM_CPU = {}'.format(NUM_CPU)) info('NUM_CPU = {}'.format(NUM_CPU))
setup_build_env() setup_build_env()
if conf[CONF_LOCAL]: if conf[CONF_LOCAL]:
local_workflow() local_workflow()
elif conf[CONF_MODE] == 'master': elif conf[CONF_MODE] == 'master':
info('entering master workflow') # info('entering master workflow')
master_workflow() # master_workflow()
local_workflow()
else: else:
info('entering slave workflow') info('entering slave workflow')
slave_workflow() slave_workflow()
if __name__ == '__main__': if __name__ == '__main__':
main() main()
 End of changes. 8 change blocks. 
5 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)