The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 28, 2021, 09:36:43 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Building an OS X Bundled App
« previous next »
Pages: [1] 2 Print
Author Topic: Building an OS X Bundled App  (Read 9084 times)
daveesq
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Building an OS X Bundled App
« on: February 19, 2008, 09:08:08 pm »

Hello all.

I was just wondering whether anyone could tell me how to build UQM as an OS X bundled application (.app).  I've looked through the svn repository, but I didn't see any building instructions, much less platform-specific ones.  Essentially, I just want to know what the process is for building the OS X release.

Thanks (especially for everyone's hard work in making UQM as great as it is),
David
Logged
0xDEC0DE
*Many bubbles*
***
Offline Offline

Posts: 175



View Profile WWW
Re: Building an OS X Bundled App
« Reply #1 on: February 19, 2008, 09:53:27 pm »

The build scripts support OSX directly.  So from the trunk directory:

Code:
./build.sh uqm install

There is no Step 2.

Also see here.
« Last Edit: February 19, 2008, 10:01:59 pm by 0xDEC0DE » Logged

"I’m not a robot like you. I don’t like having disks crammed into me… unless they’re Oreos, and then only in the mouth."  --Fry
daveesq
Zebranky food
*
Offline Offline

Posts: 2



View Profile
Re: Building an OS X Bundled App
« Reply #2 on: February 19, 2008, 10:01:37 pm »

Well I'll be dipped!   Embarrassed

Thanks!!!
Logged
Michael Martin
Core Team
*Smell* controller
*****
Offline Offline

Posts: 387



View Profile
Re: Building an OS X Bundled App
« Reply #3 on: February 24, 2008, 06:59:12 am »

I've just committed a draft of the steps I had to go through to make it build on my own Mac system, so hopefully this won't be as much of a problem in the future.

Nic, as the resident expert, feel free to correct any errors I've made  Cool
Logged
C. Bob
Zebranky food
*
Offline Offline

Posts: 43



View Profile
Re: Building an OS X Bundled App
« Reply #4 on: April 24, 2008, 10:00:40 am »

I want to try rebuilding UQM, so I can test out ship performance changes; since there's no moddability yet, it's necessary.

At any rate, build.sh is completely resistant to use! It claims "permission denied" whenever I try to do anything with it.

An average log (altered for personal details):
Ascent:~ anonymous$ /uqm-0.6.2/sc2/build/unix/build.sh uqm install
-bash: /uqm-0.6.2/sc2/build/unix/build.sh: Permission denied
Ascent:~ anonymous$ su
Password:
Ascent:/Users/anonymous root# /uqm-0.6.2/sc2/build/unix/build.sh uqm install
su: /uqm-0.6.2/sc2/build/unix/build.sh: Permission denied

I've placed uqm-0.6.0-content.uqm and uqm-0.6.2 in the hard drive's root directory.  Is that correct?

Please let me know what I'm doing wrong; I'm a complete amateur to Unix-based things (and hope to largely stay that way; it's not my kinda world), but learning enough to compile UQM would be great. I like tweaking the idea of changing ship stats and the like, and it'd be cool. Some future UQM version might make it easier, but well.

- Bob
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Building an OS X Bundled App
« Reply #5 on: April 24, 2008, 06:25:29 pm »

There is no need to put anything in your hard drive's root directory.
I suspect that build.sh does not have the execute bit set. I don't know why though; where did you get the source from?
In the directory containing the UQM source, do "chmod 755 build.sh". That should fix the execute bit.
Then just follow the instructions from INSTALL.macosx.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
C. Bob
Zebranky food
*
Offline Offline

Posts: 43



View Profile
Re: Building an OS X Bundled App
« Reply #6 on: April 25, 2008, 03:50:18 am »

Well, it turned out that I was attempting to use the wrong build.sh file entirely to do it. I managed to find the right one.

Here's the result of my most recent attempts:
'echo -n' capable echo found.
Sed stream editor found.
tr found.
Make found.
build/unix/build.sh: line 1: libmikmod-config: command not found
build/unix/build.sh: line 1: libmikmod-config: command not found
build/unix/build.sh: line 1: libmikmod-config: command not found
GNU C compiler found.
We have a C preprocessor.
We have a C dependency generator.
We have a C compiler.
We have a linker.
We have a Objective-C preprocessor.
We have a Objective-C dependency generator.
We have a Objective-C compiler.
Rez resource compiler (Apple Developer Tools) found.
We have a MacOS X resource compiler (Rez).
Little-endian machine detected.
Simple DirectMedia Layer not found.

The only documentation of this is ages old; in an incompetent attempt to follow out some advice Nic gave someone almost five ago for an earlier version (http://forum.uqm.stack.nl/index.php?topic=1112.0), I replaced the uqm-indent file with the version in Nic's latest source; this produced no notable effect.

I found the build.patch file made back in '04 (http://bugs.uqm.stack.nl/show_bug.cgi?id=358), but having no clue what to do with it, and no apparent file I could copy its contents into, then that doesn't work.
Logged
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Building an OS X Bundled App
« Reply #7 on: April 25, 2008, 08:36:58 am »

Don't bother with Nic's old patches; they'll probably just make things worse. Your real problem is that you're missing most of the libraries; at least SDL. You want the OS X development libraries for the latest stable (1.2 branch, not SVN trunk) version. UQM has (for reasons I don't fully understand) its own copy of Mikmod, so you don't need to worry that it can't find a system-wide one.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
C. Bob
Zebranky food
*
Offline Offline

Posts: 43



View Profile
Re: Building an OS X Bundled App
« Reply #8 on: April 25, 2008, 10:21:41 am »

Well, that explains a lot.

I installed all the frameworks and the like, but didn't know about these other things, or that they were required.

With the long, convoluted SDL developmental setup ahead and no apparent installation documentation in sight (I checked the docs; it just talks about the technical things *after* you've installed it, though I probably overlooked something obvious to everyone else), I think it'd make the most sense to just give up on setting it up myself and see if there's anyone who wouldn't mind doing so (who it would be easy for); I don't have any experience whatsoever and it'd take ages. It isn't worth the effort anymore, when I really just want to hone in this one thing, and then I'm basically done.

Thanks for the advice, in any case.

- Bob
Logged
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3862


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #9 on: May 13, 2008, 12:19:48 am »

Don't bother with Nic's old patches; they'll probably just make things worse. Your real problem is that you're missing most of the libraries; at least SDL.

I had exactly the same errors, and yet I definitely have SDL already installed.

Where can I find McMartin's draft of the steps?

EDIT: thanks, nic. It was here:

http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/INSTALL.macosx?view=markup

EDIT AGAIN:

I'm getting an error where I don't have stricmp() defined on my system, and it's required in a bunch of places. This is... odd. Any ideas?
« Last Edit: May 13, 2008, 01:03:27 am by Death 999 » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Building an OS X Bundled App
« Reply #10 on: May 13, 2008, 05:33:37 am »

The build.sh script checks for stricmp() and strcasecmp(). As long as one is found, UQM should build; if neither is, the build.sh script should abort with an error.
What error do you see exactly? Is it something reported by build.sh while it's detecting what is needed? Or is it an error during compilation, or linking?
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3862


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #11 on: May 13, 2008, 03:42:15 pm »

Linking. Here you go:
Already having the object files ready, here's what I get:
Code:
$> build.sh uqm
  LINK     uqm-debug
Undefined symbols:
  "_stricmp", referenced from:
      _str2bool in mapres.c.o
      _str2bool in mapres.c.o
      _str2bool in mapres.c.o
      _res_IsBoolean in mapres.c.o
      _res_IsBoolean in mapres.c.o
      _res_IsBoolean in mapres.c.o
      _res_IsBoolean in mapres.c.o
      _res_IsBoolean in mapres.c.o
      _res_IsBoolean in mapres.c.o
      _res_IsBoolean in mapres.c.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [uqm-debug] Error 1

I am on 10.5.2, intel mac.
I have deactivated the ppc build target. If I don't, a whole lot more errors pop up.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Building an OS X Bundled App
« Reply #12 on: May 13, 2008, 05:28:36 pm »

What do you mean by "deactivated the ppc build target"?
Your bug sounds like your config_unix.h file is not correct. Does "./build.sh uqm clean" followed by "./build.sh uqm config" help?
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3862


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #13 on: May 13, 2008, 10:03:36 pm »

What do you mean by "deactivated the ppc build target"?

in build.vars,
Code:
COMPILE_C='gcc -c -arch i386'

...
COMPILE_OBJC='gcc -c -arch i386'
LINK='gcc -arch i386'

instead of the same lines with "-arch ppc" before the "-arch i386"

The arch option sets the target architecture. With both, it tries to build a universal app. At least, that's how I understand it.

Your bug sounds like your config_unix.h file is not correct. Does "./build.sh uqm clean" followed by "./build.sh uqm config" help?

I did that; didn't help. if I cleaned and then configged then built, then it would come up with the error given and a lot more. If I cleaned and configged zapped the '-arch ppc' entries then it would only produce the error given.
Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Building an OS X Bundled App
« Reply #14 on: May 13, 2008, 11:09:59 pm »

You can generate some extra debug info by setting BUILDLOG in build/unix/config_functions to some file.
If you post that file here, I might be able to figure out a bit more.
Logged

“When Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.”
Pages: [1] 2 Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!