Skip to content

Commit

Permalink
win build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Coopengo committed Jan 12, 2017
1 parent 332798a commit 0d98600
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
60 changes: 60 additions & 0 deletions win-make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash

version() {
local t
t=$(git describe --tags --exact-match 2> /dev/null | grep "^coog-" | head -1)
if [ ! -z "$t" ]
then
echo "$t" | sed -e "s/coog-//g"
else
local b; b=$(git rev-parse --abbrev-ref HEAD)
local c; c=$(git rev-parse --short HEAD)
echo "$b-$c" | sed -e "s/coog-//g"
fi
}

deps() {
pacman -S \
mingw-w64-x86_64-librsvg \
mingw-w64-x86_64-nsis \
mingw-w64-x86_64-python2 \
mingw-w64-x86_64-python2-setuptools \
mingw-w64-x86_64-python2-pip \
mingw-w64-x86_64-python2-pygtk \
mingw-w64-x86_64-gtk-engine-murrine \
mingw-w64-x86_64-python2-cx_Freeze

pip install \
python-dateutil \
chardet \
pyflakes
}

clean() {
rm -rf build dist coog-*
}

patch() {
git apply windows.patch
}

unpatch() {
git checkout HEAD -- tryton
}

build() {
clean
patch
local v; v=$(version)
python setup-freeze.py install_exe -d dist
makensis -DVERSION="$v" setup.nsi
makensis -DVERSION="$v" setup-single.nsi
unpatch
}

main() {
[ -z "$1" ] && echo missing command && return 1
"$1" "$@"
}

main "$@"
File renamed without changes.
4 changes: 4 additions & 0 deletions win-s3.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FOR %%I in (.\coog-*) DO (
aws --region "eu-central-1" s3 cp %%I s3://coog-client/
)
pause>nul

0 comments on commit 0d98600

Please sign in to comment.