Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  compiling a win32 sim from linux
« previous next »
  • Print
Pages: [1] 2

Author Topic: compiling a win32 sim from linux  (Read 4257 times)

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
compiling a win32 sim from linux
« on: April 03, 2007, 09:24:36 AM »
I'm trying to follow the wiki's instructions on how to compile a win32 simulator. I've installed mingw32, I've rebuilt SDL and put it in /usr/local/sdl32, and put that directory in my path. I do the regular make and make install, but when it's finished it's still a linux sim, even after I do the stripping commands at the end.

What am I missing?
thanks ;)
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: compiling a win32 sim from linux
« Reply #1 on: April 03, 2007, 09:27:45 AM »
You've installed a linux cross compiler on your PC?
Logged

Read The Manual Please

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: compiling a win32 sim from linux
« Reply #2 on: April 03, 2007, 12:38:23 PM »
I don't quite get what you're asking. I use linux as my OS, so it is easiest for it to be my build environment. When I go to build the sim it says it is using gcc 4.x.x , do I need a different cross compiler?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: compiling a win32 sim from linux
« Reply #3 on: April 03, 2007, 12:49:00 PM »
when building for any other platform than your native one you need a cross compiler. Like you need a cross compiler for building Rockbox you need a cross compiler when building the sim for windows from within linux.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: compiling a win32 sim from linux
« Reply #4 on: April 03, 2007, 01:09:07 PM »
i see, is that the mingw32 package that I installed following the instructions on the wiki?
how do i get the configure script to use mingw32 instead of gcc?
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: compiling a win32 sim from linux
« Reply #5 on: April 04, 2007, 03:14:46 AM »
It might be as simple as editing the Makefile that the configure script generates, and replacing the value of the CC= with the mingw32 binary instead of gcc. Or it might not. I've never tried this so I'm not sure.
Logged

Read The Manual Please

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: compiling a win32 sim from linux
« Reply #6 on: April 04, 2007, 05:17:35 AM »
You will probably also need to cross-compile libSDL and install that locally.
Logged

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: compiling a win32 sim from linux
« Reply #7 on: April 04, 2007, 08:54:23 AM »
thanks guys
Godeater: will try that later today, hoping it's that simple
linuxstb: thanks for looking out for me, I've already compiled SDL with mingw32  ;)
Logged

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: compiling a win32 sim from linux
« Reply #8 on: April 04, 2007, 08:54:32 PM »
Hey guys, I got me a windows sim. Turned out that when I read the part about setting the path to the win32 style SDL i forgot to add 'bin' at the end of PATH=/usr/local/sdl32/ .
Reminds me of when I was doing HTML in high school and I would spend an hour realizing I forgot a quotation mark.

Thanks for all the help ;)
Logged

Offline Nate!

  • Member
  • *
  • Posts: 235
Re: compiling a win32 sim from linux
« Reply #9 on: April 05, 2007, 11:24:31 AM »
evilg123: what dev environment are you using? Linux natively or Windows/VMWare/Debian, Cygwin, CoLinux,etc?

Would you mind putting the steps in a wiki page?  I can edit with screenshots after I try it out.  

I wanted to know how to do this a while back, but didn't know how to go about installing the cross compiler or which one to install.  Cygwin is considerably slower when compiling builds than VMWare.  I'd rather use the latter but like the Win32 sim convenience.  

Mostly I just patch and compile to update rockbox and work on WPSs.

Thanks in advanced.
Logged

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: compiling a win32 sim from linux
« Reply #10 on: April 05, 2007, 04:15:42 PM »
Hey Nate!,
to be specific I use linux to compile my builds natively, I use the kubuntu 6.10 (edgy eft) distro ( (k)ubuntu is based on debian).
 I just use the rockboxdev.sh script to get the required compilers etc.

Personally I think that if you're serious about compiling you should be running linux, it is the fastest, and can compile linux and win32 sims.
VMware is faster than Cygwin but as you stated, it can't make a win32 sim (as far as I know).

There is a wiki page on how to compile the UI simulator with  a section on how to compile a win32 sim from linux
check it out here

if you're wondering which compiler you need to make a win32 sim from linux, first you need to install mingw32, then you need to build SDL with mingw32 and install it in somewhere other than /usr/bin (assuming this is where the linux SDL is installed) I use /usr/local/sdl32. This is done by typing

 ./configure --host=i586-mingw32msvc --prefix=/usr/local/sdl32

after that's done, cd to your build dir as usual, but before you run configure you need the new sdl in you path
so:
PATH=/path to new sdl/bin:$PATH    for me this is         PATH=/usr/local/sdl32/bin:$PATH

after configure and make and make install is done then you need to run the following
find -name "*rock"         -exec i586-mingw32msvc-strip "{}" ";"
find -name "*codec"        -exec i586-mingw32msvc-strip "{}" ";"
find -name "rockboxui.exe" -exec i586-mingw32msvc-strip "{}" ";"

and then you're done! you have a nifty win32 simulator.
hope that helps ;)
« Last Edit: April 05, 2007, 04:18:01 PM by evilg123 »
Logged

Offline Nate!

  • Member
  • *
  • Posts: 235
Re: compiling a win32 sim from linux
« Reply #11 on: April 05, 2007, 05:15:02 PM »
I'm thinking that if I do follow all of the steps that you've described in a VMWare/Debian setup, I should end up with the same results.

I can't commandeer the family pc.  My wife and daughter would kill me.  Can't go dying over me trying to compile a Win32 sim.   :D

No seriously, I want to ease slowly into the Linux world.  Just haven't taken the plunge yet.

Thanks for you advice.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: compiling a win32 sim from linux
« Reply #12 on: April 05, 2007, 05:27:46 PM »
If you install the appropriate packages VMWare should work.
Logged

Offline lights0ut

  • Artist
  • Member
  • *
  • Posts: 382
Re: compiling a win32 sim from linux
« Reply #13 on: April 05, 2007, 07:39:33 PM »
Quote from: Llorean on April 05, 2007, 05:27:46 PM
If you install the appropriate packages VMWare should work.

you're right, I suppose you could apt-get from VMWare couldn't you. ::)
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: compiling a win32 sim from linux
« Reply #14 on: April 05, 2007, 07:42:57 PM »
The apt-get is a little... unreliable. But in *theory* you could manage it, yes.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  compiling a win32 sim from linux
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.101 seconds with 14 queries.