[CMake] Adopt the WinCE port to new CMake
authorparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2013 20:59:25 +0000 (20:59 +0000)
committerparoga@webkit.org <paroga@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2013 20:59:25 +0000 (20:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108754

Reviewed by Laszlo Gombos.

.:

Remove the entry point hack which isn't required in the new
CMake version with offical WindowsCE support.

* Source/cmake/OptionsWindows.cmake:

Source/JavaScriptCore:

* os-win32/WinMain.cpp: Removed.
* shell/PlatformWinCE.cmake: Removed.

Tools:

* WinCELauncher/CMakeLists.txt: Mark WinCELauncher
as WIN32 target to use the correct entry point.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141702 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/os-win32/WinMain.cpp [deleted file]
Source/JavaScriptCore/shell/PlatformWinCE.cmake [deleted file]
Source/cmake/OptionsWindows.cmake
Tools/ChangeLog
Tools/WinCELauncher/CMakeLists.txt

index ecc3572..3b70570 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-02-02  Patrick Gansterer  <paroga@webkit.org>
+
+        [CMake] Adopt the WinCE port to new CMake
+        https://bugs.webkit.org/show_bug.cgi?id=108754
+
+        Reviewed by Laszlo Gombos.
+
+        Remove the entry point hack which isn't required in the new
+        CMake version with offical WindowsCE support.
+
+        * Source/cmake/OptionsWindows.cmake:
+
 2013-02-01  Benjamin Poulain  <bpoulain@apple.com>
 
         Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime
index f0707fd..1c838b3 100644 (file)
@@ -1,3 +1,13 @@
+2013-02-02  Patrick Gansterer  <paroga@webkit.org>
+
+        [CMake] Adopt the WinCE port to new CMake
+        https://bugs.webkit.org/show_bug.cgi?id=108754
+
+        Reviewed by Laszlo Gombos.
+
+        * os-win32/WinMain.cpp: Removed.
+        * shell/PlatformWinCE.cmake: Removed.
+
 2013-02-02  Mark Rowe  <mrowe@apple.com>
 
         <http://webkit.org/b/108745> WTF shouldn't use a script build phase to detect the presence of headers when the compiler can do it for us
diff --git a/Source/JavaScriptCore/os-win32/WinMain.cpp b/Source/JavaScriptCore/os-win32/WinMain.cpp
deleted file mode 100644 (file)
index d4ff3e6..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *  Copyright (C) 2009 Patrick Gansterer (paroga@paroga.com)
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include <wtf/Vector.h>
-#include <winbase.h>
-#include <winnls.h>
-#include <wtf/UnusedParam.h>
-
-int main(int argc, char** argv);
-
-static inline char* convertToUtf8(LPCWSTR widecharString, int length)
-{
-    int requiredSize = WideCharToMultiByte(CP_UTF8, 0, widecharString, length, 0, 0, 0, 0);
-    char* multibyteString = new char[requiredSize + 1];
-
-    WideCharToMultiByte(CP_UTF8, 0, widecharString, length, multibyteString, requiredSize, 0, 0);
-    multibyteString[requiredSize] = '\0';
-
-    return multibyteString;
-}
-
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
-{
-    UNUSED_PARAM(hInstance);
-    UNUSED_PARAM(hPrevInstance);
-    UNUSED_PARAM(nCmdShow);
-
-    Vector<char*> arguments;
-    TCHAR buffer[MAX_PATH];
-
-    int length = GetModuleFileNameW(0, buffer, MAX_PATH);
-    arguments.append(convertToUtf8(buffer, length));
-
-    WCHAR* commandLine = lpCmdLine;
-    while (commandLine[0] != '\0') {
-        int commandLineLength = 1;
-        WCHAR endChar = ' ';
-
-        while (commandLine[0] == ' ')
-            ++commandLine;
-
-        if (commandLine[0] == '\"') {
-            ++commandLine;
-            endChar = '\"';
-        }
-
-        while (commandLine[commandLineLength] != endChar && commandLine[commandLineLength] != '\0')
-            ++commandLineLength;
-
-        arguments.append(convertToUtf8(commandLine, commandLineLength));
-
-        commandLine += commandLineLength;
-        if (endChar != ' ' && commandLine[0] != '\0')
-            ++commandLine;
-    }
-
-    int res = main(arguments.size(), arguments.data());
-
-    for (size_t i = 0; i < arguments.size(); i++)
-        delete arguments[i];
-
-    return res;
-}
diff --git a/Source/JavaScriptCore/shell/PlatformWinCE.cmake b/Source/JavaScriptCore/shell/PlatformWinCE.cmake
deleted file mode 100644 (file)
index c5bc981..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-list(APPEND JSC_SOURCES
-    ../os-win32/WinMain.cpp
-)
index c932e10..f31a28c 100644 (file)
@@ -15,5 +15,3 @@ if (MSVC)
         set(CMAKE_CXX_FLAGS "/MP ${CMAKE_CXX_FLAGS}")
     endif ()
 endif ()
-
-string(REPLACE "/ENTRY:mainACRTStartup" "/ENTRY:WinMainCRTStartup" CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
index faddb4c..40ffcf2 100644 (file)
@@ -1,3 +1,13 @@
+2013-02-02  Patrick Gansterer  <paroga@webkit.org>
+
+        [CMake] Adopt the WinCE port to new CMake
+        https://bugs.webkit.org/show_bug.cgi?id=108754
+
+        Reviewed by Laszlo Gombos.
+
+        * WinCELauncher/CMakeLists.txt: Mark WinCELauncher
+        as WIN32 target to use the correct entry point.
+
 2013-02-02  Alexey Proskuryakov  <ap@apple.com>
 
         One is not allowed to use commit-queue to make oneself a committer.
index e9bb98d..06f70ca 100644 (file)
@@ -20,7 +20,7 @@ set(WinCELauncher_LIBRARIES
 )
 
 include_directories(${WinCELauncher_INCLUDE_DIRECTORIES})
-add_executable(WinCELauncher ${WinCELauncher_SOURCES})
+add_executable(WinCELauncher WIN32 ${WinCELauncher_SOURCES})
 add_dependencies(WinCELauncher ${WebKit_LIBRARY_NAME})
 target_link_libraries(WinCELauncher ${WinCELauncher_LIBRARIES})
 set_target_properties(WinCELauncher PROPERTIES FOLDER "Tools")