Author Topic: How to Port Wine for iPhone or arm  (Read 4183 times)

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: How to Port Wine for iPhone or arm
« Reply #15 on: August 20, 2011, 10:08:42 pm »
One thing i tried compiling took up like 50mb just for the source code. One c file was like 140kb. Lol.

BooCocky

  • Leader
  • Hero Member
  • *****
  • Posts: 875
  • Reputation: 82
  • All your base are belong to ininjas
  • Badges:
  • Computers: Dell Inspirion
  • iDevices: ipod shuffle
Re: How to Port Wine for iPhone or arm
« Reply #16 on: August 22, 2011, 07:18:43 am »

 That trick you used with the push/pop to mov could be useful in another of my projects, mono.



I was actually wrong about this.  I modified OP appropriately.   It appears to a problem with arm processors.  Still havent quite figured out how I shoud set LIBEXT and DLLEXT.  Somthing funny happend yesterday when I set it to dylib.    Hard to explain but libwine was a little different, and Wine would give me "bad instruction" when I ran it.   So I looked at the libwine binary and noticed it has the path set as @@executablepath/../lib/libwine.1.dylib so I changed it to /usr/lib/libwine.1.dylyb and got "BAD CPU type in executable".   So now, after the correct port.c file fix, Im keeping fingers crossed it works this time.

BooCocky

  • Leader
  • Hero Member
  • *****
  • Posts: 875
  • Reputation: 82
  • All your base are belong to ininjas
  • Badges:
  • Computers: Dell Inspirion
  • iDevices: ipod shuffle
Re: How to Port Wine for iPhone or arm
« Reply #17 on: April 08, 2012, 03:11:12 pm »
wow 33 week old thread,  well in that time Wine-1.5.1 has been released and seems to have more support for arm.  Configure file is messed up though, unless I define the build=arm then it will assume it is arm-apple-darwin11.0.0 and for some reason it cant find the headers.  Which is weird,  so if I define it just arm it finds the headers but the compiled code wont execute it always gives "illegal instruction 4" error.  So I think I am either wrong about modifying loader.c or just need to fix the headers part in configure file.  I dont see why this is such a pain,  I know wine works for arm because I have it on my n900

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4540
  • Reputation: 168
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: How to Port Wine for iPhone or arm
« Reply #18 on: April 08, 2012, 05:30:40 pm »
what if you leave it as arm-apple-darwin but say CFLAGS=-I/usr/include ?

Ginger

  • Dev Team Member
  • Hero Member
  • *****
  • Posts: 610
  • Reputation: 6
    • PwnDevTeam!
  • Computers: Forgot model but Dell Inspirion Tower (6gb ram, Quad core, 1tb hdd, 1gb graphics)
  • iDevices: iPod Touch 4G 8GB And iPod Nano 1G 1Gb
Re: How to Port Wine for iPhone or arm
« Reply #19 on: April 09, 2012, 03:43:39 am »
I downloaded the 1.5.1 source code last night and the best I've found of configuring it is
./configure --build=arm --without-pthread --without-freetype

I do have freetype installed though :S using that gets me to 'make' but then there's missing identifiers :(

Don't like seeing ads? Click here to register!

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4540
  • Reputation: 168
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: How to Port Wine for iPhone or arm
« Reply #20 on: April 09, 2012, 08:36:54 am »
I keep on getting this sense that it would be easier to start all over from scratch with all the iOS ports.  A port of glibc would be useful at the very least. 

BooCocky

  • Leader
  • Hero Member
  • *****
  • Posts: 875
  • Reputation: 82
  • All your base are belong to ininjas
  • Badges:
  • Computers: Dell Inspirion
  • iDevices: ipod shuffle
Re: How to Port Wine for iPhone or arm
« Reply #21 on: April 28, 2012, 04:07:45 pm »
I cant get the "wine" executable to work but libwine.dylib is usable.  Maybe I can create a wrapper in python using ctypes? When I call _wine_init() using ctypes I get an integer. 

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: How to Port Wine for iPhone or arm
« Reply #22 on: April 29, 2012, 09:22:48 pm »
A pointer?

BooCocky

  • Leader
  • Hero Member
  • *****
  • Posts: 875
  • Reputation: 82
  • All your base are belong to ininjas
  • Badges:
  • Computers: Dell Inspirion
  • iDevices: ipod shuffle
Re: How to Port Wine for iPhone or arm
« Reply #23 on: April 30, 2012, 08:45:37 am »
OMFG!!!








I gotta go clear my head,  then ill put it all together and upload the files when my heart stops pounding

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4540
  • Reputation: 168
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: How to Port Wine for iPhone or arm
« Reply #24 on: April 30, 2012, 09:33:16 am »
EPIC!  Well done man!  I can't wait to see this on the repo.  :D  What flags do you use to configure wine? 

Don't like seeing ads? Click here to register!

BooCocky

  • Leader
  • Hero Member
  • *****
  • Posts: 875
  • Reputation: 82
  • All your base are belong to ininjas
  • Badges:
  • Computers: Dell Inspirion
  • iDevices: ipod shuffle
Re: How to Port Wine for iPhone or arm
« Reply #25 on: April 30, 2012, 11:16:53 am »
Same ones I posted in OP, I edited loader.c differently too.  But the real fix was to edit main.c in /winesrc/loader and trick it into compiling the linux function instead of the apple one.  Also the shared-libraries have to end in so not dylib for some reason, or else it looks for libwine.dylib in @@executablepath instead of /usr.  If that wasnt the case I could upload it right now,  so I have to recompile and then upload.  But it WORKS!  it really does,  it should be ready in about 6 hours,  the DLLs are what take so long to compile.  There is a lot of them.  Ill edit OP in a bit so I can show exactly what I did.  This is with 1.3.9 btw

Ironman

  • Administrator
  • Hero Member
  • *****
  • Posts: 5152
  • Reputation: 252
  • Badges:
  • Computers: ASUS UL50VT
  • iDevices: iPhone 5, iPhone 4S, iPhone 4, iPhone 3GS
Re: How to Port Wine for iPhone or arm
« Reply #26 on: April 30, 2012, 07:00:39 pm »
 O.o
Oh WOW!!!
Click for How to Add Our Repo
If you're going to ask questions....
At least make them good ones.

Knowledge is the one thing that can never be taken from you

Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3536
  • Reputation: 91
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: How to Port Wine for iPhone or arm
« Reply #27 on: April 30, 2012, 09:09:29 pm »
I want to give you a big hug right now but that would be wierd I'll just praise you as a god
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork

LankAsif

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2406
  • Reputation: 90
  • Forum pride 8)
  • Badges:
  • Computers: i7 with bits and pieces
  • iDevices: iPod Touch 1G (Basically storage for iNinja tools), iPhone 5
Re: How to Port Wine for iPhone or arm
« Reply #28 on: May 01, 2012, 12:40:01 am »
Congratulations Boo!!!! You must be so buzzed atm.
Max props man ;)

Education is never achieved by wise men. it is only believed to have been achieved by fools

BooCocky

  • Leader
  • Hero Member
  • *****
  • Posts: 875
  • Reputation: 82
  • All your base are belong to ininjas
  • Badges:
  • Computers: Dell Inspirion
  • iDevices: ipod shuffle
Re: How to Port Wine for iPhone or arm
« Reply #29 on: May 01, 2012, 01:29:00 pm »
Oh no,  just one more small hoop to jump through.  The ntdll.dll is giving me trouble compiling,  I didnt think that would be an issue.  Couple things I can do though to trick it or get it to compile anyways.  Everything else is working though.  Alot of programs rely on that dll though.