Bug 53445

Summary: Apple's Windows port should build with Visual Studio 2010
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Tools / TestsAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bfulgham, eric, levin+threading, mrowe, paroga, roger_fong, sfalken, thorton, webkit.review.bot
Priority: P2 Keywords: InRadar, ToolsHitList
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Bug Depends on: 34804    
Bug Blocks:    
Attachments:
Description Flags
WIP: Basic CMake based build system for Windows
none
New general property sheets to build with VS2010
none
New projects and property sheets to build with VS2010.
none
New general property sheets to build with VS2010
none
New projects and property sheets to build JavaScriptCore with VS2010.
none
WIP: Basic CMake based build system for Windows
none
New projects and property sheets to build WebCore with VS2010.
none
New projects and property sheets to build WebKit (1) with VS2010.
none
New projects and property sheets to build WebKit2 with VS2010.
none
New projects and property sheets to build ThirdParty stuff with VS2010.
none
New projects and property sheets to build Tools with VS2010. none

Description Adam Roben (:aroben) 2011-01-31 12:26:21 PST
We'd like to be able to build Apple's Windows port with Visual Studio 2010. We'll likely drop support for VS2005 at the same time, as maintaining two sets of projects files would be burdensome.
Comment 1 Adam Roben (:aroben) 2011-01-31 12:26:32 PST
We'd like to do this sometime in the next 6-8 months.
Comment 2 Adam Roben (:aroben) 2011-01-31 12:27:20 PST
<rdar://problem/8938852>
Comment 3 Adam Roben (:aroben) 2011-01-31 12:30:28 PST
The biggest consequence of this will be that anyone wishing to build Apple's Windows port will have to switch from VS2005/VC++ Express 2005 to VS2010 or VC++ Express 2010. This change should not affect applications that use WebKit, as we don't pass memory ownership across the WebKit API boundary (i.e., mallocing memory inside WebKit for the application to free later, or vice-versa).
Comment 4 Adam Roben (:aroben) 2011-01-31 12:31:05 PST
I sent an email to webkit-dev describing this effort. Hopefully people will speak up if this change will cause them problems.
Comment 5 Adam Roben (:aroben) 2011-01-31 12:32:50 PST
(In reply to comment #4)
> I sent an email to webkit-dev describing this effort.

http://thread.gmane.org/gmane.os.opendarwin.webkit.devel/15787
Comment 6 Patrick R. Gansterer 2011-11-16 16:39:36 PST
Created attachment 115481 [details]
WIP: Basic CMake based build system for Windows

Please let me know if this bug isn't ok for this.

After a long time, I now finally have a working state of the CMake build system to build the Aplle Windows port.
It's not perfect and only builds WebKit1 with WinLauncher, but should show the direction.
Maybe someone can give me some early feedback on this.

To build with with CMake:
1) clean checkout
2) populate the WebKitLibraries/win directory as usual (CMake expects the libraries there)
3) create an empty directory (anywhere) and open a cmd there
4) run: cmake path\to\WebKit\Source -DPORT=WinApple -G "Visual Studio 8 2005"
4b) if cmake reports some errors: run cmake again with: cmake .
5) open the solution an build it
Comment 7 Brent Fulgham 2011-11-17 11:18:10 PST
Created attachment 115624 [details]
New general property sheets to build with VS2010

Updated property sheets for use with VS2010.  They should contain identical settings as the original VS2005 versions of these files.
Comment 8 Brent Fulgham 2011-11-17 11:23:39 PST
Created attachment 115626 [details]
New projects and property sheets to build with VS2010.

I had to break the project file changes up to get Bugzilla to accept them.  This batch deals with the JavaScriptCore directory.  It requires Patch 115624 to be present.
Comment 9 Brent Fulgham 2011-11-17 11:27:33 PST
Created attachment 115628 [details]
New general property sheets to build with VS2010
Comment 10 Brent Fulgham 2011-11-17 11:32:42 PST
Created attachment 115631 [details]
New projects and property sheets to build JavaScriptCore with VS2010.

Requires Patch 115626.
Comment 11 Patrick R. Gansterer 2011-11-17 11:38:59 PST
Created attachment 115633 [details]
WIP: Basic CMake based build system for Windows
Comment 12 Brent Fulgham 2011-11-17 11:39:28 PST
Created attachment 115634 [details]
New projects and property sheets to build WebCore with VS2010.

Requires patch 115628 and 115631 to be applied first.
Comment 13 Brent Fulgham 2011-11-17 11:40:53 PST
Created attachment 115636 [details]
New projects and property sheets to build WebKit (1) with VS2010.

Requires 115628, 115631, and 115634 to be applied first.
Comment 14 Brent Fulgham 2011-11-17 11:41:27 PST
Created attachment 115637 [details]
New projects and property sheets to build WebKit2 with VS2010.

Requires 115628, 115631, 115634, and 115636 to be applied.
Comment 15 Brent Fulgham 2011-11-17 11:42:23 PST
Created attachment 115639 [details]
New projects and property sheets to build ThirdParty stuff with VS2010.
Comment 16 Brent Fulgham 2011-11-17 11:46:55 PST
Created attachment 115641 [details]
New projects and property sheets to build Tools with VS2010.
Comment 17 Brent Fulgham 2011-11-17 12:04:02 PST
Comment on attachment 115633 [details]
WIP: Basic CMake based build system for Windows

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

This patch looks great -- it sure would be nice to have a single unified build system.  I had a few comments in individual files.

At a higher level, it sure seems like we could refactor these files to share between the WinApple and WinCairo ports. Does cmake have an 'include' feature so that both ports could share common file requirements between them?

> Source/JavaScriptCore/PlatformWinApple.cmake:1
> +LIST(APPEND JavaScriptCore_SOURCES

A lot of the files referenced in the cmake document are needed by the WinCairo port as well.  Is it possible for *.cmake files to include other *.cmake files, so that we could have a "PlatformWin.cmake" that was used by a "PlatformWinApple.cmake" and a "PlatformWinCairo.cmake"?

> Source/WebKit2/win/WebKit2.def:72
> +;        JSStringCopyCFString

Why was it necessary to comment this out?

> Source/WebKit2/win/WebKit2.def:74
> +;        JSStringCreateWithCFString

ditto
Comment 18 Gyuyoung Kim 2011-11-17 12:10:37 PST
Comment on attachment 115633 [details]
WIP: Basic CMake based build system for Windows

Attachment 115633 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/10340273
Comment 19 Eric Seidel (no email) 2011-12-21 13:27:43 PST
We could also just convert the Apple windows port to use GYP and we'd get visual studio 10 support for free. :)
Comment 20 Patrick R. Gansterer 2012-04-11 07:42:04 PDT
Comment on attachment 115633 [details]
WIP: Basic CMake based build system for Windows

Clear review request, since the CMake stuff is at bug 72816.
Comment 21 Eric Seidel (no email) 2012-08-01 16:14:23 PDT
I think this should probably be closed as WONTFIX, since it seems that Apple has silently stopped working on their windows port.  At least there is more Safari Win... Maybe its still being developed for iTunes.
Comment 22 Brent Fulgham 2012-08-02 12:03:18 PDT
(In reply to comment #21)
> I think this should probably be closed as WONTFIX, since it seems that Apple has silently stopped working on their windows port.  At least there is more Safari Win... Maybe its still being developed for iTunes.

I'd prefer to wait until Darin or someone tells us they do not intend to update the Windows port any longer.  Even if they do, we could then update to VS2010 without involving Apple.

Either way, I think it is premature to close this bug without someone from Apple stating that the Apple port  will no longer be updated.
Comment 23 Mark Rowe (bdash) 2012-08-02 13:36:31 PDT
(In reply to comment #21)
> I think this should probably be closed as WONTFIX, since it seems that Apple has silently stopped working on their windows port.  At least there is more Safari Win... Maybe its still being developed for iTunes.

Eric, your uninformed speculation is not useful here. Please stick to commenting on the many matters that you're actually informed about.
Comment 24 Brent Fulgham 2012-11-19 22:05:28 PST
I'm clearing the review flags on all of these patches since I don't think anyone's likely to review them, and WebKit has moved on significantly since then.

At some point, when Apple updates compilers, we can close this issue.
Comment 25 Brent Fulgham 2013-04-05 20:18:13 PDT
This is complete.