diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/win_updater | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/win_updater/updater.cpp | 27 | ||||
-rw-r--r-- | linden/indra/win_updater/win_updater_vc8.vcproj | 295 |
2 files changed, 309 insertions, 13 deletions
diff --git a/linden/indra/win_updater/updater.cpp b/linden/indra/win_updater/updater.cpp index 20e41a8..e41ab00 100644 --- a/linden/indra/win_updater/updater.cpp +++ b/linden/indra/win_updater/updater.cpp | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <wininet.h> | 33 | #include <wininet.h> |
34 | 34 | ||
35 | #include <stdio.h> | 35 | #include <stdio.h> |
36 | #include "llpreprocessor.h" | ||
36 | #include "llfile.h" | 37 | #include "llfile.h" |
37 | 38 | ||
38 | #define BUFSIZE 8192 | 39 | #define BUFSIZE 8192 |
@@ -81,7 +82,7 @@ int WINAPI get_url_into_file(WCHAR *uri, char *path, int *cancelled) | |||
81 | *cancelled = FALSE; | 82 | *cancelled = FALSE; |
82 | 83 | ||
83 | HINTERNET hinet, hdownload; | 84 | HINTERNET hinet, hdownload; |
84 | char data[BUFSIZE]; | 85 | char data[BUFSIZE]; /* Flawfinder: ignore */ |
85 | unsigned long bytes_read; | 86 | unsigned long bytes_read; |
86 | 87 | ||
87 | #if _DEBUG | 88 | #if _DEBUG |
@@ -89,7 +90,7 @@ int WINAPI get_url_into_file(WCHAR *uri, char *path, int *cancelled) | |||
89 | fflush(logfile); | 90 | fflush(logfile); |
90 | #endif | 91 | #endif |
91 | 92 | ||
92 | FILE *fp = fopen(path, "wb"); | 93 | FILE* fp = fopen(path, "wb"); /* Flawfinder: ignore */ |
93 | 94 | ||
94 | if (!fp) | 95 | if (!fp) |
95 | { | 96 | { |
@@ -132,7 +133,7 @@ int WINAPI get_url_into_file(WCHAR *uri, char *path, int *cancelled) | |||
132 | { | 133 | { |
133 | #if _DEBUG | 134 | #if _DEBUG |
134 | DWORD err = GetLastError(); | 135 | DWORD err = GetLastError(); |
135 | fprintf(logfile,"InternetQueryDataAvailable Failed: %d bytes\n",total_bytes); | 136 | fprintf(logfile,"InternetQueryDataAvailable Failed: %d bytes Err:%d\n",total_bytes,err); |
136 | fflush(logfile); | 137 | fflush(logfile); |
137 | #endif | 138 | #endif |
138 | return success; | 139 | return success; |
@@ -320,7 +321,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho | |||
320 | 321 | ||
321 | const int MAX_ARGS = 100; | 322 | const int MAX_ARGS = 100; |
322 | int argc = 0; | 323 | int argc = 0; |
323 | char *argv[MAX_ARGS]; | 324 | char* argv[MAX_ARGS]; /* Flawfinder: ignore */ |
324 | 325 | ||
325 | #if _DEBUG | 326 | #if _DEBUG |
326 | logfile = _wfopen(TEXT("updater.log"),TEXT("wt")); | 327 | logfile = _wfopen(TEXT("updater.log"),TEXT("wt")); |
@@ -346,7 +347,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho | |||
346 | { | 347 | { |
347 | argv[argc++] = token; | 348 | argv[argc++] = token; |
348 | /* Get next token: */ | 349 | /* Get next token: */ |
349 | if (*(token + strlen(token) + 1) == '\"') | 350 | if (*(token + strlen(token) + 1) == '\"') /* Flawfinder: ignore */ |
350 | { | 351 | { |
351 | token = strtok( NULL, "\""); | 352 | token = strtok( NULL, "\""); |
352 | } | 353 | } |
@@ -379,7 +380,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho | |||
379 | if (gProductName) | 380 | if (gProductName) |
380 | { | 381 | { |
381 | mbstowcs(window_title, gProductName, 2048); | 382 | mbstowcs(window_title, gProductName, 2048); |
382 | wcscat(window_title, L" Updater"); | 383 | wcscat(window_title, L" Updater"); /* Flawfinder: ignore */ |
383 | } | 384 | } |
384 | else | 385 | else |
385 | { | 386 | { |
@@ -388,7 +389,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho | |||
388 | 389 | ||
389 | WNDCLASSEX wndclassex = { 0 }; | 390 | WNDCLASSEX wndclassex = { 0 }; |
390 | DEVMODE dev_mode = { 0 }; | 391 | DEVMODE dev_mode = { 0 }; |
391 | char update_exec_path[MAX_PATH]; | 392 | char update_exec_path[MAX_PATH]; /* Flawfinder: ignore */ |
392 | char *ptr; | 393 | char *ptr; |
393 | WCHAR update_uri[4096]; | 394 | WCHAR update_uri[4096]; |
394 | 395 | ||
@@ -457,10 +458,10 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho | |||
457 | *(ptr + 2) = 'x'; | 458 | *(ptr + 2) = 'x'; |
458 | *(ptr + 3) = 'e'; | 459 | *(ptr + 3) = 'e'; |
459 | *(ptr + 4) = 0; | 460 | *(ptr + 4) = 0; |
460 | wcscpy(update_uri, UPDATE_URIBASE); | 461 | wcscpy(update_uri, UPDATE_URIBASE); /* Flawfinder: ignore */ |
461 | WCHAR wcmdline[2048]; | 462 | WCHAR wcmdline[2048]; |
462 | mbstowcs(wcmdline, gUserServer, 2048); | 463 | mbstowcs(wcmdline, gUserServer, 2048); |
463 | wcscat(update_uri, wcmdline); | 464 | wcscat(update_uri, wcmdline); /* Flawfinder: ignore */ |
464 | 465 | ||
465 | int success; | 466 | int success; |
466 | int cancelled; | 467 | int cancelled; |
@@ -503,18 +504,18 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho | |||
503 | } | 504 | } |
504 | 505 | ||
505 | // Construct some parameters. | 506 | // Construct some parameters. |
506 | char params[2048]; | 507 | char params[2048]; /* Flawfinder: ignore */ |
507 | if (gIsSilent && gProgramName) | 508 | if (gIsSilent && gProgramName) |
508 | { | 509 | { |
509 | sprintf(params, "/S /P=\"%s\"", gProgramName); | 510 | snprintf(params, sizeof(params), "/S /P=\"%s\"", gProgramName); /* Flawfinder: ignore */ |
510 | } | 511 | } |
511 | else if (gProgramName) | 512 | else if (gProgramName) |
512 | { | 513 | { |
513 | sprintf(params, "/P=\"%s\"", gProgramName); | 514 | snprintf(params, sizeof(params), "/P=\"%s\"", gProgramName); /* Flawfinder: ignore */ |
514 | } | 515 | } |
515 | else if (gIsSilent) | 516 | else if (gIsSilent) |
516 | { | 517 | { |
517 | sprintf(params, "/S"); | 518 | sprintf(params, "/S"); /* Flawfinder: ignore */ |
518 | } | 519 | } |
519 | else | 520 | else |
520 | { | 521 | { |
diff --git a/linden/indra/win_updater/win_updater_vc8.vcproj b/linden/indra/win_updater/win_updater_vc8.vcproj new file mode 100644 index 0000000..3368ac5 --- /dev/null +++ b/linden/indra/win_updater/win_updater_vc8.vcproj | |||
@@ -0,0 +1,295 @@ | |||
1 | <?xml version="1.0" encoding="Windows-1252"?> | ||
2 | <VisualStudioProject | ||
3 | ProjectType="Visual C++" | ||
4 | Version="8.00" | ||
5 | Name="win_updater" | ||
6 | ProjectGUID="{E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}" | ||
7 | RootNamespace="win_updater" | ||
8 | Keyword="Win32Proj" | ||
9 | > | ||
10 | <Platforms> | ||
11 | <Platform | ||
12 | Name="Win32" | ||
13 | /> | ||
14 | </Platforms> | ||
15 | <ToolFiles> | ||
16 | </ToolFiles> | ||
17 | <Configurations> | ||
18 | <Configuration | ||
19 | Name="Debug|Win32" | ||
20 | OutputDirectory="Debug" | ||
21 | IntermediateDirectory="Debug" | ||
22 | ConfigurationType="1" | ||
23 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
24 | CharacterSet="1" | ||
25 | > | ||
26 | <Tool | ||
27 | Name="VCPreBuildEventTool" | ||
28 | /> | ||
29 | <Tool | ||
30 | Name="VCCustomBuildTool" | ||
31 | /> | ||
32 | <Tool | ||
33 | Name="VCXMLDataGeneratorTool" | ||
34 | /> | ||
35 | <Tool | ||
36 | Name="VCWebServiceProxyGeneratorTool" | ||
37 | /> | ||
38 | <Tool | ||
39 | Name="VCMIDLTool" | ||
40 | /> | ||
41 | <Tool | ||
42 | Name="VCCLCompilerTool" | ||
43 | Optimization="0" | ||
44 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llmessage;..\llwindow" | ||
45 | PreprocessorDefinitions="WIN32;_DEBUG;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" | ||
46 | MinimalRebuild="true" | ||
47 | BasicRuntimeChecks="3" | ||
48 | RuntimeLibrary="1" | ||
49 | StructMemberAlignment="4" | ||
50 | TreatWChar_tAsBuiltInType="false" | ||
51 | ForceConformanceInForLoopScope="true" | ||
52 | UsePrecompiledHeader="0" | ||
53 | WarningLevel="3" | ||
54 | Detect64BitPortabilityProblems="false" | ||
55 | DebugInformationFormat="4" | ||
56 | /> | ||
57 | <Tool | ||
58 | Name="VCManagedResourceCompilerTool" | ||
59 | /> | ||
60 | <Tool | ||
61 | Name="VCResourceCompilerTool" | ||
62 | /> | ||
63 | <Tool | ||
64 | Name="VCPreLinkEventTool" | ||
65 | /> | ||
66 | <Tool | ||
67 | Name="VCLinkerTool" | ||
68 | AdditionalDependencies="advapi32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib user32.lib uuid.lib wininet.lib winspool.lib" | ||
69 | OutputFile="updater.exe" | ||
70 | LinkIncremental="2" | ||
71 | AdditionalLibraryDirectories="../lib_$(ConfigurationName)/i686-win32;../../libraries/i686-win32/lib_debug" | ||
72 | GenerateDebugInformation="true" | ||
73 | ProgramDatabaseFile="$(OutDir)/win_updater.pdb" | ||
74 | SubSystem="2" | ||
75 | TargetMachine="1" | ||
76 | /> | ||
77 | <Tool | ||
78 | Name="VCALinkTool" | ||
79 | /> | ||
80 | <Tool | ||
81 | Name="VCManifestTool" | ||
82 | /> | ||
83 | <Tool | ||
84 | Name="VCXDCMakeTool" | ||
85 | /> | ||
86 | <Tool | ||
87 | Name="VCBscMakeTool" | ||
88 | /> | ||
89 | <Tool | ||
90 | Name="VCFxCopTool" | ||
91 | /> | ||
92 | <Tool | ||
93 | Name="VCAppVerifierTool" | ||
94 | /> | ||
95 | <Tool | ||
96 | Name="VCWebDeploymentTool" | ||
97 | /> | ||
98 | <Tool | ||
99 | Name="VCPostBuildEventTool" | ||
100 | /> | ||
101 | </Configuration> | ||
102 | <Configuration | ||
103 | Name="Release|Win32" | ||
104 | OutputDirectory="Release" | ||
105 | IntermediateDirectory="Release" | ||
106 | ConfigurationType="1" | ||
107 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
108 | CharacterSet="1" | ||
109 | > | ||
110 | <Tool | ||
111 | Name="VCPreBuildEventTool" | ||
112 | /> | ||
113 | <Tool | ||
114 | Name="VCCustomBuildTool" | ||
115 | /> | ||
116 | <Tool | ||
117 | Name="VCXMLDataGeneratorTool" | ||
118 | /> | ||
119 | <Tool | ||
120 | Name="VCWebServiceProxyGeneratorTool" | ||
121 | /> | ||
122 | <Tool | ||
123 | Name="VCMIDLTool" | ||
124 | /> | ||
125 | <Tool | ||
126 | Name="VCCLCompilerTool" | ||
127 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llmessage;..\llwindow" | ||
128 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | ||
129 | RuntimeLibrary="0" | ||
130 | StructMemberAlignment="0" | ||
131 | TreatWChar_tAsBuiltInType="false" | ||
132 | ForceConformanceInForLoopScope="true" | ||
133 | UsePrecompiledHeader="0" | ||
134 | WarningLevel="3" | ||
135 | Detect64BitPortabilityProblems="false" | ||
136 | DebugInformationFormat="3" | ||
137 | /> | ||
138 | <Tool | ||
139 | Name="VCManagedResourceCompilerTool" | ||
140 | /> | ||
141 | <Tool | ||
142 | Name="VCResourceCompilerTool" | ||
143 | /> | ||
144 | <Tool | ||
145 | Name="VCPreLinkEventTool" | ||
146 | /> | ||
147 | <Tool | ||
148 | Name="VCLinkerTool" | ||
149 | AdditionalDependencies="advapi32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib user32.lib uuid.lib wininet.lib winspool.lib" | ||
150 | OutputFile="updater.exe" | ||
151 | LinkIncremental="1" | ||
152 | AdditionalLibraryDirectories="../lib_$(ConfigurationName)/i686-win32;../../libraries/i686-win32/lib_release" | ||
153 | GenerateDebugInformation="true" | ||
154 | SubSystem="2" | ||
155 | OptimizeReferences="2" | ||
156 | EnableCOMDATFolding="2" | ||
157 | TargetMachine="1" | ||
158 | /> | ||
159 | <Tool | ||
160 | Name="VCALinkTool" | ||
161 | /> | ||
162 | <Tool | ||
163 | Name="VCManifestTool" | ||
164 | /> | ||
165 | <Tool | ||
166 | Name="VCXDCMakeTool" | ||
167 | /> | ||
168 | <Tool | ||
169 | Name="VCBscMakeTool" | ||
170 | /> | ||
171 | <Tool | ||
172 | Name="VCFxCopTool" | ||
173 | /> | ||
174 | <Tool | ||
175 | Name="VCAppVerifierTool" | ||
176 | /> | ||
177 | <Tool | ||
178 | Name="VCWebDeploymentTool" | ||
179 | /> | ||
180 | <Tool | ||
181 | Name="VCPostBuildEventTool" | ||
182 | /> | ||
183 | </Configuration> | ||
184 | <Configuration | ||
185 | Name="ReleaseNoOpt|Win32" | ||
186 | OutputDirectory="$(ConfigurationName)" | ||
187 | IntermediateDirectory="$(ConfigurationName)" | ||
188 | ConfigurationType="1" | ||
189 | InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" | ||
190 | CharacterSet="1" | ||
191 | > | ||
192 | <Tool | ||
193 | Name="VCPreBuildEventTool" | ||
194 | /> | ||
195 | <Tool | ||
196 | Name="VCCustomBuildTool" | ||
197 | /> | ||
198 | <Tool | ||
199 | Name="VCXMLDataGeneratorTool" | ||
200 | /> | ||
201 | <Tool | ||
202 | Name="VCWebServiceProxyGeneratorTool" | ||
203 | /> | ||
204 | <Tool | ||
205 | Name="VCMIDLTool" | ||
206 | /> | ||
207 | <Tool | ||
208 | Name="VCCLCompilerTool" | ||
209 | AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llmessage;..\llwindow" | ||
210 | PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" | ||
211 | RuntimeLibrary="0" | ||
212 | StructMemberAlignment="0" | ||
213 | TreatWChar_tAsBuiltInType="false" | ||
214 | ForceConformanceInForLoopScope="true" | ||
215 | UsePrecompiledHeader="0" | ||
216 | WarningLevel="3" | ||
217 | Detect64BitPortabilityProblems="false" | ||
218 | DebugInformationFormat="3" | ||
219 | /> | ||
220 | <Tool | ||
221 | Name="VCManagedResourceCompilerTool" | ||
222 | /> | ||
223 | <Tool | ||
224 | Name="VCResourceCompilerTool" | ||
225 | /> | ||
226 | <Tool | ||
227 | Name="VCPreLinkEventTool" | ||
228 | /> | ||
229 | <Tool | ||
230 | Name="VCLinkerTool" | ||
231 | AdditionalDependencies="advapi32.lib comdlg32.lib gdi32.lib kernel32.lib odbc32.lib odbccp32.lib ole32.lib oleaut32.lib shell32.lib user32.lib uuid.lib wininet.lib winspool.lib" | ||
232 | OutputFile="updater.exe" | ||
233 | LinkIncremental="1" | ||
234 | AdditionalLibraryDirectories="../lib_$(ConfigurationName)/i686-win32;../../libraries/i686-win32/lib_release" | ||
235 | GenerateDebugInformation="true" | ||
236 | SubSystem="2" | ||
237 | OptimizeReferences="2" | ||
238 | EnableCOMDATFolding="2" | ||
239 | TargetMachine="1" | ||
240 | /> | ||
241 | <Tool | ||
242 | Name="VCALinkTool" | ||
243 | /> | ||
244 | <Tool | ||
245 | Name="VCManifestTool" | ||
246 | /> | ||
247 | <Tool | ||
248 | Name="VCXDCMakeTool" | ||
249 | /> | ||
250 | <Tool | ||
251 | Name="VCBscMakeTool" | ||
252 | /> | ||
253 | <Tool | ||
254 | Name="VCFxCopTool" | ||
255 | /> | ||
256 | <Tool | ||
257 | Name="VCAppVerifierTool" | ||
258 | /> | ||
259 | <Tool | ||
260 | Name="VCWebDeploymentTool" | ||
261 | /> | ||
262 | <Tool | ||
263 | Name="VCPostBuildEventTool" | ||
264 | /> | ||
265 | </Configuration> | ||
266 | </Configurations> | ||
267 | <References> | ||
268 | </References> | ||
269 | <Files> | ||
270 | <Filter | ||
271 | Name="Source Files" | ||
272 | Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" | ||
273 | UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" | ||
274 | > | ||
275 | <File | ||
276 | RelativePath=".\updater.cpp" | ||
277 | > | ||
278 | </File> | ||
279 | </Filter> | ||
280 | <Filter | ||
281 | Name="Header Files" | ||
282 | Filter="h;hpp;hxx;hm;inl;inc;xsd" | ||
283 | UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" | ||
284 | > | ||
285 | </Filter> | ||
286 | <Filter | ||
287 | Name="Resource Files" | ||
288 | Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" | ||
289 | UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" | ||
290 | > | ||
291 | </Filter> | ||
292 | </Files> | ||
293 | <Globals> | ||
294 | </Globals> | ||
295 | </VisualStudioProject> | ||