chippo
January 23rd, 2007, 12:18 AM
And yeah, we need a win32 compiled update ! plz*confused*
I've seen from time to time people asking for windoze legacy-2 builds. Initially, I thought that all the windoze users were just lazy and didn't feel like compiling legacy-2 for themselves.
After some investigation, I now think that the situation is:
- Legacy-2 needs to be compiled with a C++ compiler supporting gcc-4-like features.
- The only supported windoze compiler for legacy is MinGW.
- MinGW only officially supports gcc-3.
So, I figured it would be fun to show up the M$ kiddies (and to get more testers), and compile them a windoze legacy-2 from my loonix box, all from SVN/CVS sources. Anyway, just getting a MinGW loonix->windoze cross compiler was a total NIGHTMARE (took 3 days), but finally I succeeded. Looky here:$ i586-pc-mingw32-g++ -v
Using built-in specs.
Target: i586-pc-mingw32
Configured with: ../gcc/configure --target=i586-pc-mingw32 --disable-win32-registry --enable-languages=c,c++
Thread model: win32
gcc version 4.3.0 20070121 (experimental)
However, I am an age away from my goal (providing you with an exe). I've still gotta compile several windoze libraries like SDL, and work on why I can't compile mingw from CVS sources. I need to install wine so that I can test my windoze 'hello world' app (yeah, I know it compiles and links correctly, but I don't even know whether it runs). See:chippo@chipnew:/tmp$ cat test.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
}
chippo@chipnew:/tmp$ i586-pc-mingw32-g++ -I/usr/local/mingw/include test.cpp -o test.exe
chippo@chipnew:/tmp$ file test.exe
test.exe: PE executable for MS Windows (console) Intel 80386 32-bit
chippo@chipnew:/tmp$ ls -l test.exe
-rwxr-xr-x 1 chippo chippo 4783333 2007-01-23 09:36 test.exeWow! Almost 5M!? Something has gone horribly wrong in the world of computing since I bought Stroustrup's book and the Zortech C++ compiler (for DOS) 20 years ago.
Anyone know whether it is possible (theoretically) to run a windoze SDL-opengl app on top of wine on top of loonix?
So, why am I telling you about my partial success then? Well, it just occurred to me that while I'm sure that my procedure will work on another loonix box, it should work just fine under windoze and a unix-ish shell (cygwin, msys, mks-ksh) and a older (gcc-3, say) C compiler.
While I _think_ the following procedure should work on windoze, it's only been tested on ubuntu dapper. It's been designed (and tested) to be cut'n'pasted into a shell (as a non-root user):mkdir mingw-cross
cd mingw-cross
# To checkout all sources from SVN/CVS
mkdir binutils
cd binutils
cvs -z9 -d :pserver:anoncvs@cygwin.com:/cvs/src login
{enter "anoncvs" as the password}
cvs -z9 -d :pserver:anoncvs@cygwin.com:/cvs/src co binutils
cd ..
svn checkout svn://gcc.gnu.org/svn/gcc/trunk gcc
mkdir mingw
cd mingw
cvs -z9 -d:pserver:anonymous@mingw.cvs.sourceforge.net:/cvsroot/mingw co MinGW doc home htdocs msys portmaker ports runtime scripts utils w32api xscripts
cd ..
svn checkout svn://scm.gforge.inria.fr/svn/mpfr/trunk mpfr
# To update all sources
# cd binutils/src
# cvs -z9 -d :pserver:anoncvs@sourceware.org:/cvs/src update -P
# cd ../..
#
# cd gcc
# svn update
# cd ..
#
# cd mingw
# cvs -z9 -d:pserver:anonymous@mingw.cvs.sourceforge.net:/cvsroot/mingw update -P
# cd ..
#
# cd mpfr
# svn update
# cd ..
#
# NOTE, to update gmp requires websurfing the home page and using your brain :-(.
# Still can't get CVS version of mingw to work so...
wget http://heanet.dl.sourceforge.net/sourceforge/mingw/w32api-3.8-src.tar.gz
wget http://heanet.dl.sourceforge.net/sourceforge/mingw/mingw-runtime-3.11-20061202-1-src.tar.gz
tar xzvf w32api-3.8-src.tar.gz
tar xzvf mingw-runtime-3.11-20061202-1-src.tar.gz
wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.1.tar.bz2
tar xjvf gmp-4.2.1.tar.bz2
mkdir gmp-out
cd gmp-out
../gmp-4.2.1/configure
make
sudo make install
cd ..
cd mpfr
autoreconf -i
cd ..
mkdir mpfr-out
cd mpfr-out
../mpfr/configure
make
sudo make install
cd ..
mkdir binutils-out
cd binutils-out
../binutils/src/configure --target=i586-pc-mingw32
make
sudo make install
cd ..
sudo mkdir /usr/local/i586-pc-mingw32/include
sudo cp -r w32api-3.8/include/* /usr/local/i586-pc-mingw32/include
sudo cp -r mingw-runtime-3.11/include/* /usr/local/i586-pc-mingw32/include
mkdir gcc-out
cd gcc-out
../gcc/configure --target=i586-pc-mingw32 --disable-win32-registry --enable-languages=c
make
sudo make install
cd ..
mkdir w32api-out
cd w32api-out
../w32api-3.8/configure --prefix=/usr/local/i586-pc-mingw32 --host=i586-pc-mingw32
make
sudo make install
cd ..
mkdir runtime-out
cd runtime-out
../mingw-runtime-3.11/configure --prefix=/usr/local/i586-pc-mingw32 --host=i586-pc-mingw32
make CFLAGS=-I/usr/local/i586-pc-mingw32/include
sudo make install
cd ..
# gotta make gcc again, and now also g++
rm -rf gcc-out
mkdir gcc-out
cd gcc-out
../gcc/configure --target=i586-pc-mingw32 --disable-win32-registry --enable-languages=c,c++
make
sudo make install
cd ..
# Don't forget to do something with these two files.
#wget http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
#wget http://www.libsdl.org/extras/win32/common/opengl-devel.tar.gz
"Well, that looks awfully simple. How can you call that a nightmare?" Well, China, try do it yourself _without_ looking at my instructions (but except for *this* page, you may use the interweb) and I'll bet it takes you at least 48 hours.
Now, say, I eventually manage to get a Legacy2.exe before anyone else, is there some sane place where I can put it up? And what CPU specific optimisations should I use? I assume that a modern version of bloatdoze won't even run on a 386 or 486, so that is why I chose i586 for my test run. And should I statically or dynamically link with SDL? And what version of SDL should I use (naturally I'm currently trying the SVN sources)?
Cheers,
chippenbronx
I've seen from time to time people asking for windoze legacy-2 builds. Initially, I thought that all the windoze users were just lazy and didn't feel like compiling legacy-2 for themselves.
After some investigation, I now think that the situation is:
- Legacy-2 needs to be compiled with a C++ compiler supporting gcc-4-like features.
- The only supported windoze compiler for legacy is MinGW.
- MinGW only officially supports gcc-3.
So, I figured it would be fun to show up the M$ kiddies (and to get more testers), and compile them a windoze legacy-2 from my loonix box, all from SVN/CVS sources. Anyway, just getting a MinGW loonix->windoze cross compiler was a total NIGHTMARE (took 3 days), but finally I succeeded. Looky here:$ i586-pc-mingw32-g++ -v
Using built-in specs.
Target: i586-pc-mingw32
Configured with: ../gcc/configure --target=i586-pc-mingw32 --disable-win32-registry --enable-languages=c,c++
Thread model: win32
gcc version 4.3.0 20070121 (experimental)
However, I am an age away from my goal (providing you with an exe). I've still gotta compile several windoze libraries like SDL, and work on why I can't compile mingw from CVS sources. I need to install wine so that I can test my windoze 'hello world' app (yeah, I know it compiles and links correctly, but I don't even know whether it runs). See:chippo@chipnew:/tmp$ cat test.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
}
chippo@chipnew:/tmp$ i586-pc-mingw32-g++ -I/usr/local/mingw/include test.cpp -o test.exe
chippo@chipnew:/tmp$ file test.exe
test.exe: PE executable for MS Windows (console) Intel 80386 32-bit
chippo@chipnew:/tmp$ ls -l test.exe
-rwxr-xr-x 1 chippo chippo 4783333 2007-01-23 09:36 test.exeWow! Almost 5M!? Something has gone horribly wrong in the world of computing since I bought Stroustrup's book and the Zortech C++ compiler (for DOS) 20 years ago.
Anyone know whether it is possible (theoretically) to run a windoze SDL-opengl app on top of wine on top of loonix?
So, why am I telling you about my partial success then? Well, it just occurred to me that while I'm sure that my procedure will work on another loonix box, it should work just fine under windoze and a unix-ish shell (cygwin, msys, mks-ksh) and a older (gcc-3, say) C compiler.
While I _think_ the following procedure should work on windoze, it's only been tested on ubuntu dapper. It's been designed (and tested) to be cut'n'pasted into a shell (as a non-root user):mkdir mingw-cross
cd mingw-cross
# To checkout all sources from SVN/CVS
mkdir binutils
cd binutils
cvs -z9 -d :pserver:anoncvs@cygwin.com:/cvs/src login
{enter "anoncvs" as the password}
cvs -z9 -d :pserver:anoncvs@cygwin.com:/cvs/src co binutils
cd ..
svn checkout svn://gcc.gnu.org/svn/gcc/trunk gcc
mkdir mingw
cd mingw
cvs -z9 -d:pserver:anonymous@mingw.cvs.sourceforge.net:/cvsroot/mingw co MinGW doc home htdocs msys portmaker ports runtime scripts utils w32api xscripts
cd ..
svn checkout svn://scm.gforge.inria.fr/svn/mpfr/trunk mpfr
# To update all sources
# cd binutils/src
# cvs -z9 -d :pserver:anoncvs@sourceware.org:/cvs/src update -P
# cd ../..
#
# cd gcc
# svn update
# cd ..
#
# cd mingw
# cvs -z9 -d:pserver:anonymous@mingw.cvs.sourceforge.net:/cvsroot/mingw update -P
# cd ..
#
# cd mpfr
# svn update
# cd ..
#
# NOTE, to update gmp requires websurfing the home page and using your brain :-(.
# Still can't get CVS version of mingw to work so...
wget http://heanet.dl.sourceforge.net/sourceforge/mingw/w32api-3.8-src.tar.gz
wget http://heanet.dl.sourceforge.net/sourceforge/mingw/mingw-runtime-3.11-20061202-1-src.tar.gz
tar xzvf w32api-3.8-src.tar.gz
tar xzvf mingw-runtime-3.11-20061202-1-src.tar.gz
wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.1.tar.bz2
tar xjvf gmp-4.2.1.tar.bz2
mkdir gmp-out
cd gmp-out
../gmp-4.2.1/configure
make
sudo make install
cd ..
cd mpfr
autoreconf -i
cd ..
mkdir mpfr-out
cd mpfr-out
../mpfr/configure
make
sudo make install
cd ..
mkdir binutils-out
cd binutils-out
../binutils/src/configure --target=i586-pc-mingw32
make
sudo make install
cd ..
sudo mkdir /usr/local/i586-pc-mingw32/include
sudo cp -r w32api-3.8/include/* /usr/local/i586-pc-mingw32/include
sudo cp -r mingw-runtime-3.11/include/* /usr/local/i586-pc-mingw32/include
mkdir gcc-out
cd gcc-out
../gcc/configure --target=i586-pc-mingw32 --disable-win32-registry --enable-languages=c
make
sudo make install
cd ..
mkdir w32api-out
cd w32api-out
../w32api-3.8/configure --prefix=/usr/local/i586-pc-mingw32 --host=i586-pc-mingw32
make
sudo make install
cd ..
mkdir runtime-out
cd runtime-out
../mingw-runtime-3.11/configure --prefix=/usr/local/i586-pc-mingw32 --host=i586-pc-mingw32
make CFLAGS=-I/usr/local/i586-pc-mingw32/include
sudo make install
cd ..
# gotta make gcc again, and now also g++
rm -rf gcc-out
mkdir gcc-out
cd gcc-out
../gcc/configure --target=i586-pc-mingw32 --disable-win32-registry --enable-languages=c,c++
make
sudo make install
cd ..
# Don't forget to do something with these two files.
#wget http://www.libsdl.org/extras/win32/common/directx-devel.tar.gz
#wget http://www.libsdl.org/extras/win32/common/opengl-devel.tar.gz
"Well, that looks awfully simple. How can you call that a nightmare?" Well, China, try do it yourself _without_ looking at my instructions (but except for *this* page, you may use the interweb) and I'll bet it takes you at least 48 hours.
Now, say, I eventually manage to get a Legacy2.exe before anyone else, is there some sane place where I can put it up? And what CPU specific optimisations should I use? I assume that a modern version of bloatdoze won't even run on a 386 or 486, so that is why I chose i586 for my test run. And should I statically or dynamically link with SDL? And what version of SDL should I use (naturally I'm currently trying the SVN sources)?
Cheers,
chippenbronx