1 |
douglas |
1155 |
// NSIS Architecture Plugin |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#include <Windows.h> |
8 |
douglas |
1167 |
#include <nsis/pluginapi.h> |
9 |
douglas |
1155 |
|
10 |
douglas |
1167 |
extern "C" void __declspec(dllexport) Get(HWND parent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra) |
11 |
douglas |
1155 |
{ |
12 |
|
|
EXDLL_INIT(); |
13 |
|
|
|
14 |
|
|
SYSTEM_INFO info; |
15 |
|
|
|
16 |
|
|
::GetNativeSystemInfo(&info); |
17 |
|
|
|
18 |
|
|
switch (info.wProcessorArchitecture) |
19 |
|
|
{ |
20 |
|
|
case PROCESSOR_ARCHITECTURE_AMD64: |
21 |
|
|
::pushstring("amd64"); |
22 |
|
|
break; |
23 |
|
|
case PROCESSOR_ARCHITECTURE_IA64: |
24 |
|
|
::pushstring("ia64"); |
25 |
|
|
break; |
26 |
|
|
case PROCESSOR_ARCHITECTURE_INTEL: |
27 |
|
|
::pushstring("x86"); |
28 |
|
|
break; |
29 |
|
|
default: |
30 |
|
|
::pushstring("unknown"); |
31 |
|
|
} |
32 |
|
|
} |