mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 12:27:29 +09:00
Add OS X branding + try to fix it hanging
This commit is contained in:
parent
72c0f1de84
commit
ebfa229173
4 changed files with 26 additions and 52 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -115,40 +115,11 @@ endif
|
||||||
include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
|
include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
|
||||||
include $(topsrcdir)/toolkit/mozapps/installer/packager-uxp.mk
|
include $(topsrcdir)/toolkit/mozapps/installer/packager-uxp.mk
|
||||||
|
|
||||||
# For macOS bundle layout, copy files from dist/bin to the staging bundle
|
# Local macOS workaround: precompile_cache.js hangs in xpcshell during package.
|
||||||
|
# Skip precomplete/startupcache generation so packaging can complete.
|
||||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||||
stage-package: $(MOZ_PKG_MANIFEST) $(MOZ_PKG_MANIFEST_DEPS)
|
CREATE_PRECOMPLETE_CMD = true
|
||||||
# First run the standard stage-package from packager-uxp.mk
|
export MOZ_SKIP_STARTUPCACHE_PRECOMPILE = 1
|
||||||
@echo "Staging macOS bundle..."
|
|
||||||
@mkdir -p '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/MacOS'
|
|
||||||
@mkdir -p '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources'
|
|
||||||
# Copy binary and libraries to MacOS
|
|
||||||
@cp -f '$(DIST)/bin/dactyloidae' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/MacOS/' || true
|
|
||||||
@cp -f '$(DIST)/bin'/*.dylib '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/MacOS/' 2>/dev/null || true
|
|
||||||
@cp -f '$(DIST)/bin/XUL' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/MacOS/' 2>/dev/null || true
|
|
||||||
# Copy ICU data file
|
|
||||||
@cp -f '$(DIST)/bin/icudt63l.dat' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
# Copy resources to Resources
|
|
||||||
@cp -rf '$(DIST)/bin/components' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -rf '$(DIST)/bin/browser' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -rf '$(DIST)/bin/defaults' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -rf '$(DIST)/bin/chrome' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -rf '$(DIST)/bin/modules' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -rf '$(DIST)/bin/res' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
# Copy manifest files
|
|
||||||
@cp -f '$(DIST)/bin/chrome.manifest' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -f '$(DIST)/bin/application.ini' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -f '$(DIST)/bin/platform.ini' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
@cp -f '$(DIST)/bin/dependentlibs.list' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Resources/' 2>/dev/null || true
|
|
||||||
# Generate app metadata files from the source templates.
|
|
||||||
@sed \
|
|
||||||
-e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' \
|
|
||||||
-e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/g' \
|
|
||||||
-e 's/%MAC_APP_NAME%/$(MOZ_APP_DISPLAYNAME)/g' \
|
|
||||||
-e 's#<string>basilisk</string>#<string>$(MOZ_APP_NAME)</string>#' \
|
|
||||||
'$(srcdir)/macbuild/Contents/Info.plist.in' > '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/Info.plist'
|
|
||||||
@cp -f '$(srcdir)/macbuild/Contents/PkgInfo' '$(DIST)/$(MOZ_PKG_DIR)/$(_APPNAME)/Contents/PkgInfo'
|
|
||||||
@echo "Finished staging macOS bundle"
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (bundle, $(MOZ_FS_LAYOUT))
|
ifeq (bundle, $(MOZ_FS_LAYOUT))
|
||||||
|
|
|
||||||
|
|
@ -352,25 +352,28 @@ def main():
|
||||||
if key in log:
|
if key in log:
|
||||||
f.preload(log[key])
|
f.preload(log[key])
|
||||||
|
|
||||||
# Fill startup cache
|
# Fill startup cache
|
||||||
if isinstance(formatter, OmniJarFormatter) and launcher.can_launch() \
|
if isinstance(formatter, OmniJarFormatter) and launcher.can_launch() \
|
||||||
and buildconfig.substs['MOZ_DISABLE_STARTUPCACHE'] != '1' \
|
and os.environ.get('MOZ_SKIP_STARTUPCACHE_PRECOMPILE') != '1' \
|
||||||
and buildconfig.substs['MOZ_DISABLE_PRECOMPILED_STARTUPCACHE'] != '1':
|
and buildconfig.substs['MOZ_DISABLE_STARTUPCACHE'] != '1' \
|
||||||
gre_path = None
|
and buildconfig.substs['MOZ_DISABLE_PRECOMPILED_STARTUPCACHE'] != '1':
|
||||||
def get_bases():
|
gre_path = None
|
||||||
for b in sink.packager.get_bases(addons=False):
|
|
||||||
for p in (mozpath.join('bin', b), b):
|
def get_bases():
|
||||||
if os.path.exists(os.path.join(args.source, p)):
|
for b in sink.packager.get_bases(addons=False):
|
||||||
yield p
|
for p in (mozpath.join('bin', b), b):
|
||||||
break
|
if os.path.exists(os.path.join(args.source, p)):
|
||||||
for base in sorted(get_bases()):
|
yield p
|
||||||
if not gre_path:
|
break
|
||||||
gre_path = base
|
|
||||||
omnijar_path = mozpath.join(sink.normalize_path(base),
|
for base in sorted(get_bases()):
|
||||||
buildconfig.substs['OMNIJAR_NAME'])
|
if not gre_path:
|
||||||
if formatter.contains(omnijar_path):
|
gre_path = base
|
||||||
precompile_cache(formatter.copier[omnijar_path],
|
omnijar_path = mozpath.join(sink.normalize_path(base),
|
||||||
args.source, gre_path, base)
|
buildconfig.substs['OMNIJAR_NAME'])
|
||||||
|
if formatter.contains(omnijar_path):
|
||||||
|
precompile_cache(formatter.copier[omnijar_path],
|
||||||
|
args.source, gre_path, base)
|
||||||
|
|
||||||
copier.copy(args.destination)
|
copier.copy(args.destination)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue