-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild-windows-package.sh
executable file
·64 lines (52 loc) · 1.84 KB
/
build-windows-package.sh
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
#!/bin/sh
set -ev
# This is how the Windows package for release are built.
# Any existing TECkit-<version> folder and TECkit-<version>.zip will be deleted.
. ./build-windows-common
# metadata
VERSION="2.5.12"
foldername=TECkit-${VERSION}
filename=${foldername}.zip
# remove old folder and zip file
rm -rf $filename $foldername
# create folder for distribution
cp -a $WINDOWS $foldername
cd $foldername
# add files to folder
# runtime
for bit in 32 64
do
set_compiler $bit
# The cross-compiler defaults to the Windows threading model
# which does not require the libwinpthread-1.dll runtime file.
# This file is needed if the POSIX threading model is specified.
# On an Ubuntu system see one (or more) of
# /usr/share/doc/gcc-mingw-w64-i686/README.Debian
# /usr/share/doc/g++-mingw-w64-i686/README.Debian
# /usr/share/doc/gcc-mingw-w64-x86-64/README.Debian
# /usr/share/doc/g++-mingw-w64-x86-64/README.Debian
# (might be the same contents) for more details.
# TECkit 2.5.4 and 2.5.6 on Windows did need this file,
# so presumably used the POSIX threading model.
for FILE in $RUNTIME libstdc++-6.dll # libwinpthread-1.dll
do
cp -p $($HOST-gcc -print-file-name=$FILE) ${bit}-bit
done
done
# documentation
unix2dos -n ../README README.txt
mkdir Documentation
mv *.1.pdf Documentation
cp -p ../docs/TECkit_Language.pdf Documentation
cp -p ../docs/TECkit_Tools.pdf Documentation
mkdir Developers
cp -p ../docs/Calling_TECkit_from_VB.doc "Developers/Calling TECkit from VB.doc"
cp -p ../docs/Calling_TECkit_from_VB.pdf "Developers/Calling TECkit from VB.pdf"
cp -p ../docs/TECkit_Binary_Format.pdf Developers
# code
mkdir Developers/Public-headers
cp -p ../source/Public-headers/*.h Developers/Public-headers
cp -a ../source/Sample-tools Developers
# create zip file from folder
cd ..
zip -r $filename $foldername