[Box Backup] HOWTO: Boxi compilation from SVN

Achim boxbackup at boxbackup.org
Tue Aug 4 20:53:12 BST 2009


* * * Cygwin * * *
Install Cygwin with these packages
* Devel/autoconf
* Devel/automake
* Devel/cvs
* Devel/gcc-mingw
* Devel/gcc-mingw-core
* Devel/gcc-mingw-g++
* Devel/gettext-devel
* Devel/libtool
* Devel/make
* Devel/mingw-runtime
* Devel/patchutils
* Devel/pkg-config
* Devel/subversion
* Lib/libxml2
* Lib/libxslt
* Mingw/mingw-zlib
* Perl/Perl
* Web/wget


* * * PCRE * * *
cd /usr/src
wget http://prdownloads.sourceforge.net/pcre/pcre-6.3.tar.bz2?download
tar xjvf pcre-6.3.tar.bz2
cd pcre-6.3
export CFLAGS="-mno-cygwin"
./configure
make
cp .libs/libpcre.a .libs/libpcreposix.a /lib/mingw

cp pcreposix.h /usr/include/mingw


Cygwin package introduces GPL requirement because of cygwin1.dll 
dependency, see discussion with Chris on mailing list


* * * Zlib * * *
Mingw/mingw-zlib from Cygwin eliminates need to self-compile

Cygwin package introduces GPL requirement because of cygwin1.dll 
dependency, see discussion with Chris on mailing list


* * * OpenSSL * * *
cd /usr/src
wget http://www.openssl.org/source/openssl-0.9.7i.tar.gz
tar xzvf openssl-0.9.7i.tar.gz
cd openssl-0.9.7i
./Configure --prefix=/usr/i686-pc-mingw32/ mingw 
make
make install

Cygwin package introduces GPL requirement because of cygwin1.dll 
dependency, see discussion with Chris on mailing list


* * * CPPUnit * * *
cd /usr/src
wget
http://downloads.sourceforge.net/project/cppunit/cppunit/1.12.1/cppunit-1.12.1.tar.gz?use_mirror=puzzle
tar xvzf cppunit-1.12.1.tar.gz
cd cppunit-1.12.1
./configure CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin"

make && make install

Cygwin package introduces GPL requirement because of cygwin1.dll 
dependency, see discussion with Chris on mailing list


* * * wxWidgets 2.8.10 * * *
cd /usr/src
wget
http://downloads.sourceforge.net/project/wxwindows/wxAll/2.8.10/wxWidgets-2.8.10.tar.gz?use_mirror=puzzle
tar xvzf wxWidgets-2.8.10.tar.gz
cd wxWidgets-2.8.10.tar.gz

change setup.h.in to have

#define wxUSE_STACKWALKER   1
#define wxUSE_FSVOLUME      1


choose one of the following configuration sets, both work:

Achim
====================================
export CFLAGS="-mno-cygwin -O4" CXXFLAGS="-mno-cygwin -O4"
CPPFLAGS="-mno-cygwin" LDFLAGS="-mno-cygwin -mwindows"

./configure --enable-unicode --enable-debug  --disable-shared \
	--enable-debug_gdb --with-msw \
	--without-expat \
	--disable-precomp-headers 
====================================


Chris Wilson
====================================
./configure --enable-unicode --enable-debug --enable-shared \
	--disable-static --enable-debug_gdb --with-msw \
	--without-expat --target=i686-pc-mingw32 \
	CC="gcc -mno-cygwin -mthreads" \
	CXX="g++ -mno-cygwin -mthreads"
====================================


make && make install



* * * Boxi & Box Backup * * *
cd /usr/src

svn co https://svn.sourceforge.net/svnroot/boxi/trunk/boxi

cd boxi
./make-image-headers.pl
./configure-mingw.sh 
[remove all references to wxchart from Makefile]
make

in case you don't remove wxchart from the Makefile, the following error
will occur during make:

make[2]: Leaving directory `/usr/src/boxi/src'
Making all in wxchart
make[2]: Entering directory `/usr/src/boxi/wxchart'
Makefile:8: *** missing separator.  Stop.
make[2]: Leaving directory `/usr/src/boxi/wxchart'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/boxi'
make: *** [all] Error 2

You will find the resulting Boxi.exe in /usr/src/boxi/src/.libs/boxi.exe.
Don't forget to add the required DLLs to the directory
(cygcppunit-1-12-1.dll, mgwz.dll, mingwm10.dll) before you run boxi.exe,
otherwise it will complain (-:

The .exe-file itself is about 60MB, but can be reduced via "strip boxi.exe"
and further shrank with a packer such as UPX [1]. As you can see from my
builds, the total director clocks in at under 3MB

Have fun building Boxi, and please contribute by reporting back bugs and
feature request!

[1] <http://upx.sourceforge.net/>



More information about the Boxbackup mailing list