Mercurial > trustbridge
annotate packaging/win-createpackage.sh.in @ 1338:ba7e36306085
(issue164) README updated.
author | Emanuel Schuetze <emanuel@intevation.de> |
---|---|
date | Thu, 16 Oct 2014 15:00:52 +0200 |
parents | 014586ef8a84 |
children | c480afb35db7 |
rev | line source |
---|---|
1188
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
1 #!/bin/bash |
588
a4e75d90d3f6
Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents:
552
diff
changeset
|
2 # Copyright (C) 2014 by Bundesamt f�r Sicherheit in der Informationstechnik |
405
35d6b371ba63
Add License header for CMake and shell scripts
Andre Heinecke <aheinecke@intevation.de>
parents:
340
diff
changeset
|
3 # Software engineering by Intevation GmbH |
35d6b371ba63
Add License header for CMake and shell scripts
Andre Heinecke <aheinecke@intevation.de>
parents:
340
diff
changeset
|
4 # |
35d6b371ba63
Add License header for CMake and shell scripts
Andre Heinecke <aheinecke@intevation.de>
parents:
340
diff
changeset
|
5 # This file is Free Software under the GNU GPL (v>=2) |
35d6b371ba63
Add License header for CMake and shell scripts
Andre Heinecke <aheinecke@intevation.de>
parents:
340
diff
changeset
|
6 # and comes with ABSOLUTELY NO WARRANTY! |
35d6b371ba63
Add License header for CMake and shell scripts
Andre Heinecke <aheinecke@intevation.de>
parents:
340
diff
changeset
|
7 # See LICENSE.txt for details. |
35d6b371ba63
Add License header for CMake and shell scripts
Andre Heinecke <aheinecke@intevation.de>
parents:
340
diff
changeset
|
8 |
340
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 #NSSDIR is hackish as this will be replaced by static compiling |
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 # anyway |
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 TMPDIR=$(mktemp -d) |
860
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
12 TMPINST=$(mktemp) |
340
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 |
1176
c8f698ca6355
(issue128) Rename cinst to trustbridge-certificate-installer
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1175
diff
changeset
|
14 EXEFILES=$(find . -name trustbridge-certificate-installer.exe -o -name trustbridge.exe -o -name trustbridge-nss-installer.exe) |
1186
3de099c8129e
Update packaging for moved help files
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1176
diff
changeset
|
15 HELPDIR=@CMAKE_BINARY_DIR@/doc/help/client/html |
1249
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
16 LICENSE_DIR=@CMAKE_SOURCE_DIR@/licenses |
340
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
17 |
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 cp $EXEFILES $TMPDIR |
963
62b832d0b839
(issue89) Package help for windows
Andre Heinecke <andre.heinecke@intevation.de>
parents:
922
diff
changeset
|
19 cp -r $HELPDIR $TMPDIR/doc |
1249
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
20 cp -r $LICENSE_DIR $TMPDIR/licenses |
340
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 |
1188
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
22 echo "; This file is autogenerated." > @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
23 echo "; This file is autogenerated." > @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
24 OLDDIR=$(pwd) |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
25 cd $TMPDIR |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
26 for file in `find * -name \*.exe`; do |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
27 echo File \"\${files_dir}\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
1242
e4aff35ef8fd
(issue143) Make uninstallation of nss-installer conditional on Windows
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1188
diff
changeset
|
28 if [ "$file" = "trustbridge-nss-installer.exe" ]; then |
e4aff35ef8fd
(issue143) Make uninstallation of nss-installer conditional on Windows
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1188
diff
changeset
|
29 # The nss installer is handled specially on uninstallation. |
e4aff35ef8fd
(issue143) Make uninstallation of nss-installer conditional on Windows
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1188
diff
changeset
|
30 continue |
e4aff35ef8fd
(issue143) Make uninstallation of nss-installer conditional on Windows
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1188
diff
changeset
|
31 fi |
1188
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
32 echo Delete \"\$INSTDIR\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
33 done |
1249
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
34 |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
35 cd $TMPDIR/licenses |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
36 echo SetOutPath \"\$INSTDIR\\licenses\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
37 for file in `find * -type f`; do |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
38 echo File \"\${files_dir}\${path_sep}licenses\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
39 echo Delete \"\$INSTDIR\\licenses\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
40 done |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
41 echo RmDir \"\$INSTDIR\\licenses\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
014586ef8a84
(issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1242
diff
changeset
|
42 |
1188
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
43 cd $TMPDIR/doc |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
44 |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
45 for curdir in `find * -maxdepth 0 -type d -not -path .`; do |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
46 cd $curdir |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
47 curpath=\"\$INSTDIR\\doc\\$curdir\" |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
48 echo SetOutPath $curpath >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
49 for file in `find * -maxdepth 0 -type f`; do |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
50 echo File \"\${files_dir}\${path_sep}doc\${path_sep}$curdir\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
51 echo Delete \"\$INSTDIR\\doc\\$curdir\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
52 done |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
53 echo RMDir $curpath >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
54 cd - |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
55 done |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
56 |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
57 echo SetOutPath \"\$INSTDIR\\doc\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
58 for file in `find * -maxdepth 0 -type f -not -path .buildinfo`; do |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
59 echo File \"\${files_dir}\${path_sep}doc\${path_sep}$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_in.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
60 echo Delete \"\$INSTDIR\\doc\\$file\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
61 done |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
62 echo RMDir \"\$INSTDIR\\doc\" >> @CMAKE_CURRENT_BINARY_DIR@/filelist_un.nsh |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
63 |
eb77ddd7e1ab
(issue137) Generate and include install / uninstall file lists
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1186
diff
changeset
|
64 cd $OLDDIR |
794
fdc15f0cfdd8
(issue61) NSIS Write uninstall information and make URL configurable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
588
diff
changeset
|
65 EST_SIZE=$(du -s $TMPDIR | cut -f 1) |
fdc15f0cfdd8
(issue61) NSIS Write uninstall information and make URL configurable.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
588
diff
changeset
|
66 |
340
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
67 echo $TMPDIR |
860
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
68 export LC_ALL="de_DE.latin-1" |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
69 |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
70 makensis -Dfiles_dir=$TMPDIR \ |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
71 -Dcompany="Bundesamt f�r Sicherheit in der Informationstechnik" \ |
1010
1c1964c27b39
(issue54) commit work in progress on start after installation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
963
diff
changeset
|
72 -Dplugin_dir="@CMAKE_CURRENT_BINARY_DIR@" \ |
860
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
73 -Dversion_number=@PROJECT_VERSION@ \ |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
74 -Dsetupname="$TMPINST" \ |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
75 -Dproductname="TrustBridge" \ |
1027
892f923c18d0
Add description to win-createpackage.sh
Andre Heinecke <andre.heinecke@intevation.de>
parents:
963
diff
changeset
|
76 -Ddescription="TrustBridge" \ |
860
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
77 -Dpath_sep="/" \ |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
78 -Dinfo_url="http://wald.intevation.org/projects/trustbridge/" \ |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
79 -Dsize=$EST_SIZE \ |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
80 -DWRITE_UNINSTALLER \ |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
81 -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
82 wine $TMPINST /S || true |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
83 mv ~/.wine/drive_c/tmp-uninstaller/Uninstall.exe $TMPDIR |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
84 rmdir ~/.wine/drive_c/tmp-uninstaller |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
85 rm $TMPINST |
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
86 |
340
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
87 makensis -Dfiles_dir=$TMPDIR \ |
588
a4e75d90d3f6
Use latin1 in NSIS (fixes encoding errors) Fix command line installation dir.
Andre Heinecke <aheinecke@intevation.de>
parents:
552
diff
changeset
|
88 -Dcompany="Bundesamt f�r Sicherheit in der Informationstechnik" \ |
1010
1c1964c27b39
(issue54) commit work in progress on start after installation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
963
diff
changeset
|
89 -Dplugin_dir="@CMAKE_CURRENT_BINARY_DIR@" \ |
495
7a8f5b85fd9a
Dynamically generate version information from HG
Andre Heinecke <aheinecke@intevation.de>
parents:
490
diff
changeset
|
90 -Dversion_number=@PROJECT_VERSION@ \ |
500
4f972b1f4996
Fix packaging information generation
Andre Heinecke <aheinecke@intevation.de>
parents:
495
diff
changeset
|
91 -Dsetupname="@CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe" \ |
410
3132ba0a305d
Rename installer to trustbridge
Andre Heinecke <aheinecke@intevation.de>
parents:
405
diff
changeset
|
92 -Dproductname="TrustBridge" \ |
1027
892f923c18d0
Add description to win-createpackage.sh
Andre Heinecke <andre.heinecke@intevation.de>
parents:
963
diff
changeset
|
93 -Ddescription="TrustBridge" \ |
552
fc61ef6612b0
Fix parameter order in makensis call
Andre Heinecke <aheinecke@intevation.de>
parents:
549
diff
changeset
|
94 -Dpath_sep="/" \ |
852
637948e9e32d
(issue61) Change temporary link into wald from https to http
Andre Heinecke <andre.heinecke@intevation.de>
parents:
834
diff
changeset
|
95 -Dinfo_url="http://wald.intevation.org/projects/trustbridge/" \ |
832
170b13ea05ee
(Issue10) Force encoding to be latin-1 during installer creation.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
794
diff
changeset
|
96 -Dsize=$EST_SIZE \ |
552
fc61ef6612b0
Fix parameter order in makensis call
Andre Heinecke <aheinecke@intevation.de>
parents:
549
diff
changeset
|
97 -Dproductname_short="TrustBridge" @CMAKE_SOURCE_DIR@/packaging/trustbridge.nsi |
860
43933a605482
Fix tmp-createpackage and rename it to win-createpackge
Andre Heinecke <andre.heinecke@intevation.de>
parents:
852
diff
changeset
|
98 |
922
180daa3ecbec
Add signing for windows installer
Andre Heinecke <andre.heinecke@intevation.de>
parents:
860
diff
changeset
|
99 osslsigncode sign -certs @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.pem \ |
180daa3ecbec
Add signing for windows installer
Andre Heinecke <andre.heinecke@intevation.de>
parents:
860
diff
changeset
|
100 -key @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.key \ |
180daa3ecbec
Add signing for windows installer
Andre Heinecke <andre.heinecke@intevation.de>
parents:
860
diff
changeset
|
101 -h sha256 -in @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe \ |
180daa3ecbec
Add signing for windows installer
Andre Heinecke <andre.heinecke@intevation.de>
parents:
860
diff
changeset
|
102 -out @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@-signed.exe |
1028
461db8f903f5
Fix renaming of the signed file.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1027
diff
changeset
|
103 mv @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@-signed.exe @CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.exe |
922
180daa3ecbec
Add signing for windows installer
Andre Heinecke <andre.heinecke@intevation.de>
parents:
860
diff
changeset
|
104 |
340
9001eaa55549
Add first draft of packaging to build upon
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
105 rm -r $TMPDIR |