Closed Bug 737969 Opened 12 years ago Closed 12 years ago

Land Win8 metro build config changes on mozilla-central

Categories

(Firefox Build System :: General, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla15

People

(Reporter: jimm, Assigned: jimm)

References

Details

Attachments

(3 files, 3 obsolete files)

I need to post the patches necessary here and get official reviews.
Blocks: 737975
Attached patch changes (obsolete) — Splinter Review
Assignee: nobody → jmathies
Attached patch changes (obsolete) — Splinter Review
This adds support for the 602 sdk and a new MOZ_WIN8METRO define we've been using to wrap winrt code / build stuff.
Attachment #608151 - Attachment is obsolete: true
Attachment #608154 - Flags: review?(khuey)
I'm going to remove the '8' from the define and the build option. In retrospect there's no point in having the version number in there.
I would probably just simplify that even more, to "MOZ_METRO / --enable-metro". Doesn't seem like there's much possibility for confusion. You should also make your configure option error out if the target OS is not Windows.

Do we need a preprocessor define for targeting Metro? If so I'd suggest XP_METRO to be in-line with our existing defines.
(In reply to Ted Mielczarek [:ted] from comment #5)
> I would probably just simplify that even more, to "MOZ_METRO /
> --enable-metro". Doesn't seem like there's much possibility for confusion.
> You should also make your configure option error out if the target OS is not
> Windows.
> 
> Do we need a preprocessor define for targeting Metro? If so I'd suggest
> XP_METRO to be in-line with our existing defines.

I'm currently exporting 'MOZ_WIN8METRO' to mozilla_config.h and through autoconf.mk.in for use in makefiles and code. By "preprocessor define" I'm guessing this is what you are referring to? I'll go with your suggestions and fix these patches up.
(In reply to Jim Mathies [:jimm] from comment #6)
> (In reply to Ted Mielczarek [:ted] from comment #5)
> > I would probably just simplify that even more, to "MOZ_METRO /
> > --enable-metro". Doesn't seem like there's much possibility for confusion.
> > You should also make your configure option error out if the target OS is not
> > Windows.
> > 
> > Do we need a preprocessor define for targeting Metro? If so I'd suggest
> > XP_METRO to be in-line with our existing defines.
> 
> I'm currently exporting 'MOZ_WIN8METRO' to mozilla_config.h and through
> autoconf.mk.in for use in makefiles and code. By "preprocessor define" I'm
> guessing this is what you are referring to? I'll go with your suggestions
> and fix these patches up.

Actually I don't think we want XP_METRO, we rely on XP_WIN for all metro code, and MOZ_METRO for selectively choosing what windows code we build and for make options.
Attached patch build configSplinter Review
Attachment #608154 - Attachment is obsolete: true
Attachment #608154 - Flags: review?(khuey)
Attachment #608745 - Flags: review?(ted.mielczarek)
Comment on attachment 608745 [details] [diff] [review]
build config

Review of attachment 608745 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with a couple of tweaks.

::: config/autoconf.mk.in
@@ +545,5 @@
>  MOZ_ENABLE_DWRITE_FONT	= @MOZ_ENABLE_DWRITE_FONT@
>  MOZ_ENABLE_D2D_SURFACE	= @MOZ_ENABLE_D2D_SURFACE@
>  MOZ_ENABLE_D3D9_LAYER	= @MOZ_ENABLE_D3D9_LAYER@
>  MOZ_ENABLE_D3D10_LAYER  = @MOZ_ENABLE_D3D10_LAYER@
> +MOZ_METRO	= @MOZ_METRO@

nit: does this actually line up? Hard to tell with the diff viewer.

::: configure.in
@@ +702,5 @@
>  
>  MOZ_ARG_WITH_STRING(windows-version,
>  [  --with-windows-version=WINSDK_TARGETVER
>                            Highest Windows version to target using this SDK
> +                          602: Windows 8],

This is supposed to be a list of all the accepted values, so leave the old one in place and add the new one.

@@ +798,5 @@
>  
> +        dnl Confirm we have the pri tools on win8 builds
> +        if test -n "$MOZ_METRO"; then
> +          AC_MSG_CHECKING([for makepri])
> +          AC_CHECK_PROGS(MAKEPRI, makepri, "")

I think you need to explicitly check the value of $MAKEPRI after AC_CHECK_PROGS and error if it's missing. We don't do a very good job of that in our configure...
Attachment #608745 - Flags: review?(ted.mielczarek) → review+
Attached patch updated patch (obsolete) — Splinter Review
Attached patch updated patchSplinter Review
Adding a new check that makes sure the target and the tools match up right. I noticed I could add enable-metro in an msvc 10 terminal and configure would succeed. This won't work in practice sine we require the msvc 11 toolset to build metro code.

Output of the error looks like this:

configure: error: Your MOZ_MSVCVERSION equals 10 and you've enabled metro build support. You can't target metro without msvc 11 or higher. Disable metro support or switch to a newer set of tools.
Attachment #615307 - Attachment is obsolete: true
Comment on attachment 615315 [details] [diff] [review]
updated patch

Probably best to get another r? for the updates and minor additions.
Attachment #615315 - Flags: review?(ted.mielczarek)
Comment on attachment 615315 [details] [diff] [review]
updated patch

Review of attachment 615315 [details] [diff] [review]:
-----------------------------------------------------------------

Just a couple of minor nits:

::: configure.in
@@ +708,5 @@
>  
>  MOZ_ARG_WITH_STRING(windows-version,
>  [  --with-windows-version=WINSDK_TARGETVER
> +                          Windows SDK version to target. Lowest version
> +                          currently allowed is 601, highest is 602],

The previous comment was a bit more informative, mapping version numbers to products. Can you keep it in that style?

@@ +806,5 @@
> +        if test -n "$MOZ_METRO"; then
> +          AC_MSG_CHECKING([for makepri])
> +          AC_CHECK_PROGS(MAKEPRI, makepri, "")
> +          if test -z "MAKEPRI" ; then
> +              AC_MSG_ERROR([makepri.exe is required for generating metro browser install components. It should be in the 602 SDK.])

When you say "602 SDK" you mean "Windows 8 SDK" right? That would be a more useful error message.
Attachment #615315 - Flags: review?(ted.mielczarek) → review+
https://hg.mozilla.org/mozilla-central/rev/19f1387c2402
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Note that MAKEPRI is not defined in autoconf.mk.in, and as such, won't be available in Makefiles.
Attached patch makepri patchSplinter Review
Nice catch, this change is on elm but I didn't get it in with the patches here.
Attachment #632641 - Flags: review?(mh+mozilla)
Attachment #632641 - Flags: review?(mh+mozilla) → review+
No longer blocks: 737975
Blocks: elm-merge
OS: Windows 8 Metro → Windows 8.1
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: