-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpackages
executable file
·164 lines (128 loc) · 4.2 KB
/
packages
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
#!/bin/bash
#
#******************************************************************************
# packages (Seq66)
#------------------------------------------------------------------------------
##
# \file packages
# \library Seq66
# \author Chris Ahlstrom
# \date 2018-09-29
# \update 2021-04-17
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
# Packs up the current project directory, makes an NSIS package installer.
# Written solely to automate some tedious stuff needed for an official
# Seq66 release.
#
#-----------------------------------------------------------------------------
RELEASEMAJOR="0.93"
RELEASEMINOR="0"
RELEASENUMBER="$RELEASEMAJOR.$RELEASEMINOR"
REVNUMBER="0"
DODRYRUN="no"
DORELEASE="no"
if [ "$1" == "--help" ] || [ "$1" == "help" ] ; then
cat << E_O_F
packages 0.6 2021-04-17
Usage: ./packages [--dry-run] [--release [0.93.0] ]
This script packs the contents of the current directory into the following
packages:
E_O_F
else
while [ "$1" != "" ] ; do
case "$1" in
--dry-run)
DODRYRUN="yes"
;;
--clean)
DOCLEAN="yes"
;;
--no-clean)
DOCLEAN="no"
;;
--release)
shift
DORELEASE="yes"
if [ "$1" != "" ] ; then
RELEASENUMBER="$1"
fi
;;
*)
;;
esac
shift
done
fi
PACKAGENAME="qpseq66-release-package-$RELEASENUMBER.7z"
# INSTALLERNAME="seq66_setup_$RELEASENUMBER-$REVNUMBER.exe"
# ZIPNAME="qpseq66-portable-$RELEASENUMBER-$REVNUMBER.zip"
INSTALLERNAME="seq66_setup_$RELEASENUMBER.exe"
ZIPNAME="qpseq66-portable-$RELEASENUMBER.zip"
TARNAME="seq66-master-rtmidi-$RELEASENUMBER.tar.xz"
if [ "$DODRYRUN" == "yes" ] ; then
echo "DRY RUN, release = '$RELEASENUMBER'...."
if [ -f configure ] ; then
echo " "
echo "Making a standard Linux source/configure tarball..."
echo "$ ./pack --release rtmidi $RELEASENUMBER"
echo "$ mv ../$TARNAME ../seq66-packages/latest"
else
echo " "
echo "WARNING: 'configure' does not exist, cannot make a standard Linux"
echo " source tarball! Aborting."
exit 1
fi
echo "Extracting Windows deployment package..."
echo "$ 7z x -y $PACKAGENAME"
# echo "$ mv $PACKAGENAME .."
echo "$ pushd nsis"
echo "Building NSIS installer for release $RELEASENUMBER..."
echo "$ makensis Seq66Setup.nsi"
echo "$ popd"
echo "$ mkdir -p qpseq66"
echo "$ cp -r release/* qpseq66"
echo "$ rm -rf release"
echo "$ cp qpseq66/$INSTALLERNAME ../seq66-packages/latest"
echo "Copying qpseq66/$INSTALLERNAME to ../seq66-packages/latest..."
echo "Making a portable Zip package..."
echo "$ zip -q -u -r $ZIPNAME qpseq66/"
echo "Copying qpseq66/$ZIPNAME to ../seq66-packages/latest..."
echo "$ cp $ZIPNAME ../seq66-packages/latest"
echo "$ ls -lrt ../seq66-packages/latest"
else
if [ -f configure ] ; then
echo " "
echo "Making a standard Linux source/configure tarball..."
./pack --release rtmidi $RELEASENUMBER
mv ../$TARNAME ../seq66-packages/latest
else
echo " "
echo "WARNING: 'configure' does not exist, cannot make a standard Linux"
echo " source tarball! Aborting."
exit 1
fi
echo "Extracting Windows deployment package..."
7z x -y $PACKAGENAME
# mv $PACKAGENAME ..
pushd nsis
echo "Building NSIS installer for release $RELEASENUMBER..."
makensis Seq66Setup.nsi
popd
mkdir -p qpseq66
cp -r release/* qpseq66
rm -rf release/
echo "Copying qpseq66/$INSTALLERNAME to ../seq66-packages/latest..."
cp qpseq66/$INSTALLERNAME ../seq66-packages/latest
echo "Making a portable Zip package..."
zip -q -u -r $ZIPNAME qpseq66/
echo "Copying qpseq66/$ZIPNAME to ../seq66-packages/latest..."
cp $ZIPNAME ../seq66-packages/latest
ls -lrt ../seq66-packages/latest
fi
#******************************************************************************
# packages (Seq66)
#------------------------------------------------------------------------------
# vim: ts=3 sw=3 et ft=sh
#------------------------------------------------------------------------------