Bug 106986

Summary: Get WTF compiling in VS2010 (32bit)
Product: WebKit Reporter: Roger Fong <roger_fong>
Component: PlatformAssignee: Roger Fong <roger_fong>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, jonlee, roger_fong, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Bug Depends on:    
Bug Blocks: 106949, 106987    
Attachments:
Description Flags
WTF property sheets and project files
none
Patch thorton: review+

Description Roger Fong 2013-01-16 00:51:44 PST
This includes the WTFGenerated and WTF.
Comment 1 Radar WebKit Bug Importer 2013-01-16 00:57:38 PST
<rdar://problem/13022716>
Comment 2 Roger Fong 2013-01-16 01:20:43 PST
This one's done, will upload patch soon.
Comment 3 Roger Fong 2013-01-19 15:19:06 PST
Created attachment 183638 [details]
WTF property sheets and project files
Comment 4 Tim Horton 2013-01-19 15:30:16 PST
Comment on attachment 183638 [details]
WTF property sheets and project files

View in context: https://bugs.webkit.org/attachment.cgi?id=183638&action=review

Rubber-stamp is the best I can do here.

Also, what's with the couple garbage bytes at the beginning of lots of the generated files?

> WTF.vcproj/WTF.sln:5
> -Microsoft Visual Studio Solution File, Format Version 9.00
> -# Visual Studio 2005
> -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTFGenerated", "WTFGenerated.vcproj", "{5AE5F5E4-782D-4F63-B4D7-3977B52B9950}"
> +Microsoft Visual Studio Solution File, Format Version 11.00
> +# Visual Studio 2010
> +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTFGenerated", "WTFGenerated.vcxproj", "{5AE5F5E4-782D-4F63-B4D7-3977B52B9950}"
>  EndProject

Did you mean to upgrade the toplevel solution?

> WTF2010.vcproj/work-around-vs-dependency-tracking-bugs.py:27
> +    # Visual Studio isn't smart enough to figure out it needs to rebuild these file types when
> +    # .vsprops files change (even if we touch wtf/Platform.h below), so we delete them to force them
> +    # to be rebuilt.

Is this still true?

> config.h:41
>  #ifndef _WIN32_WINNT
> -#define _WIN32_WINNT 0x0500
> +#define _WIN32_WINNT 0x0501
>  #endif
>  
>  #ifndef WINVER
> -#define WINVER 0x0500
> +#define WINVER 0x0501
>  #endif

What is going on here? I see that 0x0501 is Windows XP... what was 0x0500?
Comment 5 Brent Fulgham 2013-01-20 13:05:11 PST
Comment on attachment 183638 [details]
WTF property sheets and project files

View in context: https://bugs.webkit.org/attachment.cgi?id=183638&action=review

This looks great to me.

>> WTF.vcproj/WTF.sln:5
>>  EndProject
> 
> Did you mean to upgrade the toplevel solution?

One possibility would be to maintain a "WTF_vc2010.sln", but how many people build WTF by itself, who would want to continue doing so now that it builds under VS2010?  I think it's great to move the solution over ASAP.

>> config.h:41
>>  #endif
> 
> What is going on here? I see that 0x0501 is Windows XP... what was 0x0500?

0x0500 is Windows 2000.

Wouldn't it be nice to jettison Windows XP support as well?  We don't worry about OS X Tiger anymore...
Comment 6 Brent Fulgham 2013-01-20 13:06:53 PST
(In reply to comment #4)
> (From update of attachment 183638 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=183638&action=review
> 
> Rubber-stamp is the best I can do here.
> 
> Also, what's with the couple garbage bytes at the beginning of lots of the generated files?

I think those are the (optional) UTF byte order marks generated by Visual Studio when saving the files (http://en.wikipedia.org/wiki/Byte_order_mark).
Comment 7 Roger Fong 2013-01-21 15:32:27 PST
> Wouldn't it be nice to jettison Windows XP support as well?  We don't worry about OS X Tiger anymore...

We still need to support XP here.

Should I get rid of the optional byte marks? I just let VS do its thing there.
Comment 8 Brent Fulgham 2013-01-22 11:08:57 PST
(In reply to comment #7)
> > Wouldn't it be nice to jettison Windows XP support as well?  We don't worry about OS X Tiger anymore...
> 
> We still need to support XP here.
> 
> Should I get rid of the optional byte marks? I just let VS do its thing there.

Let's just let VS make the file the way it wants.  It might avoid problems with file formats changing from commit-to-commit if people have different native settings on their computers.
Comment 9 Brent Fulgham 2013-01-22 11:09:23 PST
Can you go ahead and land this change?
Comment 10 Roger Fong 2013-01-22 15:11:43 PST
Okay, landed here: http://trac.webkit.org/changeset/140451

Sorry it took so long, I've been wrestling (physically) with Windows bots all day/last week.
Comment 11 Brent Fulgham 2013-01-24 10:40:43 PST
Created attachment 184527 [details]
Patch
Comment 12 Brent Fulgham 2013-01-24 10:47:49 PST
I've added a patch that helps to avoid build problems if you do NOT have the CYGWIN stuff in your standard path.

I also corrected the 'clean' stanza so that it works properly (at least under WTF).  I'm moving through the rest of the projects now, and should have some updates later.
Comment 13 Brent Fulgham 2013-01-24 10:50:01 PST
Committed r140694: <http://trac.webkit.org/changeset/140694>