POV-Ray : Newsgroups : povray.programming : Atempting MPW Compile ? Server Time
28 Jul 2024 20:20:50 EDT (-0400)
  Atempting MPW Compile ? (Message 11 to 20 of 26)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 6 Messages >>>
From: Y Tanabe
Subject: Re: Atempting MPW Compile ?
Date: 10 May 2000 03:09:35
Message: <39190B32.69B72E3A@kh.rim.or.jp>
Mr. Ryan Mooney or Moon47

If you use my arranging SysMacPict.h and SysMacPict.c,so this may help I
think.
But if you use old SysmacPict.h,c, then you have to modify config.h for
GET_SYS_FILE_HANDLE().
The old SysMacPict can not work continue rendering well.
Would you please understand difference with MacSource and Source folder,
MacSource files are defined by config.h and Source files are defined by
frame.h.

Y.Tanabe
Kobe,Japan

//START

1.)
Replace and add
 sysMacPict.c
 sysMacPict.h

2.)
Add  Boolean  flag to struct file_handle_struct in "FRAME.H"

struct file_handle_struct
{
 char  *filename;
 int  mode;
 int  width, height;
 int  buffer_size;
 char  *buffer;
 FILE  *file;
 int  file_type;  /* What format the output file is */
 int   (*Open_File_p) (struct file_handle_struct *handle,char *name, int
*width, int *height, int buffer_size, int mode);
 void   (*Write_Line_p) (struct file_handle_struct *handle,COLOUR
*line_data, int line_number);
 int   (*Read_Line_p) (struct file_handle_struct *handle,COLOUR
*line_data, int *line_number);
 void   (*Read_Image_p) (IMAGE *Image, char *filename);
 void   (*Close_File_p) (struct file_handle_struct *handle);
//TFC ADD
 Boolean  flag;
};

3.)
File ":MacSource:config.h"; line 379
File ":MacSource:PovMac.h"; line 71
change
#include <MacTypes.h>
 to
#include <Types.h>

File ":MacSource:PovMac.h"; line 88
change
#include <ControlDefinitions.h>
to
//#include <ControlDefinitions.h>

File ":MacSource:DialogUtils.c"; line 901
change
#ifdef __UseNavEventData
 switch(callBackParms->eventData.eventDataParms.event->what)
#else
  switch(callBackParms->eventData.event->what)
#endif
to
//#ifdef __UseNavEventData
// switch(callBackParms->eventData.eventDataParms.event->what)
//#else
  switch(callBackParms->eventData.event->what)
//#endif


File ":MacSource:DialogUtils.c"; line 911
change
#ifdef __UseNavEventData
    pWindow =
(WindowPtr)(callBackParms->eventData.eventDataParms.event->message);
#else
    pWindow = (WindowPtr)(callBackParms->eventData.event->message);
#endif
to
//#ifdef __UseNavEventData
//    pWindow =
(WindowPtr)(callBackParms->eventData.eventDataParms.event->message);
//#else
    pWindow = (WindowPtr)(callBackParms->eventData.event->message);
//#endif

File ":SOURCE:OPTIN.c"; line 1653
add top
#include "sysMacPict.h"
change
 Histogram_File_Handle = GET_SYS_FILE_HANDLE ();
to
 Histogram_File_Handle = Get_MacPICT_File_Handle();

File ":SOURCE:POVRAY.c"; line 1043
add top
#include "sysMacPict.h"
change
 case 'S' : Output_File_Handle = GET_SYS_FILE_HANDLE();
def_ext=SYS_DEF_EXT; break;
to
case 'S' : Output_File_Handle = Get_MacPICT_File_Handle();
def_ext=SYS_DEF_EXT; break;

File ":SOURCE:PARSTXTR.c"; line 162
add top
#include "sysMacPict.h"
change
READ_SYS_IMAGE(Image, Name);
to
Read_MacPICT_Image(Image, Name);

File ":MacSource:DialogUtils.h"; line 116
change
// We don't need prototypes here, they are in Controls.h!
/*
pascal OSErr GetBevelButtonMenuValue(ControlHandle inButton, SInt16
*outValue);
pascal OSErr SetBevelButtonMenuValue(ControlHandle inButton, SInt16
inValue);
pascal OSErr GetBevelButtonMenuHandle(ControlHandle inButton, MenuHandle
*outHandle);
pascal OSErr SetBevelButtonGraphicAlignment(ControlHandle inButton,
ControlButtonGraphicAlignment inAlign, SInt16 inHOffset, SInt16
inVOffset);
pascal OSErr GetImageWellContentInfo(ControlHandle inButton,
ControlButtonContentInfoPtr info);
pascal OSErr SetImageWellContentInfo(ControlHandle inButton,
ControlButtonContentInfoPtr info);
*/
to
// We don't need prototypes here, they are in Controls.h!
pascal OSErr GetBevelButtonMenuValue(ControlHandle inButton, SInt16
*outValue);
pascal OSErr SetBevelButtonMenuValue(ControlHandle inButton, SInt16
inValue);
pascal OSErr GetBevelButtonMenuHandle(ControlHandle inButton, MenuHandle
*outHandle);
pascal OSErr SetBevelButtonGraphicAlignment(ControlHandle inButton,
ControlButtonGraphicAlignment inAlign, SInt16 inHOffset, SInt16
inVOffset);
pascal OSErr GetImageWellContentInfo(ControlHandle inButton,
ControlButtonContentInfoPtr info);
pascal OSErr SetImageWellContentInfo(ControlHandle inButton,
ControlButtonContentInfoPtr info);

File ":MacSource:DialogUtils.c"; line 1048
change
#if !defined(powerc) && !defined (__powerc)
to
//#if !defined(powerc) && !defined (__powerc)

File ":MacSource:DialogUtils.c"; line 1119
change
#endif
to
//#endif

4.)
POV-Ray.make
change

{PovRayMacDir}mpwRsrcs.r
  # Make an XSym (debugging) file
#  {ShowMakeSymProgress}
#  MakeSym {MakeSymOptions} {AppName}.xcoff
  {ShowRezProgress}
  {RezTool} {PovRayMacDir}mpwRsrcs.r -o {Targ} -append
  # Call Thorsten's tool to fix up the application's stack size
  set StackSize 600000
  Echo "# `date -s` ----- Setting App stack size to {StackSize}"
  ChangeAppStack {AppName} -appstack StackSize
  # Set file's creator type, turn on bundle bit, turn off inited bit
  SetFile {Targ} -t APPL -c {AppSignature} -a Bi

to

{PovRayMacDir}mpwRsrcs.r
  # Make an XSym (debugging) file
#  {ShowMakeSymProgress}
#  MakeSym {MakeSymOptions} {AppName}.xcoff
  {ShowRezProgress}
  {RezTool} {PovRayMacDir}mpwRsrcs.r -o {Targ} -append
  # Call Thorsten's tool to fix up the application's stack size
#  set StackSize 600000
#  Echo "# `date -s` ----- Setting App stack size to {StackSize}"
#  ChangeAppStack {AppName} -appstack StackSize
  # Set file's creator type, turn on bundle bit, turn off inited bit
  SetFile {Targ} -t APPL -c {AppSignature} -a Bi

5.)
mpwRsrcs.r
add top
#include "CodeFragmentTypes.r"
#define kDefaultStackSize 307200
add bottom
resource 'cfrg' (0)
{
 {
  kPowerPC,
  kFullLib,
  kNoVersionNum,
  kNoVersionNum,
  kDefaultStackSize,
  kNoAppSubFolder,
  kIsApp,
  kOnDiskFlat,
  kZeroOffset,
  kWholeFork,
  "POV-Ray"
 }
};

//END



Moon47 wrote:

> Last one i hope i almost thought i was done...
> Well only 30 or so more files to go out of a couple hundred...
> Any idea... Why is it trying to "convert" int to what looks like a call
> to some funct? File OPTIN.c.o:
>
> # 5/8/00 11:53:02 PM ----- Building :mpwobj:OPTIN.c.o
> MrC C Compiler 4.1.0f1c1
> Copyright (C) 1994-1999 by Apple Computer, Inc.
>
>              Histogram_File_Handle = GET_SYS_FILE_HANDLE () ;
>                                                             ^
> File ":SOURCE:OPTIN.c"; line 1653 #Error: cannot implicitly convert
> from: (int)
> to  : (struct file_handle_struct *)
> #-----------------------
> ### MPW Shell - Execution of Pov-Ray.makeout terminated.
> ### MPW Shell - Execution of BuildProgram terminated.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Atempting MPW Compile ?
Date: 10 May 2000 10:07:50
Message: <39196d36$1@news.povray.org>
In article <3917AD3C.3087475B@earthlink.net> , Moon47 <rdm### [at] earthlinknet>
wrote:

> # 5/8/00 11:53:02 PM ----- Building :mpwobj:OPTIN.c.o
> MrC C Compiler 4.1.0f1c1
> Copyright (C) 1994-1999 by Apple Computer, Inc.
>
>              Histogram_File_Handle = GET_SYS_FILE_HANDLE () ;
>                                                             ^
> File ":SOURCE:OPTIN.c"; line 1653 #Error: cannot implicitly convert
> from: (int)
> to  : (struct file_handle_struct *)

If you are compiling without sysMacPict.cp you need to fix config.h. To do
so remove there lines from config.h:

// Machine-specific image_map file routines (PICT for the Mac, sysMacPict.c)
#define GET_SYS_FILE_HANDLE() MacFile_GetFileHandle()
#define READ_SYS_IMAGE(i,n)  MacFile_ReadImage((i),(n))
#define SYS_DEF_EXT    ".pict"



       Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Moon47
Subject: Re: Atempting MPW Compile ?
Date: 10 May 2000 18:09:19
Message: <39188F48.74DBF03@earthlink.net>
That did make sense but did not fix the problem. Neither OPTIN.c nor
OPTIN.h use the config.h header file in the includes...?

Why is it trying to "implicitly convert
> from: (int)
> to  : (struct file_handle_struct *)"

This does not make sense to me...?


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Atempting MPW Compile ?
Date: 10 May 2000 20:40:48
Message: <391a0190@news.povray.org>
In article <391### [at] earthlinknet> , Moon47 <rdm### [at] earthlinknet> 
wrote:

> That did make sense but did not fix the problem. Neither OPTIN.c nor
> OPTIN.h use the config.h header file in the includes...?

Yes, they do. config.h gets included via frame.h.

> Why is it trying to "implicitly convert
>> from: (int)
>> to  : (struct file_handle_struct *)"
>
> This does not make sense to me...?

Because it does not know the function and by default all functions return
"int" in K&R C.

Oh, and this code should work. Are you sure you removed the three defines
from the right config.h (the one in the MacSource folder)? You may also want
to try "Build All" to restart the whole build process.


        Thorsten

PS: POV-Ray is really not the easiest project to build in MrC, maybe you
should try some of the examples first and get used to the MPW MrC
environment. Once you get more experience it will be less frustrating :-)


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Moon47
Subject: Re: Atempting MPW Compile ?
Date: 11 May 2000 01:19:30
Message: <3918F41C.F5E0B95C@earthlink.net>
<> Yes, they do. config.h gets included via frame.h.

Oh, i see... OK...

<> Oh, and this code should work. Are you sure you removed the three
defines
<> from the right config.h (the one in the MacSource folder)? You may
also want
<> to try "Build All" to restart the whole build process.

Commented out the defines as suggested... Started from scratch... No
change same error w/ converting int to struct file_handle_struct *...???

<> PS: POV-Ray is really not the easiest project to build in MrC, maybe
you
<> should try some of the examples first and get used to the MPW MrC
<> environment. Once you get more experience it will be less frustrating
:-)

Yes i agree this is not the easiest program to start out w/ but i do not
mind the challenge. I hope i am not frustrating you w/ all the questions
i sure you have better things to fill your time. I do appreciate the
help though...

Btw: I tried the CW compile witch did annoy me... It had more
problems... Specifically finding the Zlib and Pnglib files... I know
even less about the CW environment and how to manipulate it so, i will
not be getting in to that at this point.
Although it has some nice features i am impressed with it will take more
time to get use to than to just finish the current MPW project...

TTFN... =)


Post a reply to this message

From: Moon47
Subject: Re: Atempting MPW Compile ?
Date: 11 May 2000 04:09:06
Message: <39191BDD.CC15CB3F@earthlink.net>
OK just finished the CW compile ...
That was too easy what is the fun in that...
It still complained of implicitave (splng) conversion problems but
compiled fine...
One last thing... How can i replace the current patches w/ some
unofficial patches mainly the media and function patches interest me it
would be nice to have these in my compile... The main reason for this
whole venture in the first place... That and to see if i could get a
nice compiled program to begin with...


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Atempting MPW Compile ?
Date: 11 May 2000 13:46:52
Message: <391af20c$1@news.povray.org>
In article <39191BDD.CC15CB3F@earthlink.net> , Moon47 <rdm### [at] earthlinknet>
wrote:

> One last thing... How can i replace the current patches w/ some
> unofficial patches mainly the media and function patches interest me it
> would be nice to have these in my compile... The main reason for this
> whole venture in the first place... That and to see if i could get a
> nice compiled program to begin with...
>

I think Chris Huff mentioned some time ago that he made a compile of MegaPOV
with the official frontend code...


Chris Huff, are you reading this group?


       Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Chris Huff
Subject: Re: Atempting MPW Compile ?
Date: 11 May 2000 16:24:54
Message: <chrishuff_99-F16690.15281611052000@news.povray.org>
In article <391af20c$1@news.povray.org>, "Thorsten Froehlich" 
<tho### [at] trfde> wrote:

> I think Chris Huff mentioned some time ago that he made a compile of 
> MegaPOV with the official frontend code...
> 
> Chris Huff, are you reading this group?

Yes. As a matter of fact, I have the .sit file containing that compile 
sitting on my desktop.(I use the official version's interface because I 
couldn't get MacMegaPOV's interface to compile)
I would be happy to e-mail it to anyone who wants it, or maybe I could 
post it to povray.binaries.utilities...

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Chris Huff
Subject: Re: Atempting MPW Compile ?
Date: 11 May 2000 16:26:25
Message: <chrishuff_99-61BABD.15294711052000@news.povray.org>
In article <3918F41C.F5E0B95C@earthlink.net>, rdm### [at] earthlinknet wrote:

> Btw: I tried the CW compile witch did annoy me... It had more
> problems... Specifically finding the Zlib and Pnglib files... I know
> even less about the CW environment and how to manipulate it so, i will
> not be getting in to that at this point.

I would recommend that you use the CodeWarrior project included with the 
Mac source code distribution, instead of starting from scratch. This 
could save you a lot of trouble.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Chris Huff
Subject: Re: Atempting MPW Compile ?
Date: 11 May 2000 16:28:32
Message: <chrishuff_99-FD692F.15315411052000@news.povray.org>
In article <39191BDD.CC15CB3F@earthlink.net>, rdm### [at] earthlinknet wrote:

> One last thing... How can i replace the current patches w/ some
> unofficial patches mainly the media and function patches interest me it
> would be nice to have these in my compile... The main reason for this
> whole venture in the first place... That and to see if i could get a
> nice compiled program to begin with...

Basically, replace the modified files, add any new files to the project, 
and recompile. I would recommend you just take the whole MegaPOV source, 
it is much less work than separating out those specific patches would be.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 6 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.