1#!/bin/bash 2 3echo Configuring gtypist @VERSION 4echo - using MinGW and PDCurses 5echo - with Native Language Support 6 7echo creating src/config.h... 8echo -e '/* config.h */\r' > src/config.h 9echo -e '#define ENABLE_NLS 1\r' >> src/config.h 10echo -e '#define PACKAGE "gtypist"\r' >> src/config.h 11echo -e '#define VERSION "@VERSION"\r' >> src/config.h 12echo -e '#define HAVE_PDCURSES 1\r' >> src/config.h 13echo -e '#define LOCALEDIR "locale"\r' >> src/config.h 14 15echo copying UI translations... 16(cd po/ 17for i in *.gmo 18do 19 lang=${i/.gmo/} 20 mkdir -p ../locale/$lang/LC_MESSAGES 21 cp $lang.gmo ../locale/$lang/LC_MESSAGES/gtypist.mo 22done 23) 24 25echo creating Makefile... 26echo -e '# gtypist: Makefile for MinGW\r' > Makefile 27echo -e '#\r' >> Makefile 28echo -e '# Please read INSTALL for help building gtypist with MinGW.\r' >> Makefile 29echo -e '\r' >> Makefile 30echo -e '# Set the path to a compiled PDCurses library here:\r' >> Makefile 31echo -e 'PDCURSES_PATH=C:\dev\PDCurses-3.4\r' >> Makefile 32echo -e '\r' >> Makefile 33echo -e 'gtypist.exe:\r' >> Makefile 34echo -e ' gcc -DMINGW -DPDC_WIDE -I$(PDCURSES_PATH) -Isrc -static -s -O2 -o gtypist src/error.c src/script.c src/cursmenu.c src/gtypist.c src/getopt.c src/getopt1.c src/utf8.c -L$(PDCURSES_PATH)/win32 -lpdcurses -lgettextlib.dll -lintl -liconv\r' >> Makefile 35echo 36echo 37echo IMPORTANT: Before running make, change the PDCURSES_PATH variable in the 38echo Makefile! Type 'notepad Makefile' to edit it. 39echo 40