-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.win32
175 lines (123 loc) · 6.93 KB
/
BUILD.win32
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
Security note
=============
In theory, Win32 version of FCardSaver can be used as an attack vector.
The installer installs a stub file "fcardss.scr" into %SYSDIR%. This file
runs actual FCardSaver executable from the installation directory. The path
to the executable is taken from a value in the uninstall registry section
of FCardSaver:
Hive: HKEY_LOCAL_MACHINE
Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\FCardScreensaver
Value: RunExecutable
Attacker might try to replace this registry value to make the stub run another
executable. However, to do this, attacker will need write access to the key,
which, by default, is allowed only to System account, Administrators group,
and Power Users group. Running with privileges of such accounts gives the
attacker write access to many other registry keys which are more dangerous
attack vectors.
Building FCardSaver in MS Windows
=================================
1. Prerequisites
----------------
For building FCardSaver in MS Windows you'll need following prerequisites:
- Qt framework version 4.7.0 or higher.
- MinGW compiler set (built-in in Qt SDK or separate). MinGW binaries
must be in path.
Note that binary distributions of Qt framework are built using GCC 4.4.
GCC versions 4.7 and higher broke binary compatibility with earlier
versions, so you must either use GCC version 4.6 or lower, or recompile
Qt framework using GCC version 4.7 or higher yourself.
- Perl 5.10 or higher (for example, ActiveState Perl) with Perl module
Text::CSV_XS. This module is included in the default distribution of
ActiveState Perl.
- LibXSLT version 1.1.26 or higher, including xsltproc binary. Note that
the version included in GNUWin32 project is broken. Download clean
version from <ftp://ftp.zlatkovic.com/libxml>.
- GZip version 1.2.4 or higher and, optionally, WGet (any version).
Versions included in GNUWin32 and MSYS should work. GNUWin32 can be
downloaded from <http://gnuwin32.sourceforge.net/>. MSYS packages can be
downloaded from <http://www.mingw.org/>.
- DocBook XSL-NS stylesheets version 1.76.1 or higher. Download links for
DocBook XSL-NS are available at on the DocBook Project at
<http://sourceforge.net/projects/docbook/files/docbook-xsl-ns/>.
- NSIS version 2.46 or higher. Following NSIS extensions are required:
* NSIS extension library "LogicLib.nsh".
* NSIS plug-in "nsArray".
* NSIS plug-in "nsDialogs".
* NSIS plug-in "nsUnzip".
* NSIS plug-in "Inetc".
By default, project makefiles expect that qmake (from Qt framework), perl,
xsltproc, gzip, wget, and makensis (from NSIS) are in path, and that DocBook
XSL-NS stylesheets are in directory "docbook-xsl-ns" in the root of the current
disk. If any of these conditions is not met, you can pass corresponding paths
to mingw-make in variables on the command line (see below).
Note that spaces in paths are not supported, so, for example, path to directory
"C:\Program Files" must be specified as "c:\progra~1".
2. Versions of Qt framework and MinGW
-------------------------------------
The build was tested with Qt versions 4.7 and 4.8. Whether the build works for
other 4.x versions is not known. There's a work in progress for porting
FCardSaver to Qt5.
By default, build Makefile supposes that MinGW-GCC version is at least 4.6. If
that's not so, you need to specify make variable CXXVERSION (see below).
Installer built by the makefiles includes some MinGW and Qt DLLs. These DLLs
are copied from Qt framework and MinGW used for building the project. Note that
the installer uses file names "QCore4.dll" and "QGui4.dll" for Qt DLLs, and
"mingwm10.dll" and "libgcc_s_dw2-1.dll" for MinGW runtime DLLs. If your
versions have different names, you'll have to make changes in file
"libraries.list" in directory "install/win32/".
3. External dependencies
------------------------
Windows installer offers to install two extra font sets: Kanji stroke order
font by Timothy Eyre (http://www.nihilist.org.uk/), and Hanazono fonts (Hanazono
Minchou A and Hanazono Minchou B) by Koichi Kamichi (http://fonts.jp/hanazono/).
Kanji stroke order font covers 8240 glyphs (version 3.000) including kana, CJK
ideographs, and other East-Asian typographic symbols, showing their stroke order
in Japanese handwriting. The font is distributed under BSD-style license.
Hanazono fonts cover 89951 glyphs (version 2013-02-22, 42863 glyphs in font A
and 47088 glyphs in font B) including CJK URO, URO+, Extensions A to D,
Compatibility (with Supplement), IVD, and some non-ideographic glyphs. The font
is distributed under Hanazono Font License (M+-like permissive) or under SIL
Open Font License.
The installer doesn't include these fonts, because they ared distributed under
different licenses. Fonts are downloaded at install time. URLs used to download
these fonts and resulting file names are defined in configuration file
"external.conf" in directory "install/win32/". Hanazono fonts especially need
attention because they are regularly updated.
You night also want to update KANJIDIC2 data. On Linux it can be done by
running command "make download" in directory "kanjidic2-dict/", and, if you
have Windows versions of both WGet and GNU Make, you can try it on Windows too.
However, you can also just manually download KANJIDIC2 file from the site at
<http://www.csse.monash.edu.au/~jwb/kanjidic2/kanjidic2.xml.gz> and put it
into "kanjidic2-dict/" directory.
4. Make variables and running the build
---------------------------------------
Makefiles of the project use some common variables that may be specified at
build time. Following variables are supported (default value for Win32 build is
shown after equals sign):
QMAKE = qmake
Command to run for qmake utility (Qt framework).
PERL = perl
Command to run for Perl scripts.
XSLTPROC = xsltproc
Command to run for xsltproc tool (from LibXSLT).
WGET = wget
Command to run for wget utility. Note that wget is used only for
KANJIDIC2 update, which is not done during normal build.
GZIP = gzip
Command to run for GZip utility.
MAKENSIS = makensis
Command to run for MakeNSIS tool (NSIS).
DOCBOOK_XSL = /docbook-xsl-ns
Path to root directory of DocBook XSL-NS stylesheets, with forward
slash ('/') as the only directory separator.
CXXVERSION = g++-4.6
Compiler-dependent part of Qt spec name. Use "g++-4.6" for MinGW-GCC
versions higher than 4.6, or "g++" for earlier versions.
File "make-win32-example.cmd" contains an example of pre-setting environment
for a Win32 build.
As an alternative, you can change corresponding paths in file "platform.mk" in
the root of the project.
To build the project, run make utility from MinGW set (mingw-make.exe) in
the root directory of the project.
The result of Win32 build is file "fcardss-install.exe" in subdirectory
"build/" of the project root directory.