ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/NSISPlugins/Architecture/Architecture.cpp
Revision: 1167
Committed: 2009-05-15T23:46:59-07:00 (16 years, 1 month ago) by douglas
File size: 604 byte(s)
Log Message:
I think this should work...

File Contents

# User Rev Content
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     }

Properties

Name Value
svn:eol-style native
svn:keywords Id