├── nsis
├── qpdfview_win32.ico
├── THIRDPARTY.txt
├── README.md
├── FileAssociation.nsh
├── installer.nsi
└── COPYING.txt
├── import-from-launchpad.sh
├── README.md
└── mxe
├── poppler-qt5.mk
├── qpdfview-1-fixes.patch
├── qpdfview.mk
└── poppler.mk
/nsis/qpdfview_win32.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/darealshinji/qpdfview/HEAD/nsis/qpdfview_win32.ico
--------------------------------------------------------------------------------
/import-from-launchpad.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 | set -x
4 |
5 | # required packages: bzr bzr-fastimport git
6 |
7 | git clone --branch master https://github.com/darealshinji/qpdfview
8 | cd qpdfview
9 | bzr branch lp:qpdfview
10 | bzr fast-export --plain qpdfview | git fast-import
11 | git checkout -f master 2>/dev/null
12 | rm -rf qpdfview
13 | #git push origin master
14 | #git push origin $(git tag | tr '\n' ' ')
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This is my personal Github mirror of the qpdfview source code.
2 | This branch here only contains build files for Windows and Linux AppImages.
3 |
4 | Please only report issues that are specific to the binaries I've built or
5 | related to the build files from this branch here.
6 | For generic issues with qpdfview please contact the original developers on Launchpad:
7 | https://bugs.launchpad.net/qpdfview
8 |
9 | The actual source code is available on the master branch:
10 | browse -> https://github.com/darealshinji/qpdfview/tree/master
11 | checkout -> `git clone -b master https://github.com/darealshinji/qpdfview`
12 |
13 | The original source code is on Launchpad:
14 | browse -> https://code.launchpad.net/qpdfview
15 | checkout -> `bzr branch lp:qpdfview`
16 |
--------------------------------------------------------------------------------
/mxe/poppler-qt5.mk:
--------------------------------------------------------------------------------
1 | # This file is part of MXE. See LICENSE.md for licensing information.
2 |
3 | PKG := poppler-qt5
4 | $(PKG)_WEBSITE = $(poppler_WEBSITE)
5 | $(PKG)_IGNORE = $(poppler_IGNORE)
6 | $(PKG)_VERSION = $(poppler_VERSION)
7 | $(PKG)_CHECKSUM = $(poppler_CHECKSUM)
8 | $(PKG)_SUBDIR = $(poppler_SUBDIR)
9 | $(PKG)_FILE = $(poppler_FILE)
10 | $(PKG)_URL = $(poppler_URL)
11 | $(PKG)_DEPS := cc poppler qtbase
12 |
13 | define $(PKG)_BUILD
14 | $(subst @build_with_cpp@,OFF, \
15 | $(subst @build_with_glib@,OFF, \
16 | $(subst @build_with_qt5@,ON, \
17 | $(subst @build_with_qt6@,OFF, \
18 | $(poppler_BUILD_COMMON)))))
19 |
20 | $(MAKE) -C '$(BUILD_DIR)/qt5' -j 1 install
21 | $(INSTALL) '$(BUILD_DIR)/poppler-qt5.pc' '$(PREFIX)/$(TARGET)/lib/pkgconfig/poppler-qt5.pc'
22 | endef
23 |
24 |
--------------------------------------------------------------------------------
/mxe/qpdfview-1-fixes.patch:
--------------------------------------------------------------------------------
1 | --- a/application.pro
2 | +++ b/application.pro
3 | @@ -109,7 +109,7 @@
4 | !without_pdf {
5 | DEFINES += WITH_PDF
6 |
7 | - !without_pkgconfig:POPPLER_VERSION = $$system(pkg-config --modversion poppler-qt$${QT_MAJOR_VERSION})
8 | + !without_pkgconfig:POPPLER_VERSION = $$system($$pkgConfigExecutable() --modversion poppler-qt$${QT_MAJOR_VERSION})
9 | DEFINES += POPPLER_VERSION=\\\"$${POPPLER_VERSION}\\\"
10 |
11 | static_pdf_plugin {
12 | @@ -135,7 +135,7 @@
13 | !without_ps {
14 | DEFINES += WITH_PS
15 |
16 | - !without_pkgconfig:LIBSPECTRE_VERSION = $$system(pkg-config --modversion libspectre)
17 | + !without_pkgconfig:LIBSPECTRE_VERSION = $$system($$pkgConfigExecutable() --modversion libspectre)
18 | DEFINES += LIBSPECTRE_VERSION=\\\"$${LIBSPECTRE_VERSION}\\\"
19 |
20 | static_ps_plugin {
21 | @@ -159,7 +159,7 @@
22 | !without_djvu {
23 | DEFINES += WITH_DJVU
24 |
25 | - !without_pkgconfig:DJVULIBRE_VERSION = $$system(pkg-config --modversion ddjvuapi)
26 | + !without_pkgconfig:DJVULIBRE_VERSION = $$system($$pkgConfigExecutable() --modversion ddjvuapi)
27 | DEFINES += DJVULIBRE_VERSION=\\\"$${DJVULIBRE_VERSION}\\\"
28 |
29 | static_djvu_plugin {
30 |
--------------------------------------------------------------------------------
/nsis/THIRDPARTY.txt:
--------------------------------------------------------------------------------
1 | MXE (https://github.com/mxe/mxe) aab04b93b06892a3dc675c97653236a40858c4a3 and
2 | the following thirdparty tools and libraries were used to build qpdfview:
3 |
4 | binutils-2.28
5 | boost_1_60_0
6 | bzip2-1.0.6
7 | cairo-1.16.0
8 | ccache-3.6
9 | cmake-3.15.4
10 | curl-7.67.0
11 | dbus-1.13.12
12 | djvulibre-3.5.27
13 | expat-2.2.9
14 | fontconfig-2.13.1
15 | freetds-1.1.23
16 | freetype-2.10.1
17 | gcc-5.5.0
18 | gettext-0.20.1
19 | ghostscript-9.50
20 | glib-2.50.2
21 | gmp-6.1.2
22 | harfbuzz-2.6.4
23 | icu4c-release-65.1
24 | isl-0.15
25 | jasper-version-2.0.16
26 | jpegsrc.v9c
27 | lcms2-2.9
28 | libffi-3.2.1
29 | libgcrypt-1.8.5
30 | libgpg-error-1.36
31 | libiconv-1.16
32 | libidn-1.35
33 | libidn2-2.3.0.tar.lz
34 | libmng-2.0.3
35 | libpaper_1.1.24+nmu5
36 | libpng-1.6.37
37 | libspectre-0.2.8
38 | libssh2-1.9.0
39 | libtool-2.4.4
40 | libunistring-0.9.10
41 | libwebp-1.0.3
42 | lzo-2.10
43 | mingw-w64-v6.0.0
44 | mpc-1.1.0
45 | mpfr-3.1.5
46 | mysql-connector-c-6.1.6-src
47 | openjpeg-v2.3.1
48 | openssl-1.1.1d
49 | pcre2-10.34
50 | pcre-8.43
51 | pe-parse-64989f6
52 | pe-util-5b07cb3
53 | pixman-0.33.6
54 | pkgconf-da179fd
55 | poppler-0.83.0
56 | postgresql-9.2.4
57 | qtactiveqt-everywhere-src-5.13.2
58 | qtbase-everywhere-src-5.13.2
59 | qtdeclarative-everywhere-src-5.13.2
60 | qtimageformats-everywhere-src-5.13.2
61 | qtsvg-everywhere-src-5.13.2
62 | qttools-everywhere-src-5.13.2
63 | qtxmlpatterns-everywhere-src-5.13.2
64 | sqlite-autoconf-3300100
65 | tiff-4.1.0
66 | xz-5.2.4
67 | zlib-1.2.11
68 | zstd-v1.4.4
69 |
70 |
--------------------------------------------------------------------------------
/nsis/README.md:
--------------------------------------------------------------------------------
1 | How do build an NSIS installer:
2 |
3 | Copy the statically linked binaries into this directory.
4 | The name should be `qpdfview-x64.exe` for 64 bit and `qpdfview-x86.exe` for 32 bit.
5 | Make sure to update the information in `THIRDPARTY.txt`.
6 |
7 | On Windows:
8 |
9 | Open MakeNSIS and drag `installer.nsi` into the window.
10 | The 32 bit installer should now build. After that's done, open the settings (Ctrl + S)
11 | and add the symbol `ARCH_X64` to the symbol list. Confirm with OK and recompile (Ctrl + R).
12 | The 64 bit installer should now compile.
13 |
14 | On Linux:
15 |
16 | Install the command line version of NSIS (`apt install nsis` on Debian & co).
17 | Run the following commands to build the installers (`-V4` is only for verbosity):
18 | ```
19 | makensis -V4 installer.nsi
20 | makensis -V4 -DARCH_X64 installer.nsi
21 | ```
22 |
23 | Build latest NSIS from source on Linux, the quick way:
24 |
25 | Download the latest source tarball (nsis-x.xx-src.tar.bz2) and zipped release version (nsis-x.xx.zip)
26 | from [SourceForge](https://sourceforge.net/projects/nsis/files/) and extract both archives.
27 |
28 | Run the following command inside the source directory:
29 | ```
30 | scons -j4 SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no APPEND_LINKFLAGS="-static -s" makensis
31 | ```
32 |
33 | After the build is finished, copy the binary file `nsis-x.xx-src/build/urelease/makensis/makensis` into `nsis-x.xx/Bin/`.
34 | You can now run makensis from that directory to build the installer: `/PATH/TO/nsis-x.xx/Bin/makensis /PATH/TO/installer.nsi`
35 |
36 |
--------------------------------------------------------------------------------
/mxe/qpdfview.mk:
--------------------------------------------------------------------------------
1 | # Download MXE: git clone https://github.com/mxe/mxe
2 | # Copy this file to mxe/plugins/apps.
3 | # cd into mxe and build with:
4 | # make JOBS=4 qpdfview MXE_TARGETS=x86_64-w64-mingw32.static MXE_PLUGIN_DIRS+=plugins/apps
5 |
6 | PKG := qpdfview
7 | $(PKG)_IGNORE :=
8 | $(PKG)_VERSION := 0.5.0
9 | $(PKG)_VERSION_ := 0.5
10 | $(PKG)_CHECKSUM := 44efc440a461cbdd757a9b396f1461ee7a2f4364e81df55bd0221f910219be99
11 | $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION_)
12 | $(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
13 | $(PKG)_URL := https://launchpad.net/$(PKG)/trunk/$($(PKG)_VERSION)/+download/$($(PKG)_FILE)
14 | $(PKG)_WEBSITE := https://launchpad.net/qpdfview
15 | $(PKG)_OWNER := https://launchpad.net/~adamreichold
16 | $(PKG)_DEPS := cc djvulibre libspectre poppler-qt5 qtsvg qttools
17 |
18 | define $(PKG)_UPDATE
19 | $(WGET) -q -O- 'https://launchpad.net/qpdfview' | \
20 | $(SED) -n 's,.*/+download/qpdfview-\([0-9][^"]*\)\.tar.*,\1,p'
21 | endef
22 |
23 | define $(PKG)_BUILD
24 | (echo 'CONFIG -= debug debug_and_release debug_and_release_target'; \
25 | echo 'CONFIG += without_magic without_cups without_signals'; \
26 | echo 'CONFIG += static_resources static_pdf_plugin static_ps_plugin static_djvu_plugin static_image_plugin';) \
27 | > '$(SOURCE_DIR)/qpdfview_win32.pri'
28 |
29 | cd '$(BUILD_DIR)' && $(TARGET)-qmake-qt5 '$(SOURCE_DIR)/qpdfview.pro'
30 | $(MAKE) -j '$(JOBS)' -C '$(BUILD_DIR)' qmake_all
31 | $(SED) -i 's|-lqpdfview_|libqpdfview_|g' '$(BUILD_DIR)/Makefile.application' # workaround for bug
32 |
33 | '$(PREFIX)/$(TARGET)/qt5/bin/lrelease' '$(SOURCE_DIR)/qpdfview.pro'
34 | $(MAKE) -j '$(JOBS)' -C '$(BUILD_DIR)'
35 |
36 | cp '$(BUILD_DIR)/qpdfview.exe' '$(PREFIX)/$(TARGET)/bin/'
37 | endef
38 |
39 | $(PKG)_BUILD_SHARED =
40 |
41 |
--------------------------------------------------------------------------------
/mxe/poppler.mk:
--------------------------------------------------------------------------------
1 | # This file is part of MXE. See LICENSE.md for licensing information.
2 |
3 | PKG := poppler
4 | $(PKG)_WEBSITE := https://poppler.freedesktop.org/
5 | $(PKG)_IGNORE :=
6 | $(PKG)_VERSION := 23.04.0
7 | $(PKG)_CHECKSUM := b6d893dc7dcd4138b9e9df59a13c59695e50e80dc5c2cacee0674670693951a1
8 | $(PKG)_SUBDIR := poppler-$($(PKG)_VERSION)
9 | $(PKG)_FILE := poppler-$($(PKG)_VERSION).tar.xz
10 | $(PKG)_URL := https://poppler.freedesktop.org/$($(PKG)_FILE)
11 | $(PKG)_DEPS := cc boost cairo curl freetype glib jpeg lcms libpng libwebp openjpeg tiff zlib
12 |
13 | define $(PKG)_UPDATE
14 | $(call GET_LATEST_VERSION, https://poppler.freedesktop.org/releases.html, poppler-)
15 | endef
16 |
17 | define $(PKG)_BUILD_COMMON
18 | cd '$(BUILD_DIR)' && $(TARGET)-cmake \
19 | -DPOPPLER_REQUIRES="lcms2 freetype2 libjpeg libpng libopenjp2 libtiff-4" \
20 | -DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
21 | -DBUILD_GTK_TESTS=OFF \
22 | -DBUILD_QT5_TESTS=OFF \
23 | -DBUILD_QT6_TESTS=OFF \
24 | -DBUILD_CPP_TESTS=OFF \
25 | -DBUILD_MANUAL_TESTS=OFF \
26 | -DENABLE_SPLASH=ON \
27 | -DENABLE_UTILS=OFF \
28 | -DENABLE_CPP=@build_with_cpp@ \
29 | -DENABLE_GLIB=@build_with_glib@ \
30 | -DENABLE_GOBJECT_INTROSPECTION=OFF \
31 | -DENABLE_GTK_DOC=OFF \
32 | -DENABLE_QT5=@build_with_qt5@ \
33 | -DENABLE_QT6=@build_with_qt6@ \
34 | -DENABLE_LIBOPENJPEG=openjpeg2 \
35 | -DENABLE_CMS=lcms2 \
36 | -DENABLE_DCTDECODER=libjpeg \
37 | -DENABLE_LIBCURL=ON \
38 | -DENABLE_ZLIB=ON \
39 | -DENABLE_ZLIB_UNCOMPRESS=OFF \
40 | -DSPLASH_CMYK=ON \
41 | -DUSE_FIXEDPOINT=OFF \
42 | -DUSE_FLOAT=OFF \
43 | -DBUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) \
44 | -DENABLE_RELOCATABLE=ON \
45 | -DEXTRA_WARN=OFF \
46 | -DFONT_CONFIGURATION=win32 \
47 | '$(SOURCE_DIR)'
48 | $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
49 | endef
50 |
51 | define $(PKG)_BUILD
52 | $(subst @build_with_cpp@,ON, \
53 | $(subst @build_with_glib@,ON, \
54 | $(subst @build_with_qt5@,OFF, \
55 | $(subst @build_with_qt6@,OFF, \
56 | $($(PKG)_BUILD_COMMON)))))
57 | $(MAKE) -C '$(BUILD_DIR)' -j 1 install
58 |
59 | '$(TARGET)-g++' \
60 | -W -Wall -Werror -ansi -pedantic -std=c++11 \
61 | '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
62 | `'$(TARGET)-pkg-config' poppler-cpp freetype2 libjpeg libtiff-4 libpng libopenjp2 --cflags --libs` -liconv
63 | endef
64 |
65 |
--------------------------------------------------------------------------------
/nsis/FileAssociation.nsh:
--------------------------------------------------------------------------------
1 | /*
2 | _____________________________________________________________________________
3 |
4 | File Association
5 | _____________________________________________________________________________
6 |
7 | Based on code taken from http://nsis.sourceforge.net/File_Association
8 |
9 | Usage in script:
10 | 1. !include "FileAssociation.nsh"
11 | 2. [Section|Function]
12 | ${FileAssociationFunction} "Param1" "Param2" "..." $var
13 | [SectionEnd|FunctionEnd]
14 |
15 | FileAssociationFunction=[RegisterExtension|UnRegisterExtension]
16 |
17 | _____________________________________________________________________________
18 |
19 | ${RegisterExtension} "[executable]" "[extension]" "[description]"
20 |
21 | "[executable]" ; executable which opens the file format
22 | ;
23 | "[extension]" ; extension, which represents the file format to open
24 | ;
25 | "[description]" ; description for the extension. This will be display in Windows Explorer.
26 | ;
27 |
28 |
29 | ${UnRegisterExtension} "[extension]" "[description]"
30 |
31 | "[extension]" ; extension, which represents the file format to open
32 | ;
33 | "[description]" ; description for the extension. This will be display in Windows Explorer.
34 | ;
35 |
36 | _____________________________________________________________________________
37 |
38 | Macros
39 | _____________________________________________________________________________
40 |
41 | Change log window verbosity (default: 3=no script)
42 |
43 | Example:
44 | !include "FileAssociation.nsh"
45 | !insertmacro RegisterExtension
46 | ${FileAssociation_VERBOSE} 4 # all verbosity
47 | !insertmacro UnRegisterExtension
48 | ${FileAssociation_VERBOSE} 3 # no script
49 | */
50 |
51 |
52 | !ifndef FileAssociation_INCLUDED
53 | !define FileAssociation_INCLUDED
54 |
55 | !include Util.nsh
56 |
57 | !verbose push
58 | !verbose 3
59 | !ifndef _FileAssociation_VERBOSE
60 | !define _FileAssociation_VERBOSE 3
61 | !endif
62 | !verbose ${_FileAssociation_VERBOSE}
63 | !define FileAssociation_VERBOSE `!insertmacro FileAssociation_VERBOSE`
64 | !verbose pop
65 |
66 | !macro FileAssociation_VERBOSE _VERBOSE
67 | !verbose push
68 | !verbose 3
69 | !undef _FileAssociation_VERBOSE
70 | !define _FileAssociation_VERBOSE ${_VERBOSE}
71 | !verbose pop
72 | !macroend
73 |
74 |
75 |
76 | !macro RegisterExtensionCall _EXECUTABLE _EXTENSION _DESCRIPTION
77 | !verbose push
78 | !verbose ${_FileAssociation_VERBOSE}
79 | Push `${_DESCRIPTION}`
80 | Push `${_EXTENSION}`
81 | Push `${_EXECUTABLE}`
82 | ${CallArtificialFunction} RegisterExtension_
83 | !verbose pop
84 | !macroend
85 |
86 | !macro UnRegisterExtensionCall _EXTENSION _DESCRIPTION
87 | !verbose push
88 | !verbose ${_FileAssociation_VERBOSE}
89 | Push `${_EXTENSION}`
90 | Push `${_DESCRIPTION}`
91 | ${CallArtificialFunction} UnRegisterExtension_
92 | !verbose pop
93 | !macroend
94 |
95 |
96 |
97 | !define RegisterExtension `!insertmacro RegisterExtensionCall`
98 | !define un.RegisterExtension `!insertmacro RegisterExtensionCall`
99 |
100 | !macro RegisterExtension
101 | !macroend
102 |
103 | !macro un.RegisterExtension
104 | !macroend
105 |
106 | !macro RegisterExtension_
107 | !verbose push
108 | !verbose ${_FileAssociation_VERBOSE}
109 |
110 | Exch $R2 ;exe
111 | Exch
112 | Exch $R1 ;ext
113 | Exch
114 | Exch 2
115 | Exch $R0 ;desc
116 | Exch 2
117 | Push $0
118 | Push $1
119 |
120 | ReadRegStr $1 HKCR $R1 "" ; read current file association
121 | StrCmp "$1" "" NoBackup ; is it empty
122 | StrCmp "$1" "$R0" NoBackup ; is it our own
123 | WriteRegStr HKCR $R1 "backup_val" "$1" ; backup current value
124 | NoBackup:
125 | WriteRegStr HKCR $R1 "" "$R0" ; set our file association
126 |
127 | ReadRegStr $0 HKCR $R0 ""
128 | StrCmp $0 "" 0 Skip
129 | WriteRegStr HKCR "$R0" "" "$R0"
130 | WriteRegStr HKCR "$R0\shell" "" "open"
131 | WriteRegStr HKCR "$R0\DefaultIcon" "" "$R2,0"
132 | Skip:
133 | WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"'
134 | WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0"
135 | WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"'
136 |
137 | Pop $1
138 | Pop $0
139 | Pop $R2
140 | Pop $R1
141 | Pop $R0
142 |
143 | !verbose pop
144 | !macroend
145 |
146 |
147 |
148 | !define UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
149 | !define un.UnRegisterExtension `!insertmacro UnRegisterExtensionCall`
150 |
151 | !macro UnRegisterExtension
152 | !macroend
153 |
154 | !macro un.UnRegisterExtension
155 | !macroend
156 |
157 | !macro UnRegisterExtension_
158 | !verbose push
159 | !verbose ${_FileAssociation_VERBOSE}
160 |
161 | Exch $R1 ;desc
162 | Exch
163 | Exch $R0 ;ext
164 | Exch
165 | Push $0
166 | Push $1
167 |
168 | ReadRegStr $1 HKCR $R0 ""
169 | StrCmp $1 $R1 0 NoOwn ; only do this if we own it
170 | ReadRegStr $1 HKCR $R0 "backup_val"
171 | StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
172 | DeleteRegKey HKCR $R0
173 | Goto NoOwn
174 |
175 | Restore:
176 | WriteRegStr HKCR $R0 "" $1
177 | DeleteRegValue HKCR $R0 "backup_val"
178 | DeleteRegKey HKCR $R1 ;Delete key with association name settings
179 |
180 | NoOwn:
181 |
182 | Pop $1
183 | Pop $0
184 | Pop $R1
185 | Pop $R0
186 |
187 | !verbose pop
188 | !macroend
189 |
190 | !endif # !FileAssociation_INCLUDED
191 |
--------------------------------------------------------------------------------
/nsis/installer.nsi:
--------------------------------------------------------------------------------
1 | !include "MUI2.nsh"
2 | !include "LogicLib.nsh"
3 | !include "FileFunc.nsh"
4 | !include "FileAssociation.nsh"
5 |
6 | !define APPNAME "qpdfview"
7 | !define COMPANYNAME "Adam Reichold"
8 | !define DESCRIPTION "qpdfview is a tabbed document viewer"
9 | !define GUID "{CBFA73BF-684B-4CD2-9B7A-D1E4B500A6B1}"
10 | !define LICENSE "COPYING.txt"
11 |
12 | # define to create an installer for the 64 bit version
13 | ;!define ARCH_X64
14 |
15 | !define VERSIONMAJOR 0
16 | !define VERSIONMINOR 4
17 | !define VERSIONBUILD 18
18 | !define VERSIONBETA ""
19 | !define DISPLAYVERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}${VERSIONBETA}"
20 |
21 | !define HELPURL "https://answers.launchpad.net/qpdfview" ;"Support Information" link
22 | !define UPDATEURL "https://launchpad.net/qpdfview" ;"Product Updates" link
23 | !define ABOUTURL "https://launchpad.net/qpdfview" ;"Publisher" link
24 | !define ARP "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
25 |
26 | RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
27 |
28 | !ifdef ARCH_X64
29 | !define ARCH "x64"
30 | !define DISPLAYARCH " (x64)"
31 | InstallDir "$PROGRAMFILES64\${APPNAME}"
32 | !else
33 | !define ARCH "x86"
34 | !define DISPLAYARCH ""
35 | InstallDir "$PROGRAMFILES\${APPNAME}"
36 | !endif
37 |
38 | # zlib|bzip2|lzma
39 | SetCompressor lzma
40 |
41 | Name "${APPNAME}"
42 | Icon "${APPNAME}_win32.ico"
43 | LicenseData "${LICENSE}"
44 | OutFile "${APPNAME}-${DISPLAYVERSION}-setup-${ARCH}.exe"
45 |
46 | Page license
47 | Page directory
48 | Page instfiles
49 |
50 | !macro VerifyUserIsAdmin
51 | UserInfo::GetAccountType
52 | pop $0
53 | ${If} $0 != "admin" ;Require admin rights on NT4+
54 | MessageBox MB_OK|MB_ICONSTOP "Administrator rights required!"
55 | SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
56 | Quit
57 | ${EndIf}
58 | !macroend
59 |
60 | !macro BadPathsCheck
61 | # Prevent the uninstaller from accidentally deleting important
62 | # system directories if $INSTDIR wasn't set correctly.
63 | StrCpy $R0 $INSTDIR "" -2
64 | StrCmp $R0 ":\" bad
65 | StrCpy $R0 $INSTDIR "" -14
66 | StrCmp $R0 "\Program Files" bad
67 | StrCpy $R0 $INSTDIR "" -8
68 | StrCmp $R0 "\Windows" bad
69 | StrCpy $R0 $INSTDIR "" -6
70 | StrCmp $R0 "\WinNT" bad
71 | StrCpy $R0 $INSTDIR "" -9
72 | StrCmp $R0 "\system32" bad
73 | StrCpy $R0 $INSTDIR "" -8
74 | StrCmp $R0 "\Desktop" bad
75 | StrCpy $R0 $INSTDIR "" -23
76 | StrCmp $R0 "\Documents and Settings" bad
77 | StrCpy $R0 $INSTDIR "" -13
78 | StrCmp $R0 "\My Documents" bad done
79 | bad:
80 | MessageBox MB_OK|MB_ICONSTOP "Install path invalid!"
81 | Abort
82 | done:
83 | !macroend
84 |
85 | Function .onInit
86 | SetShellVarContext all
87 | !insertmacro VerifyUserIsAdmin
88 |
89 | # Check for a running instance
90 | System::Call 'kernel32::CreateMutex(i 0, i 0, t "${APPNAME}-installer-${GUID}") ?e'
91 | Pop $R0
92 | StrCmp $R0 0 +3
93 | MessageBox MB_OK|MB_ICONSTOP "The installer is already running."
94 | Abort
95 | FunctionEnd
96 |
97 | Section "install"
98 | SetOutPath $INSTDIR
99 | File "/oname=${APPNAME}.exe" "${APPNAME}-${ARCH}.exe"
100 | File "${LICENSE}"
101 | File "THIRDPARTY.txt"
102 | WriteUninstaller "$INSTDIR\uninstall.exe"
103 |
104 | # Start Menu
105 | CreateShortCut "$SMPROGRAMS\${APPNAME}.lnk" "$INSTDIR\${APPNAME}.exe" "" ""
106 |
107 | # Desktop
108 | ;CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\${APPNAME}.exe" "" ""
109 |
110 | # File Associations
111 | ${registerExtension} "$INSTDIR\${APPNAME}.exe" ".pdf" "PDF Document"
112 | ${registerExtension} "$INSTDIR\${APPNAME}.exe" ".ps" "PS Document"
113 | ${registerExtension} "$INSTDIR\${APPNAME}.exe" ".eps" "EPS Document"
114 | ${registerExtension} "$INSTDIR\${APPNAME}.exe" ".djvu" "DJVU Document"
115 | ${registerExtension} "$INSTDIR\${APPNAME}.exe" ".djv" "DJVU Document"
116 |
117 | # Registry information for add/remove programs
118 | WriteRegStr HKLM "${ARP}" "DisplayName" "${APPNAME} ${DISPLAYVERSION}${DISPLAYARCH}"
119 | WriteRegStr HKLM "${ARP}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
120 | WriteRegStr HKLM "${ARP}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
121 | WriteRegStr HKLM "${ARP}" "InstallLocation" "$\"$INSTDIR$\""
122 | WriteRegStr HKLM "${ARP}" "DisplayIcon" "$\"$INSTDIR\${APPNAME}.exe$\",0"
123 | WriteRegStr HKLM "${ARP}" "Publisher" "${COMPANYNAME}"
124 | WriteRegStr HKLM "${ARP}" "HelpLink" "${HELPURL}"
125 | WriteRegStr HKLM "${ARP}" "URLUpdateInfo" "${UPDATEURL}"
126 | WriteRegStr HKLM "${ARP}" "URLInfoAbout" "${ABOUTURL}"
127 | WriteRegStr HKLM "${ARP}" "DisplayVersion" "${DISPLAYVERSION}"
128 | WriteRegDWORD HKLM "${ARP}" "VersionMajor" ${VERSIONMAJOR}
129 | WriteRegDWORD HKLM "${ARP}" "VersionMinor" ${VERSIONMINOR}
130 | WriteRegDWORD HKLM "${ARP}" "NoModify" 1
131 | WriteRegDWORD HKLM "${ARP}" "NoRepair" 1
132 |
133 | # Compute and set EstimatedSize
134 | ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
135 | IntFmt $0 "0x%08X" $0
136 | WriteRegDWORD HKLM "${ARP}" "EstimatedSize" $0
137 | SectionEnd
138 |
139 | # Uninstaller
140 |
141 | UninstPage uninstConfirm
142 | UninstPage instfiles
143 |
144 | Function un.onInit
145 | SetShellVarContext all
146 | !insertmacro VerifyUserIsAdmin
147 | !insertmacro BadPathsCheck
148 | FunctionEnd
149 |
150 | Section "uninstall"
151 | Delete "$SMPROGRAMS\${APPNAME}.lnk"
152 | ;Delete "$DESKTOP\${APPNAME}.lnk"
153 | Delete "$INSTDIR\${APPNAME}.exe"
154 | Delete "$INSTDIR\COPYING.txt"
155 | Delete "$INSTDIR\THIRDPARTY.txt"
156 |
157 | # Always delete uninstaller as the last action
158 | Delete "$INSTDIR\uninstall.exe"
159 | RMDir "$INSTDIR"
160 |
161 | # Remove File Associations
162 | # Note: setting .pdf doesn't work correctly on Windows 10
163 | ${unregisterExtension} ".pdf" "PDF Document"
164 | ${unregisterExtension} ".ps" "PS Document"
165 | ${unregisterExtension} ".eps" "EPS Document"
166 | ${unregisterExtension} ".djvu" "DJVU Document"
167 | ${unregisterExtension} ".djv" "DJVU Document"
168 |
169 | # Remove uninstaller information from the registry
170 | DeleteRegKey HKLM "${ARP}"
171 | SectionEnd
172 |
173 |
--------------------------------------------------------------------------------
/nsis/COPYING.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | , 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------