Using Metrowerks compiler from within MacRelix

91 views
Skip to first unread message

laus...@gmail.com

unread,
May 16, 2015, 7:54:38 PM5/16/15
to classic...@googlegroups.com
Hi, Josh.

First thank you much for the great product! It makes me like classic Mac OS a bit more :-)
I'm wondering on how to use Metrowerks stuff inside MacRelix to compile programs.

I've set a CodeWarrior 7 + CodeWarrior MPW. Whenever I try to compile using your mwcc wrapper, it calls CW C compiler, which complains of unset MWCIncludes.
So I'm wondering on how should I prepare my environment. Is there any magic script to call prior?

Josh Juran

unread,
May 18, 2015, 12:17:49 PM5/18/15
to classic...@googlegroups.com
On May 15, 2015, at 4:16 AM, laus...@gmail.com wrote:

> First thank you much for the great product! It makes me like classic Mac OS a bit more :-)

I'm glad you like it!

> I'm wondering on how to use Metrowerks stuff inside MacRelix to compile programs.

Mac applications, or MacRelix command-line tools?

> I've set a CodeWarrior 7 + CodeWarrior MPW.

Do you mean CW Pro 7, or just 7?

> Whenever I try to compile using your mwcc wrapper, it calls CW C compiler, which complains of unset MWCIncludes.
> So I'm wondering on how should I prepare my environment. Is there any magic script to call prior?

Right now, the only officially supported build environment is CodeWarrior Pro 6. I've done some work to support Pro 5, but there are issues like its non-support for Unix paths in #include directives and weak C++ support. It will never be able to compile MacRelix itself, but it's possible to use it to build other programs.

At the moment, setting up the build environment is complex and difficult. I'd like to make it more automated, but it's tricky because e.g. you can't download MPW anymore, so where should it even start? That said, if you're willing to be the user/tester, we can certainly improve things.

Josh

laus...@gmail.com

unread,
May 18, 2015, 1:06:33 PM5/18/15
to classic...@googlegroups.com, ar...@mac.com, jju...@gmail.com
Thanks for the instant replies!

понедельник, 18 мая 2015 г., 19:17:49 UTC+3 пользователь Josh написал:
Mac applications, or MacRelix command-line tools?

Just Mac applications. Primitive self-written CLI utilities to start with :-)

Do you mean CW Pro 7, or just 7?

Sorry for inaccuracy, I've meant CW Pro 7.
 
Right now, the only officially supported build environment is CodeWarrior Pro 6.

Luckily it's not a big deal as for me (hope not only just for me).
 
At the moment, setting up the build environment is complex and difficult.

It would be great if you could write at least briefly on how to setup CW for MacRelix in public or private letter. Also CC'ing my mentioned friend, as he's interested to tinker with compiling in MacRelix as well.
 
 I'd like to make it more automated, but it's tricky because e.g. you can't download MPW anymore, so where should it even start?

<piracy>Ahem, at least full CW Pro 6 is on a known abandonware attic</piracy>. Not sure of Pro 6, but it looks like Pro 7 includes a somewhat complete MPW on a Reference CD.
Maybe it's possible to ask Apple to re-host MPW once again. A free compiler toolchain is another question, esp. capable of producing PPC binaries...
 
 That said, if you're willing to be the user/tester, we can certainly improve things.

We would like to try :-)
 
P.S.: Sorry for the dumb qustion, but is it possible to get tab completion in MacRelix shell?

Josh Juran

unread,
Jun 1, 2015, 5:28:34 AM6/1/15
to laus...@gmail.com, classic...@googlegroups.com, ar...@mac.com

On May 18, 2015, at 10:06 AM, laus...@gmail.com wrote:

> Thanks for the instant replies!
>
> понедельник, 18 мая 2015 г., 19:17:49 UTC+3 пользователь Josh написал:
>
>> Mac applications, or MacRelix command-line tools?
>
> Just Mac applications. Primitive self-written CLI utilities to start with
> :-)

Are you thinking of some other CLI system than MacRelix, or are we not understanding each other?

>> Do you mean CW Pro 7, or just 7?
>
> Sorry for inaccuracy, I've meant CW Pro 7.

The good news is that it's not too old. The not-so-good news is that it's an untested configuration.

>> Right now, the only officially supported build environment is CodeWarrior
>> Pro 6.
>
> Luckily it's not a big deal as for me (hope not only just for me).

It should be possible to make it work.

>> At the moment, setting up the build environment is complex and difficult.
>
> It would be great if you could write at least briefly on how to setup CW
> for MacRelix in public or private letter. Also CC'ing my mentioned friend,
> as he's interested to tinker with compiling in MacRelix as well.

I'm not sure how to describe the process, as I haven't done a proper installation in years. But I can start by documenting the required end result.

>> I'd like to make it more automated, but it's tricky because e.g. you
>> can't download MPW anymore, so where should it even start?
>
> <piracy>Ahem, at least full CW Pro 6 is on a known abandonware
> attic</piracy>.

s/piracy/bootlegging/

> Not sure of Pro 6, but it looks like Pro 7 includes a
> somewhat complete MPW on a Reference CD.

As does Pro 6. I think my own setup uses Apple's distribution, though.

What version is your Universal Interfaces? That's probably the only thing that really matters.

> Maybe it's possible to ask Apple to re-host MPW once again.

It is certainly possible to shout the question into the void. Getting someone at Apple to hear it, much less a non-null response, is another matter.

> A free compiler
> toolchain is another question, esp. capable of producing PPC binaries...

That would be nice. It's not something I'm pursuing personally at the moment, but I'd be interested in third-party efforts. :-)

>> That said, if you're willing to be the user/tester, we can certainly
>> improve things.
>
> We would like to try :-)

Be prepared for a bumpy ride. But at least it's paved, unlike Pro 5. :-P

> P.S.: Sorry for the dumb qustion, but is it possible to get tab completion
> in MacRelix shell?

Again, it's complicated. Continue in a new thread, maybe?

Josh

laus...@gmail.com

unread,
Jun 9, 2015, 1:25:25 PM6/9/15
to Josh Juran, classic...@googlegroups.com, ar...@mac.com
1 июня 2015 г., в 12:28, Josh Juran <jju...@gmail.com> написал(а):
>
>
> On May 18, 2015, at 10:06 AM, laus...@gmail.com wrote:
>
>> Thanks for the instant replies!
>>
>> понедельник, 18 мая 2015 г., 19:17:49 UTC+3 пользователь Josh написал:
>>
>>> Mac applications, or MacRelix command-line tools?
>>
>> Just Mac applications. Primitive self-written CLI utilities to start with
>> :-)
>
> Are you thinking of some other CLI system than MacRelix, or are we not understanding each other?

I'm not good with explanations :-) For example, if I'll make a simple C application using printf() and getchar(), compile it and run under the MacRelix session, will it work? Or do I need some special tty handling?

>
>>> Do you mean CW Pro 7, or just 7?
>>
>> Sorry for inaccuracy, I've meant CW Pro 7.
>
> The good news is that it's not too old. The not-so-good news is that it's an untested configuration.

I prefer to start with tested configuration.

>
>>> Right now, the only officially supported build environment is CodeWarrior
>>> Pro 6.
>>
>> Luckily it's not a big deal as for me (hope not only just for me).
>
> It should be possible to make it work.
>
>>> At the moment, setting up the build environment is complex and difficult.
>>
>> It would be great if you could write at least briefly on how to setup CW
>> for MacRelix in public or private letter. Also CC'ing my mentioned friend,
>> as he's interested to tinker with compiling in MacRelix as well.
>
> I'm not sure how to describe the process, as I haven't done a proper installation in years. But I can start by documenting the required end result.

Yes, if you could write for example a blog post on how at least to try to setup the things, that would be a great help.

>
>>> I'd like to make it more automated, but it's tricky because e.g. you
>>> can't download MPW anymore, so where should it even start?
>>
>> <piracy>Ahem, at least full CW Pro 6 is on a known abandonware
>> attic</piracy>.
>
> s/piracy/bootlegging/
>
>> Not sure of Pro 6, but it looks like Pro 7 includes a
>> somewhat complete MPW on a Reference CD.
>
> As does Pro 6. I think my own setup uses Apple's distribution, though.
>
> What version is your Universal Interfaces? That's probably the only thing that really matters.

I should check. You could just mention which components you used for a successful result.

>
>> Maybe it's possible to ask Apple to re-host MPW once again.
>
> It is certainly possible to shout the question into the void. Getting someone at Apple to hear it, much less a non-null response, is another matter.
>
>> A free compiler
>> toolchain is another question, esp. capable of producing PPC binaries...
>
> That would be nice. It's not something I'm pursuing personally at the moment, but I'd be interested in third-party efforts. :-)
>
>>> That said, if you're willing to be the user/tester, we can certainly
>>> improve things.
>>
>> We would like to try :-)
>
> Be prepared for a bumpy ride. But at least it's paved, unlike Pro 5. :-P
>
>> P.S.: Sorry for the dumb qustion, but is it possible to get tab completion
>> in MacRelix shell?
>
> Again, it's complicated. Continue in a new thread, maybe?

Yes, please. Or a blog post maybe.

>
> Josh
>

Josh Juran

unread,
Jun 9, 2015, 11:50:19 PM6/9/15
to laus...@gmail.com, classic...@googlegroups.com, ar...@mac.com
On Jun 9, 2015, at 10:25 AM, laus...@gmail.com wrote:

> 1 июня 2015 г., в 12:28, Josh Juran <jju...@gmail.com> написал(а):
>
>> Are you thinking of some other CLI system than MacRelix, or are we not understanding each other?
>
> I'm not good with explanations :-) For example, if I'll make a simple C application using printf() and getchar(), compile it and run under the MacRelix session, will it work? Or do I need some special tty handling?

You can use the standard C or C++ library routines for I/O, provided you link with my MSL-fixup library, which overrides __read_console(), __read_file(), __write_console() and __write_file() to call read() and write(). Or you can just call read() and write() directly. That will get you either the console window or whatever file the I/O has been redirected to.

>>>> Do you mean CW Pro 7, or just 7?
>>>
>>> Sorry for inaccuracy, I've meant CW Pro 7.
>>
>> The good news is that it's not too old. The not-so-good news is that it's an untested configuration.
>
> I prefer to start with tested configuration.

Well, that's CodeWarrior Pro 6 plus the "netborne" updates I have installed, resulting in Metrowerks C/C++ 2.4.1 and IDE 4.1.0.3.

>>> It would be great if you could write at least briefly on how to setup CW
>>> for MacRelix in public or private letter. Also CC'ing my mentioned friend,
>>> as he's interested to tinker with compiling in MacRelix as well.
>>
>> I'm not sure how to describe the process, as I haven't done a proper installation in years. But I can start by documenting the required end result.
>
> Yes, if you could write for example a blog post on how at least to try to setup the things, that would be a great help.

Okay, this is on my to-do list.

>> What version is your Universal Interfaces? That's probably the only thing that really matters.
>
> I should check. You could just mention which components you used for a successful result.

I use Universal Interfaces 3.4.2, the last one. If you can get that, use it. If not, I'm willing to make accommodations for slightly older versions that come with CodeWarrior.

Josh

Reply all
Reply to author
Forward
0 new messages