dokytree/packaging/windows/build.sh

29 lines
651 B
Bash
Raw Normal View History

2023-03-08 23:38:30 +00:00
#!/bin/bash
declare -r APPNAME=dokytree
declare -r NODEVER=19.7.0
2023-03-11 02:09:04 +00:00
declare BASEDIR=""
2023-03-08 23:38:30 +00:00
declare CURDIR=""
2023-03-11 02:09:04 +00:00
declare TMPDIR=""
BASEDIR="$(pwd)"/$(dirname "${0}")/../..
echo "${BASEDIR}"
CURDIR+="$(pwd)"
2023-03-08 23:38:30 +00:00
TMPDIR=$(mktemp -d -u)
mkdir -p "${TMPDIR}"/"${APPNAME}"
2023-03-11 02:09:04 +00:00
cp -R "${BASEDIR}"/src/* "${TMPDIR}"/"${APPNAME}"
cp -R "${BASEDIR}"/samples "${TMPDIR}"/"${APPNAME}"
2023-03-08 23:38:30 +00:00
cd "${TMPDIR}" || exit
wget https://nodejs.org/dist/v${NODEVER}/node-v${NODEVER}-win-x64.zip
unzip node-v${NODEVER}-win-x64.zip
cp node-v${NODEVER}-win-x64/node.exe "${TMPDIR}"/"${APPNAME}"
zip -r "${CURDIR}"/"${APPNAME}".zip "${APPNAME}"
2023-03-11 02:09:04 +00:00
cd "${CURDIR}" || cd || exit
2023-03-08 23:38:30 +00:00
rm -rf "${TMPDIR}"