File tree 4 files changed +24
-6
lines changed
4 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 7
7
DIR=$( cd " $( dirname " $0 " ) " && pwd)
8
8
pushd " $DIR /payload/${project.name} .app/Contents/MacOS/"
9
9
10
- ./" ${project.name} " install
10
+ ./" ${project.name} " install >> " ${install.log} " 2>&1
11
11
popd
12
12
13
13
# Use install target from pkgbuild, an undocumented feature; fallback on sane location
17
17
pushd " /Applications/${project.name} .app/Contents/MacOS/"
18
18
fi
19
19
20
- ./" ${project.name} " certgen
20
+ ./" ${project.name} " certgen >> " ${install.log} " 2>&1
21
21
22
22
# Start qz by calling open on the .app as an ordinary user
23
23
su " $USER " -c " open ../../" || true
Original file line number Diff line number Diff line change 3
3
# Halt on first error
4
4
set -e
5
5
6
+ # Clear the log for writing
7
+ > " ${install.log} "
8
+
9
+ # Log helper
10
+ dbg () {
11
+ echo -e " [BASH] $( date -Iseconds) \n\t$1 " >> " ${install.log} " 2>&1
12
+ }
13
+
6
14
# Get working directory
15
+ dbg " Calculating working directory..."
7
16
DIR=$( cd " $( dirname " $0 " ) " && pwd)
8
- pushd " $DIR /payload/${project.name} .app/Contents/MacOS/"
17
+ dbg " Using working directory $DIR "
18
+ dbg " Switching to payload directory $DIR /payload/${project.name} .app/Contents/MacOS/"
19
+ pushd " $DIR /payload/${project.name} .app/Contents/MacOS/" >> " ${install.log} " 2>&1
9
20
10
21
# Offer to download Java if missing
11
- if ! ./" ${project.name} " --version; then
22
+ dbg " Checking for Java in payload directory..."
23
+ if ! ./" ${project.name} " --version >> " ${install.log} " 2>&1 ; then
24
+ dbg " Java was not found"
12
25
osascript -e " tell app \" Installer\" to display dialog \" Java is required. Please install Java and try again.\" "
13
26
sudo -u " $USER " open " ${java.download} "
14
27
exit 1
15
28
fi
16
29
17
- ./" ${project.name} " preinstall
30
+ dbg " Java was found in payload directory, running preinstall"
31
+ ./" ${project.name} " preinstall >> " ${install.log} " 2>&1
Original file line number Diff line number Diff line change @@ -20,12 +20,15 @@ mask=755
20
20
21
21
echo -e " Starting install...\n"
22
22
23
+ # Clear the log for writing
24
+ > " ${install.log} "
25
+
23
26
run_task () {
24
27
echo -e " Running $1 task..."
25
28
if [ -n " $DEBUG " ]; then
26
29
" ./${project.filename} " $@ && ret_val=$? || ret_val=$?
27
30
else
28
- " ./${project.filename} " $@ & > /dev/null && ret_val=$? || ret_val=$?
31
+ " ./${project.filename} " $@ & >> " ${install.log} " && ret_val=$? || ret_val=$?
29
32
fi
30
33
31
34
if [ $ret_val -eq 0 ]; then
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ project.datadir=qz
9
9
10
10
install.opts =-Djna.nosys=true
11
11
launch.opts =-Xms512m ${install.opts}
12
+ install.log =/tmp/${project.datadir}-install.log
12
13
# jdk9+ flags
13
14
# - Dark theme requires workaround https://github.com/bobbylight/Darcula/issues/8
14
15
launch.jigsaw =--add-exports java.desktop/sun.swing=ALL-UNNAMED
You can’t perform that action at this time.
0 commit comments