Révision 2961
tmp/org.txm.setups/nsis-2.5/Contrib/AccessControl/AccessControl.vcxproj (revision 2961) | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
3 |
<ItemGroup Label="ProjectConfigurations"> |
|
4 |
<ProjectConfiguration Include="Debug|Win32"> |
|
5 |
<Configuration>Debug</Configuration> |
|
6 |
<Platform>Win32</Platform> |
|
7 |
</ProjectConfiguration> |
|
8 |
<ProjectConfiguration Include="Release Unicode|Win32"> |
|
9 |
<Configuration>Release Unicode</Configuration> |
|
10 |
<Platform>Win32</Platform> |
|
11 |
</ProjectConfiguration> |
|
12 |
<ProjectConfiguration Include="Release|Win32"> |
|
13 |
<Configuration>Release</Configuration> |
|
14 |
<Platform>Win32</Platform> |
|
15 |
</ProjectConfiguration> |
|
16 |
</ItemGroup> |
|
17 |
<PropertyGroup Label="Globals"> |
|
18 |
<ProjectGuid>{FA391322-C61F-4CC4-A421-432A0C3D5342}</ProjectGuid> |
|
19 |
<RootNamespace>AccessControl</RootNamespace> |
|
20 |
</PropertyGroup> |
|
21 |
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
|
22 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration"> |
|
23 |
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
24 |
<CharacterSet>Unicode</CharacterSet> |
|
25 |
</PropertyGroup> |
|
26 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
|
27 |
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
28 |
<CharacterSet>MultiByte</CharacterSet> |
|
29 |
</PropertyGroup> |
|
30 |
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
|
31 |
<ConfigurationType>DynamicLibrary</ConfigurationType> |
|
32 |
<UseOfMfc>false</UseOfMfc> |
|
33 |
<CharacterSet>MultiByte</CharacterSet> |
|
34 |
</PropertyGroup> |
|
35 |
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
|
36 |
<ImportGroup Label="ExtensionSettings"> |
|
37 |
</ImportGroup> |
|
38 |
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets"> |
|
39 |
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
40 |
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
|
41 |
</ImportGroup> |
|
42 |
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> |
|
43 |
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
44 |
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
|
45 |
</ImportGroup> |
|
46 |
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> |
|
47 |
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
|
48 |
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> |
|
49 |
</ImportGroup> |
|
50 |
<PropertyGroup Label="UserMacros" /> |
|
51 |
<PropertyGroup> |
|
52 |
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> |
|
53 |
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\Plugins\</OutDir> |
|
54 |
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> |
|
55 |
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest> |
|
56 |
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> |
|
57 |
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest> |
|
58 |
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)..\..\Unicode\Plugins\</OutDir> |
|
59 |
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">false</LinkIncremental> |
|
60 |
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">false</GenerateManifest> |
|
61 |
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\Plugins\</OutDir> |
|
62 |
</PropertyGroup> |
|
63 |
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
|
64 |
<Midl> |
|
65 |
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
66 |
<MkTypLibCompatible>true</MkTypLibCompatible> |
|
67 |
<SuppressStartupBanner>true</SuppressStartupBanner> |
|
68 |
<TargetEnvironment>Win32</TargetEnvironment> |
|
69 |
<TypeLibraryName>.\Debug/AccessControl.tlb</TypeLibraryName> |
|
70 |
<HeaderFileName> |
|
71 |
</HeaderFileName> |
|
72 |
</Midl> |
|
73 |
<ClCompile> |
|
74 |
<Optimization>Disabled</Optimization> |
|
75 |
<PreprocessorDefinitions>_WIN32_WINNT=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
76 |
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> |
|
77 |
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
|
78 |
<PrecompiledHeader> |
|
79 |
</PrecompiledHeader> |
|
80 |
<PrecompiledHeaderOutputFile>.\Debug/AccessControl.pch</PrecompiledHeaderOutputFile> |
|
81 |
<WarningLevel>Level3</WarningLevel> |
|
82 |
<SuppressStartupBanner>true</SuppressStartupBanner> |
|
83 |
<DebugInformationFormat>EditAndContinue</DebugInformationFormat> |
|
84 |
</ClCompile> |
|
85 |
<ResourceCompile> |
|
86 |
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
87 |
<Culture>0x0409</Culture> |
|
88 |
</ResourceCompile> |
|
89 |
<Link> |
|
90 |
<SuppressStartupBanner>true</SuppressStartupBanner> |
|
91 |
<GenerateDebugInformation>true</GenerateDebugInformation> |
|
92 |
<TargetMachine>MachineX86</TargetMachine> |
|
93 |
<AdditionalDependencies>nsis_ansi/pluginapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|
94 |
<IgnoreSpecificDefaultLibraries>libc.lib</IgnoreSpecificDefaultLibraries> |
|
95 |
</Link> |
|
96 |
</ItemDefinitionGroup> |
|
97 |
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
|
98 |
<ClCompile> |
|
99 |
<Optimization>MinSpace</Optimization> |
|
100 |
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> |
|
101 |
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
|
102 |
<OmitFramePointers>false</OmitFramePointers> |
|
103 |
<PreprocessorDefinitions>_WIN32_WINNT=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
104 |
<StringPooling>true</StringPooling> |
|
105 |
<ExceptionHandling>Sync</ExceptionHandling> |
|
106 |
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
|
107 |
<BufferSecurityCheck>false</BufferSecurityCheck> |
|
108 |
<FunctionLevelLinking>true</FunctionLevelLinking> |
|
109 |
<DisableLanguageExtensions>false</DisableLanguageExtensions> |
|
110 |
<PrecompiledHeader> |
|
111 |
</PrecompiledHeader> |
|
112 |
<PrecompiledHeaderOutputFile>.\Release/AccessControl.pch</PrecompiledHeaderOutputFile> |
|
113 |
<WarningLevel>Level3</WarningLevel> |
|
114 |
<DebugInformationFormat> |
|
115 |
</DebugInformationFormat> |
|
116 |
</ClCompile> |
|
117 |
<Link> |
|
118 |
<AdditionalDependencies>advapi32.lib;nsis_ansi/pluginapi.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|
119 |
<SuppressStartupBanner>true</SuppressStartupBanner> |
|
120 |
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> |
|
121 |
<GenerateDebugInformation>false</GenerateDebugInformation> |
|
122 |
<SubSystem>Windows</SubSystem> |
|
123 |
<OptimizeReferences>true</OptimizeReferences> |
|
124 |
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|
125 |
<EntryPointSymbol>DllMain</EntryPointSymbol> |
|
126 |
<TargetMachine>MachineX86</TargetMachine> |
|
127 |
</Link> |
|
128 |
</ItemDefinitionGroup> |
|
129 |
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'"> |
|
130 |
<ClCompile> |
|
131 |
<Optimization>MinSpace</Optimization> |
|
132 |
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> |
|
133 |
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> |
|
134 |
<OmitFramePointers>false</OmitFramePointers> |
|
135 |
<PreprocessorDefinitions>_WIN32_WINNT=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
|
136 |
<StringPooling>true</StringPooling> |
|
137 |
<ExceptionHandling>Sync</ExceptionHandling> |
|
138 |
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
|
139 |
<BufferSecurityCheck>false</BufferSecurityCheck> |
|
140 |
<FunctionLevelLinking>true</FunctionLevelLinking> |
|
141 |
<DisableLanguageExtensions>false</DisableLanguageExtensions> |
|
142 |
<PrecompiledHeader> |
|
143 |
</PrecompiledHeader> |
|
144 |
<PrecompiledHeaderOutputFile>.\Release/AccessControl.pch</PrecompiledHeaderOutputFile> |
|
145 |
<WarningLevel>Level3</WarningLevel> |
|
146 |
<DebugInformationFormat> |
|
147 |
</DebugInformationFormat> |
|
148 |
</ClCompile> |
|
149 |
<Link> |
|
150 |
<AdditionalDependencies>advapi32.lib;nsis_unicode/pluginapi.lib;%(AdditionalDependencies)</AdditionalDependencies> |
|
151 |
<SuppressStartupBanner>true</SuppressStartupBanner> |
|
152 |
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> |
|
153 |
<GenerateDebugInformation>false</GenerateDebugInformation> |
|
154 |
<SubSystem>Windows</SubSystem> |
|
155 |
<OptimizeReferences>true</OptimizeReferences> |
|
156 |
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
|
157 |
<EntryPointSymbol>DllMain</EntryPointSymbol> |
|
158 |
<TargetMachine>MachineX86</TargetMachine> |
|
159 |
</Link> |
|
160 |
</ItemDefinitionGroup> |
|
161 |
<ItemGroup> |
|
162 |
<ClCompile Include="AccessControl.cpp" /> |
|
163 |
</ItemGroup> |
|
164 |
<ItemGroup> |
|
165 |
<ClInclude Include="..\ExDLL\exdll.h" /> |
|
166 |
<ClInclude Include="resource.h" /> |
|
167 |
</ItemGroup> |
|
168 |
<ItemGroup> |
|
169 |
<ResourceCompile Include="AccessControl.rc" /> |
|
170 |
</ItemGroup> |
|
171 |
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
|
172 |
<ImportGroup Label="ExtensionTargets"> |
|
173 |
</ImportGroup> |
|
174 |
</Project> |
tmp/org.txm.setups/nsis-2.5/Contrib/AccessControl/AccessControl.sln (revision 2961) | ||
---|---|---|
1 |
Microsoft Visual Studio Solution File, Format Version 11.00 |
|
2 |
# Visual Studio 2010 |
|
3 |
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AccessControl", "AccessControl.vcxproj", "{FA391322-C61F-4CC4-A421-432A0C3D5342}" |
|
4 |
EndProject |
|
5 |
Global |
|
6 |
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|
7 |
Debug|Win32 = Debug|Win32 |
|
8 |
Release Unicode|Win32 = Release Unicode|Win32 |
|
9 |
Release|Win32 = Release|Win32 |
|
10 |
EndGlobalSection |
|
11 |
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|
12 |
{FA391322-C61F-4CC4-A421-432A0C3D5342}.Debug|Win32.ActiveCfg = Debug|Win32 |
|
13 |
{FA391322-C61F-4CC4-A421-432A0C3D5342}.Debug|Win32.Build.0 = Debug|Win32 |
|
14 |
{FA391322-C61F-4CC4-A421-432A0C3D5342}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 |
|
15 |
{FA391322-C61F-4CC4-A421-432A0C3D5342}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 |
|
16 |
{FA391322-C61F-4CC4-A421-432A0C3D5342}.Release|Win32.ActiveCfg = Release|Win32 |
|
17 |
{FA391322-C61F-4CC4-A421-432A0C3D5342}.Release|Win32.Build.0 = Release|Win32 |
|
18 |
EndGlobalSection |
|
19 |
GlobalSection(SolutionProperties) = preSolution |
|
20 |
HideSolutionNode = FALSE |
|
21 |
EndGlobalSection |
|
22 |
EndGlobal |
tmp/org.txm.setups/nsis-2.5/Contrib/AccessControl/resource.h (revision 2961) | ||
---|---|---|
1 |
//{{NO_DEPENDENCIES}} |
|
2 |
// Microsoft Visual C++ generated include file. |
|
3 |
// Used by AccessControl.rc |
|
4 |
|
|
5 |
// Next default values for new objects |
|
6 |
// |
|
7 |
#ifdef APSTUDIO_INVOKED |
|
8 |
#ifndef APSTUDIO_READONLY_SYMBOLS |
|
9 |
#define _APS_NEXT_RESOURCE_VALUE 101 |
|
10 |
#define _APS_NEXT_COMMAND_VALUE 40001 |
|
11 |
#define _APS_NEXT_CONTROL_VALUE 1001 |
|
12 |
#define _APS_NEXT_SYMED_VALUE 101 |
|
13 |
#endif |
|
14 |
#endif |
tmp/org.txm.setups/nsis-2.5/Contrib/AccessControl/nsis_unicode/pluginapi.h (revision 2961) | ||
---|---|---|
1 |
#ifndef ___NSIS_PLUGIN__H___ |
|
2 |
#define ___NSIS_PLUGIN__H___ |
|
3 |
|
|
4 |
#ifdef __cplusplus |
|
5 |
extern "C" { |
|
6 |
#endif |
|
7 |
|
|
8 |
#include "api.h" |
|
9 |
#include "nsis_tchar.h" |
|
10 |
|
|
11 |
#ifndef NSISCALL |
|
12 |
# define NSISCALL __stdcall |
|
13 |
#endif |
|
14 |
|
|
15 |
#define EXDLL_INIT() { \ |
|
16 |
g_stringsize=string_size; \ |
|
17 |
g_stacktop=stacktop; \ |
|
18 |
g_variables=variables; } |
|
19 |
|
|
20 |
typedef struct _stack_t { |
|
21 |
struct _stack_t *next; |
|
22 |
TCHAR text[1]; // this should be the length of string_size |
|
23 |
} stack_t; |
|
24 |
|
|
25 |
enum |
|
26 |
{ |
|
27 |
INST_0, // $0 |
|
28 |
INST_1, // $1 |
|
29 |
INST_2, // $2 |
|
30 |
INST_3, // $3 |
|
31 |
INST_4, // $4 |
|
32 |
INST_5, // $5 |
|
33 |
INST_6, // $6 |
|
34 |
INST_7, // $7 |
|
35 |
INST_8, // $8 |
|
36 |
INST_9, // $9 |
|
37 |
INST_R0, // $R0 |
|
38 |
INST_R1, // $R1 |
|
39 |
INST_R2, // $R2 |
|
40 |
INST_R3, // $R3 |
|
41 |
INST_R4, // $R4 |
|
42 |
INST_R5, // $R5 |
|
43 |
INST_R6, // $R6 |
|
44 |
INST_R7, // $R7 |
|
45 |
INST_R8, // $R8 |
|
46 |
INST_R9, // $R9 |
|
47 |
INST_CMDLINE, // $CMDLINE |
|
48 |
INST_INSTDIR, // $INSTDIR |
|
49 |
INST_OUTDIR, // $OUTDIR |
|
50 |
INST_EXEDIR, // $EXEDIR |
|
51 |
INST_LANG, // $LANGUAGE |
|
52 |
__INST_LAST |
|
53 |
}; |
|
54 |
|
|
55 |
extern unsigned int g_stringsize; |
|
56 |
extern stack_t **g_stacktop; |
|
57 |
extern TCHAR *g_variables; |
|
58 |
|
|
59 |
int NSISCALL popstring(TCHAR *str); // 0 on success, 1 on empty stack |
|
60 |
int NSISCALL popstringn(TCHAR *str, int maxlen); // with length limit, pass 0 for g_stringsize |
|
61 |
int NSISCALL popint(); // pops an integer |
|
62 |
int NSISCALL popint_or(); // with support for or'ing (2|4|8) |
|
63 |
int NSISCALL myatoi(const TCHAR *s); // converts a string to an integer |
|
64 |
unsigned NSISCALL myatou(const TCHAR *s); // converts a string to an unsigned integer, decimal only |
|
65 |
int NSISCALL myatoi_or(const TCHAR *s); // with support for or'ing (2|4|8) |
|
66 |
void NSISCALL pushstring(const TCHAR *str); |
|
67 |
void NSISCALL pushint(int value); |
|
68 |
TCHAR * NSISCALL getuservariable(const int varnum); |
|
69 |
void NSISCALL setuservariable(const int varnum, const TCHAR *var); |
|
70 |
|
|
71 |
#ifdef _UNICODE |
|
72 |
#define PopStringW(x) popstring(x) |
|
73 |
#define PushStringW(x) pushstring(x) |
|
74 |
#define SetUserVariableW(x,y) setuservariable(x,y) |
|
75 |
|
|
76 |
int NSISCALL PopStringA(char* ansiStr); |
|
77 |
void NSISCALL PushStringA(const char* ansiStr); |
|
78 |
void NSISCALL GetUserVariableW(const int varnum, wchar_t* wideStr); |
|
79 |
void NSISCALL GetUserVariableA(const int varnum, char* ansiStr); |
|
80 |
void NSISCALL SetUserVariableA(const int varnum, const char* ansiStr); |
|
81 |
|
|
82 |
#else |
|
83 |
// ANSI defs |
|
84 |
|
|
85 |
#define PopStringA(x) popstring(x) |
|
86 |
#define PushStringA(x) pushstring(x) |
|
87 |
#define SetUserVariableA(x,y) setuservariable(x,y) |
|
88 |
|
|
89 |
int NSISCALL PopStringW(wchar_t* wideStr); |
|
90 |
void NSISCALL PushStringW(wchar_t* wideStr); |
|
91 |
void NSISCALL GetUserVariableW(const int varnum, wchar_t* wideStr); |
|
92 |
void NSISCALL GetUserVariableA(const int varnum, char* ansiStr); |
|
93 |
void NSISCALL SetUserVariableW(const int varnum, const wchar_t* wideStr); |
|
94 |
|
|
95 |
#endif |
|
96 |
|
|
97 |
#ifdef __cplusplus |
|
98 |
} |
|
99 |
#endif |
|
100 |
|
|
101 |
#endif//!___NSIS_PLUGIN__H___ |
tmp/org.txm.setups/nsis-2.5/Contrib/AccessControl/nsis_unicode/api.h (revision 2961) | ||
---|---|---|
1 |
/* |
|
2 |
* apih |
|
3 |
* |
|
4 |
* This file is a part of NSIS. |
|
5 |
* |
|
6 |
* Copyright (C) 1999-2009 Nullsoft and Contributors |
|
7 |
* |
|
8 |
* Licensed under the zlib/libpng license (the "License"); |
|
9 |
* you may not use this file except in compliance with the License. |
|
10 |
* |
|
11 |
* Licence details can be found in the file COPYING. |
|
12 |
* |
|
13 |
* This software is provided 'as-is', without any express or implied |
|
14 |
* warranty. |
|
15 |
*/ |
|
16 |
|
|
17 |
#ifndef _NSIS_EXEHEAD_API_H_ |
|
18 |
#define _NSIS_EXEHEAD_API_H_ |
|
19 |
|
|
20 |
// Starting with NSIS 2.42, you can check the version of the plugin API in exec_flags->plugin_api_version |
|
21 |
// The format is 0xXXXXYYYY where X is the major version and Y is the minor version (MAKELONG(y,x)) |
|
22 |
// When doing version checks, always remember to use >=, ex: if (pX->exec_flags->plugin_api_version >= NSISPIAPIVER_1_0) {} |
|
23 |
|
|
24 |
#define NSISPIAPIVER_1_0 0x00010000 |
|
25 |
#define NSISPIAPIVER_CURR NSISPIAPIVER_1_0 |
|
26 |
|
|
27 |
// NSIS Plug-In Callback Messages |
|
28 |
enum NSPIM |
|
29 |
{ |
|
30 |
NSPIM_UNLOAD, // This is the last message a plugin gets, do final cleanup |
|
31 |
NSPIM_GUIUNLOAD, // Called after .onGUIEnd |
|
32 |
}; |
|
33 |
|
|
34 |
// Prototype for callbacks registered with extra_parameters->RegisterPluginCallback() |
|
35 |
// Return NULL for unknown messages |
|
36 |
// Should always be __cdecl for future expansion possibilities |
|
37 |
typedef UINT_PTR (*NSISPLUGINCALLBACK)(enum NSPIM); |
|
38 |
|
|
39 |
// extra_parameters data structures containing other interesting stuff |
|
40 |
// but the stack, variables and HWND passed on to plug-ins. |
|
41 |
typedef struct |
|
42 |
{ |
|
43 |
int autoclose; |
|
44 |
int all_user_var; |
|
45 |
int exec_error; |
|
46 |
int abort; |
|
47 |
int exec_reboot; // NSIS_SUPPORT_REBOOT |
|
48 |
int reboot_called; // NSIS_SUPPORT_REBOOT |
|
49 |
int XXX_cur_insttype; // depreacted |
|
50 |
int plugin_api_version; // see NSISPIAPIVER_CURR |
|
51 |
// used to be XXX_insttype_changed |
|
52 |
int silent; // NSIS_CONFIG_SILENT_SUPPORT |
|
53 |
int instdir_error; |
|
54 |
int rtl; |
|
55 |
int errlvl; |
|
56 |
int alter_reg_view; |
|
57 |
int status_update; |
|
58 |
} exec_flags_t; |
|
59 |
|
|
60 |
#ifndef NSISCALL |
|
61 |
# define NSISCALL __stdcall |
|
62 |
#endif |
|
63 |
|
|
64 |
typedef struct { |
|
65 |
exec_flags_t *exec_flags; |
|
66 |
int (NSISCALL *ExecuteCodeSegment)(int, HWND); |
|
67 |
void (NSISCALL *validate_filename)(TCHAR *); |
|
68 |
int (NSISCALL *RegisterPluginCallback)(HMODULE, NSISPLUGINCALLBACK); // returns 0 on success, 1 if already registered and < 0 on errors |
|
69 |
} extra_parameters; |
|
70 |
|
|
71 |
// Definitions for page showing plug-ins |
|
72 |
// See Ui.c to understand better how they're used |
|
73 |
|
|
74 |
// sent to the outer window to tell it to go to the next inner window |
|
75 |
#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8) |
|
76 |
|
|
77 |
// custom pages should send this message to let NSIS know they're ready |
|
78 |
#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd) |
|
79 |
|
|
80 |
// sent as wParam with WM_NOTIFY_OUTER_NEXT when user cancels - heed its warning |
|
81 |
#define NOTIFY_BYE_BYE 'x' |
|
82 |
|
|
83 |
#endif /* _PLUGIN_H_ */ |
tmp/org.txm.setups/nsis-2.5/Contrib/AccessControl/nsis_unicode/nsis_tchar.h (revision 2961) | ||
---|---|---|
1 |
/* |
|
2 |
* nsis_tchar.h |
|
3 |
* |
|
4 |
* This file is a part of NSIS. |
|
5 |
* |
|
6 |
* Copyright (C) 1999-2007 Nullsoft and Contributors |
|
7 |
* |
|
8 |
* This software is provided 'as-is', without any express or implied |
|
9 |
* warranty. |
|
10 |
* |
|
11 |
* For Unicode support by Jim Park -- 08/30/2007 |
|
12 |
*/ |
|
13 |
|
|
14 |
// Jim Park: Only those we use are listed here. |
|
15 |
|
|
16 |
#pragma once |
|
17 |
|
|
18 |
#ifdef _UNICODE |
|
19 |
|
|
20 |
#ifndef _T |
|
21 |
#define __T(x) L ## x |
|
22 |
#define _T(x) __T(x) |
|
23 |
#define _TEXT(x) __T(x) |
|
24 |
#endif |
|
25 |
typedef wchar_t TCHAR; |
|
26 |
typedef wchar_t _TUCHAR; |
|
27 |
|
|
28 |
// program |
|
29 |
#define _tmain wmain |
|
30 |
#define _tWinMain wWinMain |
|
31 |
#define _tenviron _wenviron |
|
32 |
#define __targv __wargv |
|
33 |
|
|
34 |
// printfs |
|
35 |
#define _ftprintf fwprintf |
|
36 |
#define _sntprintf _snwprintf |
|
37 |
#define _stprintf _swprintf |
|
38 |
#define _tprintf wprintf |
|
39 |
#define _vftprintf vfwprintf |
|
40 |
#define _vsntprintf _vsnwprintf |
|
41 |
#define _vstprintf _vswprintf |
|
42 |
|
|
43 |
// scanfs |
|
44 |
#define _tscanf wscanf |
|
45 |
#define _stscanf swscanf |
|
46 |
|
|
47 |
// string manipulations |
|
48 |
#define _tcscat wcscat |
|
49 |
#define _tcschr wcschr |
|
50 |
#define _tcsclen wcslen |
|
51 |
#define _tcscpy wcscpy |
|
52 |
#define _tcsdup _wcsdup |
|
53 |
#define _tcslen wcslen |
|
54 |
#define _tcsnccpy wcsncpy |
|
55 |
#define _tcsncpy wcsncpy |
|
56 |
#define _tcsrchr wcsrchr |
|
57 |
#define _tcsstr wcsstr |
|
58 |
#define _tcstok wcstok |
|
59 |
|
|
60 |
// string comparisons |
|
61 |
#define _tcscmp wcscmp |
|
62 |
#define _tcsicmp _wcsicmp |
|
63 |
#define _tcsncicmp _wcsnicmp |
|
64 |
#define _tcsncmp wcsncmp |
|
65 |
#define _tcsnicmp _wcsnicmp |
|
66 |
|
|
67 |
// upper / lower |
|
68 |
#define _tcslwr _wcslwr |
|
69 |
#define _tcsupr _wcsupr |
|
70 |
#define _totlower towlower |
|
71 |
#define _totupper towupper |
|
72 |
|
|
73 |
// conversions to numbers |
|
74 |
#define _tcstoi64 _wcstoi64 |
|
75 |
#define _tcstol wcstol |
|
76 |
#define _tcstoul wcstoul |
|
77 |
#define _tstof _wtof |
|
78 |
#define _tstoi _wtoi |
|
79 |
#define _tstoi64 _wtoi64 |
|
80 |
#define _ttoi _wtoi |
|
81 |
#define _ttoi64 _wtoi64 |
|
82 |
#define _ttol _wtol |
|
83 |
|
|
84 |
// conversion from numbers to strings |
|
85 |
#define _itot _itow |
|
86 |
#define _ltot _ltow |
|
87 |
#define _i64tot _i64tow |
|
88 |
#define _ui64tot _ui64tow |
|
89 |
|
|
90 |
// file manipulations |
|
91 |
#define _tfopen _wfopen |
|
92 |
#define _topen _wopen |
|
93 |
#define _tremove _wremove |
|
94 |
#define _tunlink _wunlink |
|
95 |
|
|
96 |
// reading and writing to i/o |
|
97 |
#define _fgettc fgetwc |
|
98 |
#define _fgetts fgetws |
|
99 |
#define _fputts fputws |
|
100 |
#define _gettchar getwchar |
|
101 |
|
|
102 |
// directory |
|
103 |
#define _tchdir _wchdir |
|
104 |
|
|
105 |
// environment |
|
106 |
#define _tgetenv _wgetenv |
|
107 |
#define _tsystem _wsystem |
|
108 |
|
|
109 |
// time |
|
110 |
#define _tcsftime wcsftime |
|
111 |
|
|
112 |
#else // ANSI |
|
113 |
|
|
114 |
#ifndef _T |
|
115 |
#define _T(x) x |
|
116 |
#define _TEXT(x) x |
|
117 |
#endif |
|
118 |
typedef char TCHAR; |
|
119 |
typedef unsigned char _TUCHAR; |
|
120 |
|
|
121 |
// program |
|
122 |
#define _tmain main |
|
123 |
#define _tWinMain WinMain |
|
124 |
#define _tenviron environ |
|
125 |
#define __targv __argv |
|
126 |
|
|
127 |
// printfs |
|
128 |
#define _ftprintf fprintf |
|
129 |
#define _sntprintf _snprintf |
|
130 |
#define _stprintf sprintf |
|
131 |
#define _tprintf printf |
|
132 |
#define _vftprintf vfprintf |
|
133 |
#define _vsntprintf _vsnprintf |
|
134 |
#define _vstprintf vsprintf |
|
135 |
|
|
136 |
// scanfs |
|
137 |
#define _tscanf scanf |
|
138 |
#define _stscanf sscanf |
|
139 |
|
|
140 |
// string manipulations |
|
141 |
#define _tcscat strcat |
|
142 |
#define _tcschr strchr |
|
143 |
#define _tcsclen strlen |
|
144 |
#define _tcscnlen strnlen |
|
145 |
#define _tcscpy strcpy |
|
146 |
#define _tcsdup _strdup |
|
147 |
#define _tcslen strlen |
|
148 |
#define _tcsnccpy strncpy |
|
149 |
#define _tcsrchr strrchr |
|
150 |
#define _tcsstr strstr |
|
151 |
#define _tcstok strtok |
|
152 |
|
|
153 |
// string comparisons |
|
154 |
#define _tcscmp strcmp |
|
155 |
#define _tcsicmp _stricmp |
|
156 |
#define _tcsncmp strncmp |
|
157 |
#define _tcsncicmp _strnicmp |
|
158 |
#define _tcsnicmp _strnicmp |
|
159 |
|
|
160 |
// upper / lower |
|
161 |
#define _tcslwr _strlwr |
|
162 |
#define _tcsupr _strupr |
|
163 |
|
|
164 |
#define _totupper toupper |
|
165 |
#define _totlower tolower |
|
166 |
|
|
167 |
// conversions to numbers |
|
168 |
#define _tcstol strtol |
|
169 |
#define _tcstoul strtoul |
|
170 |
#define _tstof atof |
|
171 |
#define _tstoi atoi |
|
172 |
#define _tstoi64 _atoi64 |
|
173 |
#define _tstoi64 _atoi64 |
|
174 |
#define _ttoi atoi |
|
175 |
#define _ttoi64 _atoi64 |
|
176 |
#define _ttol atol |
|
177 |
|
|
178 |
// conversion from numbers to strings |
|
179 |
#define _i64tot _i64toa |
|
180 |
#define _itot _itoa |
|
181 |
#define _ltot _ltoa |
|
182 |
#define _ui64tot _ui64toa |
|
183 |
|
|
184 |
// file manipulations |
|
185 |
#define _tfopen fopen |
|
186 |
#define _topen _open |
|
187 |
#define _tremove remove |
|
188 |
#define _tunlink _unlink |
|
189 |
|
|
190 |
// reading and writing to i/o |
|
191 |
#define _fgettc fgetc |
|
192 |
#define _fgetts fgets |
|
193 |
#define _fputts fputs |
|
194 |
#define _gettchar getchar |
|
195 |
|
|
196 |
// directory |
|
197 |
#define _tchdir _chdir |
|
198 |
|
|
199 |
// environment |
|
200 |
#define _tgetenv getenv |
|
201 |
#define _tsystem system |
|
202 |
|
|
203 |
// time |
|
204 |
#define _tcsftime strftime |
|
205 |
|
|
206 |
#endif |
|
207 |
|
|
208 |
// is functions (the same in Unicode / ANSI) |
|
209 |
#define _istgraph isgraph |
|
210 |
#define _istascii __isascii |
|
211 |
|
|
212 |
#define __TFILE__ _T(__FILE__) |
|
213 |
#define __TDATE__ _T(__DATE__) |
|
214 |
#define __TTIME__ _T(__TIME__) |
tmp/org.txm.setups/nsis-2.5/Contrib/AccessControl/AccessControl.cpp (revision 2961) | ||
---|---|---|
1 |
|
|
2 |
/* AccessControl plugin for NSIS |
|
3 |
* Copyright (C) 2003 Mathias Hasselmann <mathias@taschenorakel.de> |
|
4 |
* |
|
5 |
* This software is provided 'as-is', without any express or implied |
|
6 |
* warranty. In no event will the authors be held liable for any damages |
|
7 |
* arising from the use of this software. |
|
8 |
* |
|
9 |
* Permission is granted to anyone to use this software for any purpose, |
|
10 |
* including commercial applications, and to alter it and redistribute it |
|
11 |
* freely, subject to the following restrictions: |
|
12 |
* |
|
13 |
* 1. The origin of this software must not be misrepresented; you must not |
|
14 |
* claim that you wrote the original software. If you use this software |
|
15 |
* in a product, an acknowledgment in the product documentation would be |
|
16 |
* appreciated but is not required. |
|
17 |
* |
|
18 |
* 2. Altered source versions must be plainly marked as such, and must not |
|
19 |
* be misrepresented as being the original software. |
|
20 |
* |
|
21 |
* 3. This notice may not be removed or altered from any source |
|
22 |
* distribution. |
|
23 |
*/ |
|
24 |
|
|
25 |
/* Modifications by Afrow UK, kichik and AndersK. |
|
26 |
* See Docs\AccessControl\Readme.txt for full modifications list. |
|
27 |
*/ |
|
28 |
|
|
29 |
#define WIN32_LEAN_AND_MEAN |
|
30 |
#ifdef _WIN64 |
|
31 |
#define WINVER 0x502 |
|
32 |
#else |
|
33 |
#define WINVER 0x400 |
|
34 |
#endif |
|
35 |
|
|
36 |
#include <windows.h> |
|
37 |
#ifdef UNICODE |
|
38 |
#include "nsis_unicode/pluginapi.h" |
|
39 |
#else |
|
40 |
#include "nsis_ansi/pluginapi.h" |
|
41 |
#endif |
|
42 |
#include <aclapi.h> |
|
43 |
#include <sddl.h> |
|
44 |
|
|
45 |
/***************************************************************************** |
|
46 |
GLOBAL VARIABLES |
|
47 |
*****************************************************************************/ |
|
48 |
|
|
49 |
HINSTANCE g_hInstance = NULL; |
|
50 |
int g_string_size = 1024; |
|
51 |
extra_parameters* g_extra = NULL; |
|
52 |
|
|
53 |
/***************************************************************************** |
|
54 |
TYPE DEFINITIONS |
|
55 |
*****************************************************************************/ |
|
56 |
|
|
57 |
typedef struct |
|
58 |
{ |
|
59 |
const TCHAR* name; |
|
60 |
SE_OBJECT_TYPE type; |
|
61 |
DWORD defaultInheritance; |
|
62 |
const TCHAR** const permissionNames; |
|
63 |
const DWORD* const permissionFlags; |
|
64 |
const int permissionCount; |
|
65 |
} |
|
66 |
SchemeType; |
|
67 |
|
|
68 |
typedef struct |
|
69 |
{ |
|
70 |
BOOL noInherit; |
|
71 |
HKEY hRootKey; |
|
72 |
} |
|
73 |
Options; |
|
74 |
|
|
75 |
typedef enum |
|
76 |
{ |
|
77 |
ChangeMode_Owner, |
|
78 |
ChangeMode_Group |
|
79 |
} |
|
80 |
ChangeMode; |
|
81 |
|
|
82 |
/***************************************************************************** |
|
83 |
UTILITIES |
|
84 |
*****************************************************************************/ |
|
85 |
|
|
86 |
#define SIZE_OF_ARRAY(Array) (sizeof((Array)) / sizeof(*(Array))) |
|
87 |
#define ARRAY_CONTAINS(Array, Index) (Index >= 0 && Index < SIZE_OF_ARRAY(Array)) |
|
88 |
|
|
89 |
void* LocalAllocZero(size_t cb) { return LocalAlloc(LPTR, cb); } |
|
90 |
inline void* LocalAlloc(size_t cb) { return LocalAllocZero(cb); } |
|
91 |
|
|
92 |
/***************************************************************************** |
|
93 |
PLUG-IN HANDLING |
|
94 |
*****************************************************************************/ |
|
95 |
|
|
96 |
#define PUBLIC_FUNCTION(Name) \ |
|
97 |
extern "C" void __declspec(dllexport) __cdecl Name(HWND hWndParent, int string_size, TCHAR* variables, stack_t** stacktop, extra_parameters* extra) \ |
|
98 |
{ \ |
|
99 |
EXDLL_INIT(); \ |
|
100 |
g_string_size = string_size; \ |
|
101 |
g_extra = extra; |
|
102 |
|
|
103 |
#define PUBLIC_FUNCTION_END \ |
|
104 |
} |
|
105 |
|
|
106 |
void showerror_s(const TCHAR* fmt, TCHAR* arg) |
|
107 |
{ |
|
108 |
TCHAR* msg = (TCHAR*)LocalAlloc(g_string_size*sizeof(TCHAR)); |
|
109 |
if (msg) |
|
110 |
{ |
|
111 |
wsprintf(msg, fmt, arg); |
|
112 |
pushstring(msg); |
|
113 |
LocalFree(msg); |
|
114 |
} |
|
115 |
} |
|
116 |
|
|
117 |
void showerror_d(const TCHAR* fmt, DWORD arg) |
|
118 |
{ |
|
119 |
TCHAR* msg = (TCHAR*)LocalAlloc(g_string_size*sizeof(TCHAR)); |
|
120 |
if (msg) |
|
121 |
{ |
|
122 |
wsprintf(msg, fmt, arg); |
|
123 |
pushstring(msg); |
|
124 |
LocalFree(msg); |
|
125 |
} |
|
126 |
} |
|
127 |
|
|
128 |
#define ERRSTR_OOM TEXT("OutOfMemory") |
|
129 |
|
|
130 |
#define ABORT_s(x, y) \ |
|
131 |
{ showerror_s(TEXT(x), y); goto cleanup; } |
|
132 |
#define ABORT_d(x, y) \ |
|
133 |
{ showerror_d(TEXT(x), y); goto cleanup; } |
|
134 |
#define ABORT(x) \ |
|
135 |
{ pushstring(TEXT(x)); goto cleanup; } |
|
136 |
|
|
137 |
/***************************************************************************** |
|
138 |
COMPATIBILITY UTILITIES |
|
139 |
*****************************************************************************/ |
|
140 |
|
|
141 |
#define BuildExplicitAccessWithNameA BuildExplicitAccessWithNameT |
|
142 |
#define BuildExplicitAccessWithNameW BuildExplicitAccessWithNameT |
|
143 |
#if WINVER < 0x500 |
|
144 |
#define ConvertStringSidToSidA Compat_ConvertStringSidToSidT |
|
145 |
#define ConvertStringSidToSidW Compat_ConvertStringSidToSidT |
|
146 |
|
|
147 |
static FARPROC AdvApi32_GetProcAddress(LPCSTR Name) |
|
148 |
{ |
|
149 |
return GetProcAddress(LoadLibraryA("ADVAPI32"), Name); |
|
150 |
} |
|
151 |
|
|
152 |
TCHAR* CharPos(TCHAR* szStr, int cchStrLen, TCHAR chFind) |
|
153 |
{ |
|
154 |
for (int i = 0; i < cchStrLen && NULL != *(szStr + i); i++) |
|
155 |
if (*(szStr + i) == chFind) |
|
156 |
return szStr + i; |
|
157 |
return NULL; |
Formats disponibles : Unified diff