diff --git a/reactos/base/applications/iexplore/CMakeLists.txt b/reactos/base/applications/iexplore/CMakeLists.txt index bceb4aedd14..540c1b7f0f5 100644 --- a/reactos/base/applications/iexplore/CMakeLists.txt +++ b/reactos/base/applications/iexplore/CMakeLists.txt @@ -1,5 +1,7 @@ add_executable(iexplore main.c iexplore.rc) -set_module_type(iexplore win32gui) -add_importlibs(iexplore shdocvw msvcrt kernel32) +target_link_libraries(iexplore wine) +set_module_type(iexplore win32gui UNICODE) +add_importlibs(iexplore ieframe msvcrt kernel32 ntdll) +add_delay_importlibs(iexplore advpack version) add_cd_file(TARGET iexplore DESTINATION reactos FOR all) diff --git a/reactos/base/applications/iexplore/iexplore.inf b/reactos/base/applications/iexplore/iexplore.inf new file mode 100644 index 00000000000..a45df9f106a --- /dev/null +++ b/reactos/base/applications/iexplore/iexplore.inf @@ -0,0 +1,43 @@ +[version] +Signature="$CHICAGO$" + + +[RegisterIE] +AddReg=Classes.Reg, IE.Reg, Settings.Reg + + +[UnregisterIE] +DelReg=Classes.Reg, IE.Reg, Settings.Reg + + +[Classes.Reg] +HKCR,"CLSID\%CLSID_InternetExplorer%",,,"Internet Explorer(Ver 1.0)" +HKCR,"CLSID\%CLSID_InternetExplorer%\LocalServer32",,,"""%16422%\Internet Explorer\iexplore.exe""" +HKCR,"CLSID\%CLSID_InternetExplorer%\ProgID",,,"InternetExplorer.Application.1" +HKCR,"CLSID\%CLSID_InternetExplorer%\VersionIndependentProgID",,,"InternetExplorer.Application" + +HKCR,"CLSID\%CLSID_Internet%\DefaultIcon",,,"shdoclc.dll,-190" +HKCR,"CLSID\%CLSID_Internet%\Shell",,,"OpenHomePage" +HKCR,"CLSID\%CLSID_Internet%\Shell\OpenHomePage",,,"Open &Home Page" +HKCR,"CLSID\%CLSID_Internet%\Shell\OpenHomePage\Command",,,"""%16422%\Internet Explorer\iexplore.exe""" +HKCR,"CLSID\%CLSID_Internet%\ShellFolder",,2,"0x24" + + +[Settings.Reg] +HKCU,"Software\Microsoft\Internet Explorer\Main","Start Page",2,"http://www.winehq.org" +HKCU,"Software\Microsoft\Internet Explorer\Main","Search Page",2,"http://www.google.com" +HKCU,"Software\Microsoft\Internet Explorer\Settings","Text Color",2,"0,0,0" +HKLM,"Software\Microsoft\Internet Explorer\Main","Default_Page_URL",2,"http://www.winehq.org" +HKLM,"Software\Microsoft\Windows\CurrentVersion\App Paths\iexplore.exe",,,"%16422%\Internet Explorer\iexplore.exe" +HKLM,"Software\Microsoft\Windows\CurrentVersion\App Paths\iexplore.exe","Path",,"%16422%\Internet Explorer;" + + +[IE.Reg] +HKLM,"Software\Microsoft\Internet Explorer","Build",,"86001" +HKLM,"Software\Microsoft\Internet Explorer","Version",,"8.0.6001.18702" +HKLM,"Software\Microsoft\Internet Explorer","W2kVersion",,"8.0.6001.18702" + + +[Strings] +CLSID_InternetExplorer="{0002df01-0000-0000-c000-000000000046}" +CLSID_Internet="{871c5380-42a0-1069-a2ea-08002b30309d}" diff --git a/reactos/base/applications/iexplore/iexplore.rc b/reactos/base/applications/iexplore/iexplore.rc index 64a976cf4f5..cd757817454 100644 --- a/reactos/base/applications/iexplore/iexplore.rc +++ b/reactos/base/applications/iexplore/iexplore.rc @@ -28,3 +28,6 @@ /* @makedep: iexplore.ico */ 1 ICON iexplore.ico + +/* @makedep: iexplore.inf */ +REGINST REGINST iexplore.inf diff --git a/reactos/base/applications/iexplore/main.c b/reactos/base/applications/iexplore/main.c index 21f0c71897f..014c85a6215 100644 --- a/reactos/base/applications/iexplore/main.c +++ b/reactos/base/applications/iexplore/main.c @@ -18,11 +18,81 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +//#include + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + #include +#include +#include +#include +#include -extern DWORD WINAPI IEWinMain(LPSTR, int); +#include +//#include +//#include -int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) +#include +#include + +extern DWORD WINAPI IEWinMain(const WCHAR*, int); + +static BOOL check_native_ie(void) { + DWORD handle, size; + LPWSTR file_desc; + UINT bytes; + void* buf; + BOOL ret; + + static const WCHAR browseui_dllW[] = {'b','r','o','w','s','e','u','i','.','d','l','l',0}; + static const WCHAR wineW[] = {'W','i','n','e',0}; + static const WCHAR file_desc_strW[] = + {'\\','S','t','r','i','n','g','F','i','l','e','I','n','f','o', + '\\','0','4','0','9','0','4','b','0', + '\\','F','i','l','e','D','e','s','c','r','i','p','t','i','o','n',0}; + + size = GetFileVersionInfoSizeW(browseui_dllW, &handle); + if(!size) + return TRUE; + + buf = HeapAlloc(GetProcessHeap(), 0, size); + GetFileVersionInfoW(browseui_dllW, 0, size,buf); + + ret = !VerQueryValueW(buf, file_desc_strW, (void**)&file_desc, &bytes) || !strstrW(file_desc, wineW); + + HeapFree(GetProcessHeap(), 0, buf); + return ret; +} + +static DWORD register_iexplore(BOOL doregister) +{ + HRESULT hres; + + if (check_native_ie()) { + WINE_MESSAGE("Native IE detected, not doing registration\n"); + return 0; + } + + hres = RegInstallA(NULL, doregister ? "RegisterIE" : "UnregisterIE", NULL); + return FAILED(hres); +} + +int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE prev, WCHAR *cmdline, int show) +{ + static const WCHAR regserverW[] = {'r','e','g','s','e','r','v','e','r',0}; + static const WCHAR unregserverW[] = {'u','n','r','e','g','s','e','r','v','e','r',0}; + + if(*cmdline == '-' || *cmdline == '/') { + if(!strcmpiW(cmdline+1, regserverW)) + return register_iexplore(TRUE); + if(!strcmpiW(cmdline+1, unregserverW)) + return register_iexplore(FALSE); + } + return IEWinMain(cmdline, show); } diff --git a/reactos/boot/bootdata/hivesft.inf b/reactos/boot/bootdata/hivesft.inf index da6a030f5cc..78df0ca510e 100644 --- a/reactos/boot/bootdata/hivesft.inf +++ b/reactos/boot/bootdata/hivesft.inf @@ -104,7 +104,7 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions",,0x00000012 ; FIXME - usetup doesn't handle extra paths -HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","",0x00000000,"cmd /c md ""%programfiles%\Internet Explorer\"" && move %windir%\iexplore.exe ""%programfiles%\Internet Explorer\""" +HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","",0x00000000,"cmd /c md ""%programfiles%\Internet Explorer\"" && move %windir%\iexplore.exe ""%programfiles%\Internet Explorer\"" && ""%programfiles%\Internet Explorer\iexplore.exe"" /RegServer" ; Create .NET Framework InstallRoot key, reg_sz & full path ;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","InstallRoot.NET",0x00000000,"cmd /c reg add HKLM\SOFTWARE\Microsoft\.NETFramework /v InstallRoot /t REG_SZ /d %SystemRoot%\Microsoft.NET\Framework\" diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index c245ba3ad77..42c68c2979a 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -212,7 +212,7 @@ ReactOS shares the following programs with Winehq. reactos/base/applications/cmdutils/xcopy # Synced to Wine-1.3.37 reactos/base/applications/games/winmine # Forked at Wine-1_3_5 reactos/base/applications/extrac32 # Autosync -reactos/base/applications/iexplore # Autosync +reactos/base/applications/iexplore # Synced to Wine-1.5.26 reactos/base/applications/notepad # Forked at Wine-20041201 reactos/base/applications/reg # Autosync reactos/base/applications/regedit # Out of sync