Skip to content

Commit

Permalink
Windows packaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
wttw committed Jul 10, 2019
1 parent 3393599 commit 30ffb15
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*~
CMakeLists.txt.user

b/
build/
Output/
# Prerequisites
*.d

Expand Down
12 changes: 0 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ VERSION=0.1
APPNAME=dox

# Error handling
error() {
local parent_lineno="$1"
local message="$2"
local code="${3:-1}"
if [[ -n "$message" ]] ; then
echo "Error on or near line ${parent_lineno}: ${message}; exiting with status ${code}"
else
echo "Error on or near line ${parent_lineno}; exiting with status ${code}"
fi
exit "${code}"
}
trap 'error ${LINENO}' ERR

die() {
echo "${BASH_SOURCE[1]}: line ${BASH_LINENO[0]}: ${FUNCNAME[1]}: ${1-Died}" >&2
Expand Down
2 changes: 2 additions & 0 deletions package/package-darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
# Make sure we're in the right directory and the app was built
[[ -f "${APPNAME}.app/Contents/MacOS/${APPNAME}" ]] || die "${APPNAME} wasn't built"

# TODO(steve): codesigning

macdeployqt "${APPNAME}.app" -dmg
mv "${APPNAME}.dmg" "${OUTPUTDIR}/${APPNAME}.dmg"
13 changes: 13 additions & 0 deletions package/package-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# -*-bash-*-

# Make sure we're in the right directory and the app was built
[[ -f "${APPNAME}.exe" ]] || die "${APPNAME} wasn't built"

# TODO(steve): codesigning, wix

rm -rf "scratch/${APPNAME}"
mkdir -p "scratch/${APPNAME}"
mv "${APPNAME}.exe" "scratch/${APPNAME}/${APPNAME}.exe"
windeployqt.exe "scratch/${APPNAME}/${APPNAME}.exe"
cd scratch
zip -9r "${OUTPUTDIR}/${APPNAME}.zip" "${APPNAME}"

0 comments on commit 30ffb15

Please sign in to comment.