New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 628686 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

//remoting Info.plist keys aren't getting substituted in GN

Project Member Reported by rsesek@chromium.org, Jul 15 2016

Issue description

When comparing the remoting build between GYP and GN, I noticed that the Info.plist keys are not being substituted correctly:

diff -dur out/Release/remote_assistance_host.app/Contents/Info.plist out/gn/remote_assistance_host.app/Contents/Info.plist
--- out/Release/remote_assistance_host.app/Contents/Info.plist	2016-07-15 11:04:03.000000000 -0400
+++ out/gn/remote_assistance_host.app/Contents/Info.plist	2016-07-15 13:13:02.000000000 -0400
@@ -5,7 +5,7 @@
 	<key>BreakpadProduct</key>
 	<string>Chromoting_Mac</string>
 	<key>BreakpadVersion</key>
-	<string>54.0.2798.0</string>
+	<string>VERSION_FULL</string>
 	<key>BuildMachineOSBuild</key>
 	<string>15F34</string>
 	<key>CFBundleDevelopmentRegion</key>
@@ -15,7 +15,7 @@
 	<key>CFBundleIconFile</key>
 	<string>remote_assistance_host</string>
 	<key>CFBundleIdentifier</key>
-	<string>org.chromium.chromoting.remote-assistance-host</string>
+	<string>BUNDLE_ID</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
@@ -23,23 +23,21 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>54.0.2798</string>
+	<string>VERSION_SHORT</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>54.0.2798.0</string>
+	<string>VERSION_FULL</string>


This is because in GYP, remoting uses INFOPLIST_PREPROCESSOR_DEFINITIONS https://cs.chromium.org/chromium/src/remoting/remoting_host_mac.gypi?sq=package:chromium&dr=C&l=56. By contrast, Chromium sets the values in xcode_settings, which then get replaced: https://cs.chromium.org/chromium/src/chrome/chrome_exe.gypi?q=CHROMIUM_BUNDLE_ID&sq=package:chromium&l=247&dr=C.

The difference is in how the keys are expressed in the source plist. When using INFOPLIST_PREPROCESSOR_DEFINITIONS, it's just a global string-subsitution, whereas with the xcode_settings approach, one uses ${KEY} instead.

In the GN world, INFOPLIST_PREPROCESSOR_DEFINITIONS does not exist. Instead, variable substitutions are performed by adding an extra_substitutions (https://cs.chromium.org/chromium/src/chrome/BUILD.gn?q=extra_substitutions&sq=package:chromium&l=491&dr=C) list to the mac_app_bundle or mac_info_plist target. Those KEY=value paris are then substituted for ${KEY} in the plist.

To fix the above example, |<string>VERSION_FULL</string>| should be changed to |<string>${VERSION_FULL}</string>|. For GYP the values in INFOPLIST_PREPROCESSOR_DEFINITIONS should be changed to plain xcode_settings. For GN, an extra_substitutions list should be added.
 
Owner: nicho...@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by rsesek@chromium.org, Jul 22 2016

Owner: rsesek@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c311f11649393ec89cc92a1958ca92b2fd27d7f7

commit c311f11649393ec89cc92a1958ca92b2fd27d7f7
Author: rsesek <rsesek@chromium.org>
Date: Sat Jul 23 03:35:52 2016

[Mac/GN] Fix all the //remoting Info.plist substitutions.

BUG= 628686 
R=nicholss@chromium.org,sergeyu@chromium.org

Review-Url: https://codereview.chromium.org/2169273002
Cr-Commit-Position: refs/heads/master@{#407338}

[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/build/util/version.gni
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/host/BUILD.gn
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/host/installer/mac/uninstaller/remoting_uninstaller-Info.plist
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/host/it2me/BUILD.gn
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/host/it2me/remote_assistance_host-Info.plist
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/host/mac/me2me_preference_pane-Info.plist
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/host/remoting_me2me_host-Info.plist
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/host/setup/native_messaging_host-Info.plist
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/remoting_host.gypi
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/remoting_host_mac.gypi
[modify] https://crrev.com/c311f11649393ec89cc92a1958ca92b2fd27d7f7/remoting/remoting_version.gni

Comment 4 by rsesek@chromium.org, Jul 25 2016

Status: Fixed (was: Started)
//remoting signing jobs also now complete.

Sign in to add a comment