Difference between revisions of "Cross Compiling FileZilla 3 for Windows under Ubuntu or Debian GNU/Linux"

From FileZilla Wiki
Jump to navigationJump to search
m (Reverted edits by 177.69.37.125 (talk) to last revision by 140.112.174.176)
(minor updates)
Line 160: Line 160:
 
  make
 
  make
 
  strip src/interface/filezilla.exe
 
  strip src/interface/filezilla.exe
 +
 +
== 5 Principles for Inner Transformation at Work ==
 +
 +
People go to work to sustain themselves and produce value in the world. Yet work environments can also be stressful, filled with challenging responsibilities and personalities, and feel misaligned with our most deeply cherished values. Instead of sustaining us, the workplace can sometimes feel simply draining, and at worst, unwholesome for both ourselves and the world.
 +
 +
[[http://goodvillenews.com/5-Principles-for-Inner-Transformation-at-Work-TTklKV.html 5 Principles for Inner Transformation at Work]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== 10 Ways to Love Where You Live ==
 +
 +
Community is not just for extroverts.For thousands of years, our ancestors lived in barrios, hamlets, neighborhoods, and villages. Yet in the time since our parents and grandparents were young, privacy has become so valued that many neighborhoods are not much more than houses in proximity.
 +
 +
[[http://goodvillenews.com/10-Ways-to-Love-Where-You-Live-FT4yRy.html 10 Ways to Love Where You Live]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== A Young Girl with a Big Heart and an Old Man with a Lot of Flowers ==
 +
 +
When I was very young (about ten or eleven years old), I heard that our neighbor, a retired physician, had lost his wife after a long illness. He was such a dear soul, and he had the most spectacular gardens in his backyard. The whole neighborhood could see his glorious flowers from the street. The backyard was a profusion of daisies and roses, snapdragons and lilies, hyacinths and columbines. I used to think there wasnt a flower in the world that he didnt grow.
 +
 +
[[http://goodvillenews.com/A-Young-Girl-with-a-Big-Heart-and-an-Old-Man-with-a-Lot-of-F-lg9.html A Young Girl with a Big Heart and an Old Man with a Lot of Flowers]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== Nintendo Unveils Wii U Console ==
 +
 +
Nintendo Co. on Tuesday unveiled details of its Wii U videogame console to be launched late this year, featuring a tablet computer-like controller with touch-sensitive panel.
 +
 +
[[http://goodvillenews.com/Nintendo-Unveils-Wii-U-Console-mGg2T2.html Nintendo Unveils Wii U Console]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 +
 +
== Why Have Good When You Can Have Better? ==
 +
 +
As I look back on my life, I realize that every time I thought I was being rejected from something good, I was actually being re-directed to something better. Steve Maraboli
 +
 +
[[http://goodvillenews.com/Why-Have-Good-When-You-Can-Have-Better-PdMtIo.html Why Have Good When You Can Have Better?]]
 +
 +
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]

Revision as of 07:06, 27 July 2012

This documentation explains how to setup a build environment for FileZilla 3 for Windows and how to compile it under Ubuntu or Debian using MinGW. It will take less time and simple than Compiling FileZilla 3 under Windows.

OS version

Setting up the build environment

Ubuntu

Required packages

sudo apt-get install -y mingw32 make g++ libtool bzip2 automake gettext wx-common

Debian

Do works as root

su -

Required packages

apt-get install -y mingw32 make g++ libtool bzip2 automake gettext wx-common

Patch mingw32-runtime (only Debian)

If you are using Ubuntu, go to the next #Make libraries section. In Ubuntu, the patch is applied.

Because the version of mingw32-runtime in Debian 5 is broken - Thanks CodeSquid, patch mingw32-runtime package.

Get source package

cd /tmp
apt-get install dpkg-dev debhelper
apt-get source mingw32-runtime
cd mingw32-runtime-3.13/
debian/rules unpack-stamp

Patch snprintf bug

pushd build_dir/src/mingw-runtime-3.13-20070825-1/mingwex/gdtoa/
diff -u mingw_snprintf.c.org mingw_snprintf.c
--- mingw_snprintf.c.org        2009-09-21 02:41:31.000000000 +0000
+++ mingw_snprintf.c    2009-09-21 02:41:54.000000000 +0000
@@ -465,7 +465,7 @@
                                    len = LEN_LL;
                                  }
                                else
-                                 len = LEN_LL;
+                                 len = LEN_L;
                                goto fmtloop;
                        case 'L':
                                flag_ld++;
@@ -617,6 +617,7 @@
                                        break;
                                  case LEN_S:
                                        *(short*)ip = c;
+                                       break;
                                  case LEN_LL:
                                        *(long long*) ip = c;
                                        break;
popd

Build & Install

debian/rules build
debian/rules install

Copy new library

mv $/usr/i586-mingw32msvc/lib/libmingwex.a $/usr/i586-mingw32msvc/lib/libmingwex.a.old
cp debian/mingw32-runtime/usr/i586-mingw32msvc/lib/libmingwex.a $/usr/i586-mingw32msvc/lib/

Make libraries

Do works as normal user in Debian.

exit

Make working & install directory

Check available space of storage.

mkdir ~/mingw32
mkdir /tmp/fz3
cd /tmp/fz3

Setting up environment variables

export CFGPRE=~/mingw32
export CFGOPT="--prefix=$CFGPRE --host=i586-mingw32msvc --disable-shared --enable-static"

iconv

wget ftp://ftp.gnu.org/gnu/libiconv/libiconv-1.14.tar.gz
tar zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure $CFGOPT
make install clean
cd ..

libidn

wget ftp://alpha.gnu.org/gnu/libidn/libidn2-0.8.tar.gz
tar zxvf libidn2-0.8.tar.gz
cd libidn2-0.8
./configure $CFGOPT
make install clean
cd ..

libgpg-error

wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2
tar jxvf libgpg-error-1.10.tar.bz2
cd libgpg-error-1.10
./configure $CFGOPT --disable-nls
make install clean
cd ..

libgcrypt

wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2
tar jxvf libgcrypt-1.5.0.tar.bz2
cd libgcrypt-1.5.0
./configure $CFGOPT --disable-nls --disable-asm --with-gpg-error-prefix=$CFGPRE
make install clean
cd ..

GnuTLS

wget ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-3.0.19.tar.xz
tar Jxvf gnutls-3.0.19.tar.xz
cd gnutls-3.0.19
./configure $CFGOPT --disable-nls --disable-cxx --disable-guile --with-libgcrypt-prefix=$CFGPRE
make install clean
cd ..

wxWidgets

wget http://downloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.bz2
tar jxvf wxWidgets-2.8.12.tar.bz2
cd wxWidgets-2.8.12
mkdir compile
cd compile
../configure $CFGOPT --enable-unicode
make install clean
cd ../..

Compiling FileZilla 3

wget http://downloads.sourceforge.net/filezilla/FileZilla_3.5.3_src.tar.bz2
tar jxvf FileZilla_3.5.3_src.tar.bz2

cd filezilla-3.5.3
./autogen.sh
mkdir compile
cd compile

autogen.sh of FileZilla 3 use old libgnutls-config. GnuTLS does not use libgnutls-config anymore.

Dowload http://filezilla-project.org/codesquid/libgnutls-config to $CFGPRE/bin. Edit prefix value.

wget -O $CFGPRE/bin/libgnutls-config http://filezilla-project.org/codesquid/libgnutls-config

echo $CFGPRE
/home/fz/mingw32 # remember the path

vi $CFGPRE/bin/libgnutls-config
prefix=/home/fz/mingw32 # edit this line.

chmod +x $CFGPRE/bin/libgnutls-config

Configure and builld.

CFLAGS="-I$CFGPRE/include" CXXFLAGS="-I$CFGPRE/include" LDFLAGS="-L$CFGPRE/lib" ../configure $CFGOPT --with-wx-prefix=$CFGPRE --with-libgnutls-prefix=$CFGPRE

make
strip src/interface/filezilla.exe

5 Principles for Inner Transformation at Work

People go to work to sustain themselves and produce value in the world. Yet work environments can also be stressful, filled with challenging responsibilities and personalities, and feel misaligned with our most deeply cherished values. Instead of sustaining us, the workplace can sometimes feel simply draining, and at worst, unwholesome for both ourselves and the world.

[5 Principles for Inner Transformation at Work]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

10 Ways to Love Where You Live

Community is not just for extroverts.For thousands of years, our ancestors lived in barrios, hamlets, neighborhoods, and villages. Yet in the time since our parents and grandparents were young, privacy has become so valued that many neighborhoods are not much more than houses in proximity.

[10 Ways to Love Where You Live]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

A Young Girl with a Big Heart and an Old Man with a Lot of Flowers

When I was very young (about ten or eleven years old), I heard that our neighbor, a retired physician, had lost his wife after a long illness. He was such a dear soul, and he had the most spectacular gardens in his backyard. The whole neighborhood could see his glorious flowers from the street. The backyard was a profusion of daisies and roses, snapdragons and lilies, hyacinths and columbines. I used to think there wasnt a flower in the world that he didnt grow.

[A Young Girl with a Big Heart and an Old Man with a Lot of Flowers]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Nintendo Unveils Wii U Console

Nintendo Co. on Tuesday unveiled details of its Wii U videogame console to be launched late this year, featuring a tablet computer-like controller with touch-sensitive panel.

[Nintendo Unveils Wii U Console]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Why Have Good When You Can Have Better?

As I look back on my life, I realize that every time I thought I was being rejected from something good, I was actually being re-directed to something better. Steve Maraboli

[Why Have Good When You Can Have Better?]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]