Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: chrome/installer/mini_installer/mini_installer.cc

Issue 6676030: WinDDK ATL and MSVC express compatability (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Address OS_WIN ifdefs in source files; update to 78547 and fix merge conflict Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // mini_installer.exe is the first exe that is run when chrome is being 5 // mini_installer.exe is the first exe that is run when chrome is being
6 // installed or upgraded. It is designed to be extremely small (~5KB with no 6 // installed or upgraded. It is designed to be extremely small (~5KB with no
7 // extra resources linked) and it has two main jobs: 7 // extra resources linked) and it has two main jobs:
8 // 1) unpack the resources (possibly decompressing some) 8 // 1) unpack the resources (possibly decompressing some)
9 // 2) run the real installer (setup.exe) with appropiate flags. 9 // 2) run the real installer (setup.exe) with appropiate flags.
10 // 10 //
(...skipping 10 matching lines...) Expand all
21 // are forced to manually link against it. It comes in the form of two 21 // are forced to manually link against it. It comes in the form of two
22 // object files that exist in $(VCInstallDir)\crt\src which are memset.obj and 22 // object files that exist in $(VCInstallDir)\crt\src which are memset.obj and
23 // P4_memset.obj. These two object files rely on the existence of a static 23 // P4_memset.obj. These two object files rely on the existence of a static
24 // variable named __sse2_available which indicates the presence of intel sse2 24 // variable named __sse2_available which indicates the presence of intel sse2
25 // extensions. We define it to false which causes a slower but safe code for 25 // extensions. We define it to false which causes a slower but safe code for
26 // memcpy and memset intrinsics. 26 // memcpy and memset intrinsics.
27 27
28 // having the linker merge the sections is saving us ~500 bytes. 28 // having the linker merge the sections is saving us ~500 bytes.
29 #pragma comment(linker, "/MERGE:.rdata=.text") 29 #pragma comment(linker, "/MERGE:.rdata=.text")
30 30
31 #include <intrin.h> // __stosb for MSVC express memset implementation
31 #include <windows.h> 32 #include <windows.h>
32 #include <setupapi.h> 33 #include <setupapi.h>
33 #include <shellapi.h> 34 #include <shellapi.h>
34 35
35 #include "chrome/installer/mini_installer/appid.h" 36 #include "chrome/installer/mini_installer/appid.h"
36 #include "chrome/installer/mini_installer/decompress.h" 37 #include "chrome/installer/mini_installer/decompress.h"
37 #include "chrome/installer/mini_installer/mini_installer.h" 38 #include "chrome/installer/mini_installer/mini_installer.h"
38 #include "chrome/installer/mini_installer/mini_string.h" 39 #include "chrome/installer/mini_installer/mini_string.h"
39 #include "chrome/installer/mini_installer/pe_resource.h" 40 #include "chrome/installer/mini_installer/pe_resource.h"
40 41
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 816
816 return exit_code; 817 return exit_code;
817 } 818 }
818 819
819 } // namespace mini_installer 820 } // namespace mini_installer
820 821
821 int MainEntryPoint() { 822 int MainEntryPoint() {
822 int result = mini_installer::WMain(::GetModuleHandle(NULL)); 823 int result = mini_installer::WMain(::GetModuleHandle(NULL));
823 ::ExitProcess(result); 824 ::ExitProcess(result);
824 } 825 }
826
827 // VC Express editions don't come with the memset CRT obj file
828 #ifdef COMPILER_MSVC_EXPRESS
829 extern "C" {
830 #pragma function(memset)
831 void* memset(void *dest, int ci, size_t count) {
832 __stosb((unsigned char*)dest, (unsigned char)ci, count);
833 return dest;
834 }
835 }
836 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698