Can create msi under w10
This commit is contained in:
parent
6a75e41d87
commit
a9d29b6d34
4 changed files with 42 additions and 22 deletions
19
Makefile.am
19
Makefile.am
|
|
@ -13,9 +13,6 @@ tg_timer_SOURCES = src/algo.c \
|
|||
src/output_panel.c \
|
||||
src/serializer.c \
|
||||
src/tg.h
|
||||
if HAVE_WINDRES
|
||||
tg_timer_SOURCES += tg-timer.res
|
||||
endif
|
||||
|
||||
tg_timer_dbg_SOURCES = $(tg_timer_SOURCES)
|
||||
tg_timer_prf_SOURCES = $(tg_timer_SOURCES)
|
||||
|
|
@ -39,6 +36,16 @@ tg_timer_dbg_CFLAGS = $(AM_CFLAGS) -ggdb
|
|||
tg_timer_prf_CFLAGS = $(AM_CFLAGS) -pg
|
||||
tg_timer_vlg_CFLAGS = $(AM_CFLAGS) -g
|
||||
|
||||
if BE_WINDOWS
|
||||
if HAVE_WINDRES
|
||||
tg_timer_SOURCES += icons/tg-timer.rc
|
||||
endif
|
||||
tg_timer_LDFLAGS = -mwindows
|
||||
tg_timer_dbg_LDFLAGS = -mconsole
|
||||
tg_timer_prf_LDFLAGS = -mconsole
|
||||
tg_timer_vlg_LDFLAGS = -mconsole
|
||||
endif
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
dist_desktop_DATA = icons/tg-timer.desktop \
|
||||
icons/tg-timer.xml
|
||||
|
|
@ -51,13 +58,13 @@ EXTRA_DIST := autogen.sh \
|
|||
LICENSE \
|
||||
README.md
|
||||
|
||||
.rc.o:
|
||||
$(WINDRES) $< -O coff -o $@
|
||||
|
||||
test: tg-timer-dbg
|
||||
./tg-timer-dbg test
|
||||
.PHONY: test
|
||||
|
||||
tg-timer.res: icons/tg-timer.rc icons/tg-timer.ico
|
||||
windres icons/tg-timer.rc -O coff -o $@
|
||||
|
||||
valgrind: tg-timer-vlg
|
||||
valgrind --leak-check=full -v --num-callers=99 --suppressions=.valgrind.supp ./$^
|
||||
.PHONY: valgrind
|
||||
|
|
|
|||
23
README.md
23
README.md
|
|
@ -64,24 +64,33 @@ Debug build:
|
|||
make tg-timer-dbg
|
||||
```
|
||||
|
||||
### TODO: fix following sections for autotools
|
||||
|
||||
### Compiling on Windows
|
||||
|
||||
It is suggested to use the msys2 platform. First install msys2 according
|
||||
to the instructions at [http://www.msys2.org](http://www.msys2.org). Then
|
||||
issue the following commands.
|
||||
|
||||
pacman -S mingw-w64-x86_64-gcc make pkg-config mingw-w64-x86_64-gtk3 mingw-w64-x86_64-portaudio mingw-w64-x86_64-fftw git
|
||||
git clone https://github.com/vacaboja/tg.git
|
||||
cd tg
|
||||
make
|
||||
```sh
|
||||
pacman -S mingw-w64-x86_64-gcc make pkg-config mingw-w64-x86_64-gtk3 mingw-w64-x86_64-portaudio mingw-w64-x86_64-fftw git autoconf automake libtool
|
||||
git clone https://github.com/vacaboja/tg.git
|
||||
cd tg
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
```
|
||||
|
||||
### Compiling on Debian
|
||||
|
||||
To compile tg on Debian
|
||||
|
||||
sudo apt-get install libgtk-3-dev libjack-jackd2-dev portaudio19-dev libfftw3-dev git
|
||||
```sh
|
||||
sudo apt-get install libgtk-3-dev libjack-jackd2-dev portaudio19-dev libfftw3-dev git autoconf automake libtool
|
||||
git clone https://github.com/vacaboja/tg.git
|
||||
cd tg
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
```
|
||||
|
||||
The package libjack-jackd2-dev is not necessary, it only works around a
|
||||
known bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718221).
|
||||
|
|
|
|||
|
|
@ -8,8 +8,11 @@ PKG_CHECK_MODULES([GTK], [gtk+-3.0 glib-2.0])
|
|||
PKG_CHECK_MODULES([PORTAUDIO], [portaudio-2.0])
|
||||
PKG_CHECK_MODULES([FFTW], [fftw3f])
|
||||
|
||||
AC_CHECK_TOOL(WINDRES, windres)
|
||||
AM_CONDITIONAL(HAVE_WINDRES, test x$WINDRES != x)
|
||||
AC_CHECK_TOOL([WINDRES], [windres])
|
||||
AM_CONDITIONAL([HAVE_WINDRES], [test x$WINDRES != x])
|
||||
|
||||
AM_CONDITIONAL([BE_WINDOWS], [test x$OS = xWindows_NT])
|
||||
|
||||
AC_CONFIG_LINKS([icons/tg-timer.ico:icons/tg-timer.ico])
|
||||
|
||||
AC_OUTPUT([Makefile icons/Makefile])
|
||||
|
||||
|
|
|
|||
|
|
@ -11,26 +11,27 @@ ABSDIR=`cd "$DIR"; pwd`
|
|||
|
||||
RESOURCES=`cd "$1"; pwd`
|
||||
|
||||
TARGET="$ABSDIR/../build/msi"
|
||||
TARGET="$ABSDIR/../msi"
|
||||
|
||||
cd "$ABSDIR"/..
|
||||
|
||||
VERSION=`cat version`
|
||||
|
||||
make
|
||||
|
||||
rm -rf "$TARGET"
|
||||
mkdir -p "$TARGET"
|
||||
|
||||
cd "$TARGET"
|
||||
../configure
|
||||
make
|
||||
|
||||
mv "$TARGET/tg-timer.exe" "$TARGET/tg.exe"
|
||||
cp "$ABSDIR/tg-timer.wxs" "$TARGET"
|
||||
cp "$ABSDIR/LICENSE.rtf" "$TARGET"
|
||||
cp "$ABSDIR/../README.md" "$TARGET"
|
||||
cp "$ABSDIR/../LICENSE" "$TARGET"
|
||||
cp "$ABSDIR/../build/tg.exe" "$TARGET"
|
||||
cp "$ABSDIR/../icons/tg-document.ico" "$TARGET"
|
||||
cp -r "$RESOURCES"/* "$TARGET"
|
||||
heat dir "$RESOURCES" -srd -gg -sreg -dr INSTALLDIR -cg Resources -out "$TARGET/Resources.wxs"
|
||||
|
||||
cd "$TARGET"
|
||||
|
||||
candle tg-timer.wxs Resources.wxs
|
||||
light -out tg-timer_${VERSION}.msi -ext WixUIExtension tg-timer.wixobj Resources.wixobj
|
||||
|
|
|
|||
Loading…
Reference in a new issue