Skip to content

Prevent Dev title from showing up on Store builds#627

Merged
HowardWolosky merged 1 commit intomicrosoft:masterfrom
HowardWolosky:isStoreBuild
Aug 6, 2019
Merged

Prevent Dev title from showing up on Store builds#627
HowardWolosky merged 1 commit intomicrosoft:masterfrom
HowardWolosky:isStoreBuild

Conversation

@HowardWolosky
Copy link
Copy Markdown
Contributor

Commit 0722781 updated the app to use DevAppName for the app's window title when it was a non-official build, based on the state of IsStoreBuild.

Unfortunately, IsStoreBuild is a project level variable defined in build-app-internal.yaml, but not a compile-time defined value.

To solve this, we are now defining IS_STORE_BUILD in Calculator.vcxproj when IsStoreBuild='True', the same way that we set SEND_DIAGNOSTICS for official builds, and we'll change the window title based on that new #define.

Using this new #define can lead us down a slippery slope. We need to limit the amount of divergent code that we have between dev/official builds. This should be hopefully one of very few instances where this value is ever used.

Description of the changes:

  • Sets a new #define named IS_STORE_BUILD when the project flag IsStoreBuild is set to True for the Calculator project.
  • Updated the check for IsStoreBuild when determining the window title name to instead check against IS_STORE_BUILD

How changes were validated:

  • Launched via the debugger and verified both IS_STORE_BUILD and SEND_DIAGNOSTICS were not set. Then, modified the project file and changed the check to be IsStoreBuild != 'True' and ran the same checks again, and verified that this time both IS_STORE_BUILD and SEND_DIAGNOSTICS were set.

Commit 0722781 updated the app to use `DevAppName` for the
app's window title when it was a non-store build, based on
the state of `IsStoreBuild`.

Unfortunately, `IsStoreBuild` is a _project_ level variable defined in
[build-app-internal.yaml](https://github.com/microsoft/calculator/blob/0722781fc60565938da42ea252766b30d02e5fb5/build/pipelines/templates/build-app-internal.yaml#L36),
but not a _compile-time_ defined value.

To solve this, we are now defining `IS_STORE_BUILD` in
`Calculator.vcxproj` when `IsStoreBuild='True'`, the same way that
we set `SEND_DIAGNOSTICS` for official builds, and we'll change the
window title based on that new `#define`.

Using this new `#define` can lead us down a slippery slope.  We need to
limit the amount of divergent code that we have between dev/official
builds.  This should be hopefully one of very few instances where
this value is ever used.
@HowardWolosky HowardWolosky added the Bug Issue is a bug label Aug 6, 2019
Copy link
Copy Markdown
Contributor

@sanderl sanderl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. My adhoc tests passed. :)

@HowardWolosky HowardWolosky merged commit c994e49 into microsoft:master Aug 6, 2019
@HowardWolosky HowardWolosky deleted the isStoreBuild branch August 6, 2019 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Issue is a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants