echo off
REM 
REM You can create a package on windows:
REM o install Visual C++ (6.0)
REM o install cygwin packages
REM o get inno setup compiler http://www.jrsoftware.org/isdl.htm
REM o mkdir D:\Yudit
REM o cd D:\Yudit
REM o tar xfz yudit-2.7.8.tar.gz
REM o cd yudit-2.7.8
REM o cp Makefile.in Makefile
REM o make
REM o bin\wininst
REM o build package with iss using yudit.iss
REM
cd "%TOPLEVEL%\bin"
set TOPLEVEL="D:\yudit\yudit-2.7.8"
REM set INSTALLDIR="D:\usr\share\yudit"
set INSTALLDIR=D:\Yudit\Install
rm -rf %INSTALLDIR%
mkdir "%INSTALLDIR%"
mkdir "%INSTALLDIR%\bin"
mkdir "%INSTALLDIR%\data"
mkdir "%INSTALLDIR%\man"
mkdir "%INSTALLDIR%\man\man1"
mkdir "%INSTALLDIR%\fonts"
mkdir "%INSTALLDIR%\config"
mkdir "%INSTALLDIR%\src"

copy /b "%TOPLEVEL%\mytool\mytool.exe"  "%INSTALLDIR%\bin"
copy /b "%TOPLEVEL%\mytool\mytool.1"  "%INSTALLDIR%\man\man1"
copy /b "%TOPLEVEL%\uniprint\uniprint.exe"  "%INSTALLDIR%\bin"
copy /b "%TOPLEVEL%\uniprint\uniprint.1"  "%INSTALLDIR%\man\man1"
copy /b "%TOPLEVEL%\uniconv\uniconv.exe"  "%INSTALLDIR%\bin"
copy /b "%TOPLEVEL%\uniconv\uniconv.1"  "%INSTALLDIR%\man\man1"
copy /b "%TOPLEVEL%\gui\yudit.exe"  "%INSTALLDIR%\bin"
copy /b "%TOPLEVEL%\fonts\README.TXT"  "%INSTALLDIR%\fonts"
copy /b "%TOPLEVEL%\fonts\yudit.ttf"  "%INSTALLDIR%\fonts"
copy /b "%TOPLEVEL%\fonts\yudit.hex"  "%INSTALLDIR%\fonts"
REM copy /b "%TOPLEVEL%\fonts\unifont.hex"  "%INSTALLDIR%\fonts"
REM copy /b "%TOPLEVEL%\fonts\markus9x18.bdf"  "%INSTALLDIR%\fonts"
REM copy /b "%TOPLEVEL%\fonts\markus18x18ja.bdf"  "%INSTALLDIR%\fonts"

cd "%TOPLEVEL%\gui"
cp -Pr locale  "%INSTALLDIR%"
cd "%TOPLEVEL%"

cp -Pr doc  "%INSTALLDIR%"
copy /b "README.TXT"  "%INSTALLDIR%\doc"
copy /b "COPYING.TXT"  "%INSTALLDIR%\doc"
copy /b "yuditw.properties"  "%INSTALLDIR%\config\yudit.properties"

cd "%TOPLEVEL%\mytool\kmap"
copy /b  *.my  "%INSTALLDIR%\data"
copy /b  *.kmap  "%INSTALLDIR%\src"

cd "%TOPLEVEL%\mytool\mys"
copy /b  *.my  "%INSTALLDIR%\data"
copy /b  *.mys  "%INSTALLDIR%\src"

cd "%TOPLEVEL%\mytool\uni"
copy /b  *.my  "%INSTALLDIR%\data"

cd "%TOPLEVEL%\mytool\hwd"
copy /b  *.hwd  "%INSTALLDIR%\data"

cd "%TOPLEVEL%\bin"

REM cd %TOPLEVEL%
REM dir

REM
REM This is a replacement for YUDIT_DATA. On unix this is
REM /usr/share/yudit
REM -installdir is only for windows. for unix, yudit should be
REM recompiled.
REM copy /b  \Yudit\Medium\raghu.ttf  "%INSTALLDIR%\fonts"

REM %TOPLEVEL%\mytool\mytool.exe -installdir "%INSTALLDIR%"
