forked from maxkadushkin/winsparkle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WinSparkle.bkl
160 lines (133 loc) · 5.25 KB
/
WinSparkle.bkl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
toolsets = vs2008 vs2010 vs2012 vs2013 vs2015;
if ( $toolset == vs2008 )
SUFFIX = "";
if ( $toolset == vs2010 )
SUFFIX = "-2010";
if ( $toolset == vs2012 )
SUFFIX = "-2012";
if ( $toolset == vs2013 )
SUFFIX = "-2013";
if ( $toolset == vs2015 )
SUFFIX = "-2015";
vs2008.solutionfile = WinSparkle$(SUFFIX).sln;
vs2010.solutionfile = WinSparkle$(SUFFIX).sln;
vs2012.solutionfile = WinSparkle$(SUFFIX).sln;
vs2013.solutionfile = WinSparkle$(SUFFIX).sln;
vs2015.solutionfile = WinSparkle$(SUFFIX).sln;
// Common settings:
win32-crt-linkage = static;
archs = x86 x86_64;
defines += _CRT_SECURE_NO_WARNINGS;
// Build binaries compatible with Windows XP (SP3) -- it's still useful for
// installer stuff like WinSparkle.dll
vs2012.option.Configuration.PlatformToolset = v110_xp;
vs2013.option.Configuration.PlatformToolset = v120_xp;
vs2015.option.Configuration.PlatformToolset = v140_xp;
// VS2015 generates thread-safe statics by default, but it's incompatible with
// Windows XP when used in DLLs
if ( $toolset == vs2015 ) {
compiler-options += "/Zc:threadSafeInit-";
}
// For maximum compatibility, don't use SSE2, (very) old 32bit CPUs don't have it:
if ( $(arch) == x86 ) {
vs2012.option.ClCompile.EnableEnhancedInstructionSet = NoExtensions;
vs2013.option.ClCompile.EnableEnhancedInstructionSet = NoExtensions;
}
if ( $(config) == Release ) {
vs2008.option.VCCLCompilerTool.Optimization = 1;
vs2008.option.VCCLCompilerTool.FavorSizeOrSpeed = 2;
vs2008.option.VCCLCompilerTool.WholeProgramOptimization = true;
vs2008.option.VCCLCompilerTool.StringPooling = true;
vs2008.option.VCLinkerTool.LinkTimeCodeGeneration = 1;
vs2010.option.Configuration.WholeProgramOptimization = true;
vs2010.option.ClCompile.Optimization = MinSpace;
vs2010.option.ClCompile.FavorSizeOrSpeed = Size;
vs2010.option.ClCompile.WholeProgramOptimization = true;
vs2010.option.ClCompile.StringPooling = true;
vs2010.option.ClCompile.FunctionLevelLinking = true;
vs2010.option.Link.OptimizeReferences = true;
vs2010.option.Link.EnableCOMDATFolding = true;
vs2010.option.Link.LinkTimeCodeGeneration = UseLinkTimeCodeGeneration;
vs2012.option.Configuration.WholeProgramOptimization = true;
vs2012.option.ClCompile.Optimization = MinSpace;
vs2012.option.ClCompile.FavorSizeOrSpeed = Size;
vs2012.option.ClCompile.WholeProgramOptimization = true;
vs2012.option.ClCompile.StringPooling = true;
vs2012.option.ClCompile.FunctionLevelLinking = true;
vs2012.option.Link.OptimizeReferences = true;
vs2012.option.Link.EnableCOMDATFolding = true;
vs2012.option.Link.LinkTimeCodeGeneration = UseLinkTimeCodeGeneration;
vs2013.option.Configuration.WholeProgramOptimization = true;
vs2013.option.ClCompile.Optimization = MinSpace;
vs2013.option.ClCompile.FavorSizeOrSpeed = Size;
vs2013.option.ClCompile.WholeProgramOptimization = true;
vs2013.option.ClCompile.StringPooling = true;
vs2013.option.ClCompile.FunctionLevelLinking = true;
vs2013.option.Link.OptimizeReferences = true;
vs2013.option.Link.EnableCOMDATFolding = true;
vs2013.option.Link.LinkTimeCodeGeneration = UseLinkTimeCodeGeneration;
vs2015.option.Configuration.WholeProgramOptimization = true;
vs2015.option.ClCompile.Optimization = MinSpace;
vs2015.option.ClCompile.FavorSizeOrSpeed = Size;
vs2015.option.ClCompile.WholeProgramOptimization = true;
vs2015.option.ClCompile.StringPooling = true;
vs2015.option.ClCompile.FunctionLevelLinking = true;
vs2015.option.Link.OptimizeReferences = true;
vs2015.option.Link.EnableCOMDATFolding = true;
vs2015.option.Link.LinkTimeCodeGeneration = UseLinkTimeCodeGeneration;
}
// 3rd party library dependencies:
submodule 3rdparty/dependencies.bkl;
shared-library WinSparkle {
vs2008.projectfile = $(id)$(SUFFIX).vcproj;
vs2010.projectfile = $(id)$(SUFFIX).vcxproj;
vs2012.projectfile = $(id)$(SUFFIX).vcxproj;
vs2013.projectfile = $(id)$(SUFFIX).vcxproj;
vs2015.projectfile = $(id)$(SUFFIX).vcxproj;
defines += XML_STATIC;
includedirs += 3rdparty/expat/expat/lib;
deps += WinSparkle_expat;
includedirs += 3rdparty/openssl-win32;
deps += WinSparkle_libcrypto;
includedirs += 3rdparty/wxWidgets_setup_h 3rdparty/wxWidgets/include;
deps += WinSparkle_wx;
libs += comctl32 kernel32 user32 comctl32 rpcrt4 version wininet shlwapi;
defines += BUILDING_WIN_SPARKLE;
// Public API headers:
headers {
include/winsparkle.h
include/winsparkle-version.h
}
includedirs += include;
// Private headers:
headers {
src/appcast.h
src/appcontroller.h
src/download.h
src/error.h
src/settings.h
src/threads.h
src/ui.h
src/updatechecker.h
src/updatedownloader.h
src/utils.h
src/signatureverifier.h
}
sources {
src/appcast.cpp
src/appcontroller.cpp
src/dll_api.cpp
src/dllmain.cpp
src/download.cpp
src/error.cpp
src/settings.cpp
src/threads.cpp
src/ui.cpp
src/updatechecker.cpp
src/updatedownloader.cpp
src/signatureverifier.cpp
src/winsparkle.rc
translations/translations.rc
}
}
submodule examples/examples.bkl;