Bug 1675437 - Use preprocessor to create Info.plist files. r=firefox-build-system-reviewers,mhentges

While we're in the vicinity, change the manual preprocessing of
Info.plist.in to uses of the preprocessor.

Differential Revision: https://phabricator.services.mozilla.com/D96014
This commit is contained in:
Mike Hommey 2020-11-05 15:03:47 +00:00
Родитель ead183252e
Коммит 53fee2f4c4
6 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -86,7 +86,7 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS-
$(MKDIR) -p '$(dist_dest)/$(LPROJ)'
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents '$(dist_dest)' --exclude English.lproj
rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ '$(dist_dest)/$(LPROJ)'
sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' -e 's|%MOZ_DEVELOPER_REPO_PATH%|$(topsrcdir)|' -e 's|%MOZ_DEVELOPER_OBJ_PATH%|$(topobjdir)|' $(srcdir)/macbuild/Contents/Info.plist.in > '$(dist_dest)/Contents/Info.plist'
$(call py_action,preprocessor,-Fsubstitution -DAPP_VERSION='$(MOZ_APP_VERSION)' -DMOZ_APP_NAME='$(MOZ_APP_NAME)' -DMAC_APP_NAME='$(MAC_APP_NAME)' -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' -DMAC_BUNDLE_VERSION='$(MAC_BUNDLE_VERSION)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o '$(dist_dest)/Contents/Info.plist')
$(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DMAC_APP_NAME='$(MAC_APP_NAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o '$(dist_dest)/$(LPROJ)/InfoPlist.strings')
rsync -a --exclude-from='$(objdir)/macbuild/Contents/MacOS-files.txt' $(DIST)/bin/ '$(dist_dest)/Contents/Resources'
rsync -a --include-from='$(objdir)/macbuild/Contents/MacOS-files.txt' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS'

Просмотреть файл

@ -163,21 +163,21 @@
</dict>
</array>
<key>CFBundleExecutable</key>
<string>%MOZ_APP_NAME%</string>
<string>@MOZ_APP_NAME@</string>
<key>CFBundleGetInfoString</key>
<string>%MAC_APP_NAME% %APP_VERSION%</string>
<string>@MAC_APP_NAME@ @APP_VERSION@</string>
<key>CFBundleIconFile</key>
<string>firefox.icns</string>
<key>CFBundleIdentifier</key>
<string>%MOZ_MACBUNDLE_ID%</string>
<string>@MOZ_MACBUNDLE_ID@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>%MAC_APP_NAME%</string>
<string>@MAC_APP_NAME@</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>%APP_VERSION%</string>
<string>@APP_VERSION@</string>
<key>CFBundleSignature</key>
<string>MOZB</string>
<key>CFBundleURLTypes</key>
@ -220,7 +220,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>%MAC_BUNDLE_VERSION%</string>
<string>@MAC_BUNDLE_VERSION@</string>
<key>NSUserActivityTypes</key>
<array>
<string>NSUserActivityTypeBrowsingWeb</string>
@ -250,14 +250,14 @@
<string>identifier "org.mozilla.updater" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))</string>
</dict>
<key>MozillaDeveloperRepoPath</key>
<string>%MOZ_DEVELOPER_REPO_PATH%</string>
<string>@MOZ_DEVELOPER_REPO_PATH@</string>
<key>MozillaDeveloperObjPath</key>
<string>%MOZ_DEVELOPER_OBJ_PATH%</string>
<string>@MOZ_DEVELOPER_OBJ_PATH@</string>
<key>NSCameraUsageDescription</key>
<string>Only sites you allow within %MAC_APP_NAME% will be able to use the camera.</string>
<string>Only sites you allow within @MAC_APP_NAME@ will be able to use the camera.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Only sites you allow within %MAC_APP_NAME% will be able to use the microphone.</string>
<string>Only sites you allow within @MAC_APP_NAME@ will be able to use the microphone.</string>
</dict>
</plist>

Просмотреть файл

@ -29,7 +29,7 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) #{
libs::
$(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app
rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app
sed -e 's/%PROGRAM%/$(MOZ_CHILD_PROCESS_NAME)/' -e 's|%MOZ_DEVELOPER_REPO_PATH%|$(topsrcdir)|' -e 's|%MOZ_DEVELOPER_OBJ_PATH%|$(topobjdir)|' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist
$(call py_action,preprocessor,-Fsubstitution -DPROGRAM='$(MOZ_CHILD_PROCESS_NAME)' -DMOZ_DEVELOPER_REPO_PATH='$(topsrcdir)' -DMOZ_DEVELOPER_OBJ_PATH='$(topobjdir)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Info.plist)
$(call py_action,preprocessor,-Fsubstitution --output-encoding utf-16 -DAPP_NAME='$(MOZ_CHILD_PROCESS_BUNDLENAME)' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in -o $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/Resources/English.lproj/InfoPlist.strings)
$(NSINSTALL) -D $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS
$(NSINSTALL) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME) $(DIST)/bin/$(MOZ_CHILD_PROCESS_NAME).app/Contents/MacOS

Просмотреть файл

@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>%PROGRAM%</string>
<string>@PROGRAM@</string>
<key>CFBundleIdentifier</key>
<string>org.mozilla.plugincontainer</string>
<key>CFBundleInfoDictionaryVersion</key>
@ -25,8 +25,8 @@
<key>NSHighResolutionCapable</key>
<true/>
<key>MozillaDeveloperRepoPath</key>
<string>%MOZ_DEVELOPER_REPO_PATH%</string>
<string>@MOZ_DEVELOPER_REPO_PATH@</string>
<key>MozillaDeveloperObjPath</key>
<string>%MOZ_DEVELOPER_OBJ_PATH%</string>
<string>@MOZ_DEVELOPER_OBJ_PATH@</string>
</dict>
</plist>

Просмотреть файл

@ -17,7 +17,7 @@ include $(topsrcdir)/config/rules.mk
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
export::
sed -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/Info.plist
$(call py_action,preprocessor,-Fsubstitution -DMOZ_MACBUNDLE_ID='$(MOZ_MACBUNDLE_ID)' $(srcdir)/macbuild/Contents/Info.plist.in -o $(DIST)/bin/Info.plist)
libs::
$(NSINSTALL) -D $(DIST)/bin/updater.app
rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app

Просмотреть файл

@ -34,7 +34,7 @@
<true/>
<key>SMAuthorizedClients</key>
<array>
<string>identifier "%MOZ_MACBUNDLE_ID%" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))</string>
<string>identifier "@MOZ_MACBUNDLE_ID@" and ((anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9]) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "43AQ936H96"))</string>
</array>
</dict>
</plist>