Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Anders F Björklund

Walter Bright wrote:

An update just to support Mac OSX 10.6.


What is with the spelling of Mac OS X ?
Seems consistent throughout, just wrong.


That also means the end of the line
for official support of 10.5 and earlier.


Bye-bye, DMD.

--anders


Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Denis Koroskin
On Fri, 13 Nov 2009 07:07:21 +0300, Walter Bright  
newshou...@digitalmars.com wrote:


An update just to support Mac OSX 10.6. That also means the end of the  
line for official support of 10.5 and earlier.


http://ftp.digitalmars.com/dmd.1.051.zip


Isn't there any way to support both platforms?

Looking at the changes, I think it's even possible to add a new DMD flag  
(e.g. -osx=10.5, defaults to 10.6) and keep an older behavior on demand.


Alternatively, you could wrap the changes you made into #ifdef OSX_10_6  
... #else ... #endif so that users could compile DMD with older Macs  
support from source. DMD would then be distributed with 2 binaries, e.g.  
dmd_10.6 and dmd_10.5 and dmd would be an alias/symlink to either of them  
(depending on the target platform).


Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Walter Bright

Denis Koroskin wrote:
On Fri, 13 Nov 2009 07:07:21 +0300, Walter Bright 
newshou...@digitalmars.com wrote:


An update just to support Mac OSX 10.6. That also means the end of the 
line for official support of 10.5 and earlier.


http://ftp.digitalmars.com/dmd.1.051.zip


Isn't there any way to support both platforms?


No way to test on 10.5 without buying yet another machine. I don't know 
if it works or not on 10.5. The bus error for 10.4 is probably back 
because installing the 10.6 dev system from Apple seems to have deleted 
the 10.4 stuff.


If someone wants to test it on 10.5, please do and report back with the 
results. If it does not, and there's some simple change to make it do 
so, I'll be happy to fold it in.



Looking at the changes, I think it's even possible to add a new DMD flag 
(e.g. -osx=10.5, defaults to 10.6) and keep an older behavior on demand.


The compiler changes should be backwards compatible with 10.5. (The 
reason it didn't work with 10.6 is Apple changed the linker behavior; I 
found a workaround which appears successful.)



Alternatively, you could wrap the changes you made into #ifdef OSX_10_6 
... #else ... #endif so that users could compile DMD with older Macs 
support from source. DMD would then be distributed with 2 binaries, e.g. 
dmd_10.6 and dmd_10.5 and dmd would be an alias/symlink to either of 
them (depending on the target platform).


On Windows I can build one binary that works from NT to Win7, a 20 year 
span of operating systems.


Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Michel Fortin

On 2009-11-13 05:20:44 -0500, Walter Bright newshou...@digitalmars.com said:

No way to test on 10.5 without buying yet another machine. I don't know 
if it works or not on 10.5. The bus error for 10.4 is probably back 
because installing the 10.6 dev system from Apple seems to have deleted 
the 10.4 stuff.


Really? Can't you just partition your hard disk in two for 10.5? I'm 
not saying you should take the burden of testing with both, but saying 
you can't install 10.5 alongside 10.6 seems dubious to me:


1. Use Disk Utility to resize your current partition and create a new one.
2. Boot using your 10.5 installer DVD and install on the new partition.
3. Press option at startup to see a boot menu; open the Startup 
preference pane to set the default boot partition (or use bless on 
the command line).



--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Jacob Carlborg

On 11/13/09 11:20, Walter Bright wrote:

Denis Koroskin wrote:

On Fri, 13 Nov 2009 07:07:21 +0300, Walter Bright
newshou...@digitalmars.com wrote:


An update just to support Mac OSX 10.6. That also means the end of
the line for official support of 10.5 and earlier.

http://ftp.digitalmars.com/dmd.1.051.zip


Isn't there any way to support both platforms?


No way to test on 10.5 without buying yet another machine. I don't know
if it works or not on 10.5. The bus error for 10.4 is probably back
because installing the 10.6 dev system from Apple seems to have deleted
the 10.4 stuff.

If someone wants to test it on 10.5, please do and report back with the
results. If it does not, and there's some simple change to make it do
so, I'll be happy to fold it in.


Can't you wrap the changes you made in:

SInt32 MacVersion;
if (Gestalt(gestaltSystemVersion, MacVersion) == noErr)
if (MacVersion = 0x1050  MacVersion  0x1060)
// Mac OS X 10.5.x code goes here

else if (MacVersion = 0x1060)
// Mac OS X 10.6.x code goes here



Looking at the changes, I think it's even possible to add a new DMD
flag (e.g. -osx=10.5, defaults to 10.6) and keep an older behavior
on demand.


The compiler changes should be backwards compatible with 10.5. (The
reason it didn't work with 10.6 is Apple changed the linker behavior; I
found a workaround which appears successful.)



Alternatively, you could wrap the changes you made into #ifdef
OSX_10_6 ... #else ... #endif so that users could compile DMD with
older Macs support from source. DMD would then be distributed with 2
binaries, e.g. dmd_10.6 and dmd_10.5 and dmd would be an alias/symlink
to either of them (depending on the target platform).


On Windows I can build one binary that works from NT to Win7, a 20 year
span of operating systems.




Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Jacob Carlborg

On 11/13/09 15:30, Jacob Carlborg wrote:

On 11/13/09 11:20, Walter Bright wrote:

Denis Koroskin wrote:

On Fri, 13 Nov 2009 07:07:21 +0300, Walter Bright
newshou...@digitalmars.com wrote:


An update just to support Mac OSX 10.6. That also means the end of
the line for official support of 10.5 and earlier.

http://ftp.digitalmars.com/dmd.1.051.zip


Isn't there any way to support both platforms?


No way to test on 10.5 without buying yet another machine. I don't know
if it works or not on 10.5. The bus error for 10.4 is probably back
because installing the 10.6 dev system from Apple seems to have deleted
the 10.4 stuff.

If someone wants to test it on 10.5, please do and report back with the
results. If it does not, and there's some simple change to make it do
so, I'll be happy to fold it in.


Can't you wrap the changes you made in:

SInt32 MacVersion;
if (Gestalt(gestaltSystemVersion, MacVersion) == noErr)
if (MacVersion = 0x1050  MacVersion  0x1060)
// Mac OS X 10.5.x code goes here

else if (MacVersion = 0x1060)
// Mac OS X 10.6.x code goes here


That would be Mac OS X 10.6.x and later


Looking at the changes, I think it's even possible to add a new DMD
flag (e.g. -osx=10.5, defaults to 10.6) and keep an older behavior
on demand.


The compiler changes should be backwards compatible with 10.5. (The
reason it didn't work with 10.6 is Apple changed the linker behavior; I
found a workaround which appears successful.)



Alternatively, you could wrap the changes you made into #ifdef
OSX_10_6 ... #else ... #endif so that users could compile DMD with
older Macs support from source. DMD would then be distributed with 2
binaries, e.g. dmd_10.6 and dmd_10.5 and dmd would be an alias/symlink
to either of them (depending on the target platform).


On Windows I can build one binary that works from NT to Win7, a 20 year
span of operating systems.






Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Michel Fortin

On 2009-11-13 01:52:07 -0500, Walter Bright newshou...@digitalmars.com said:


Anders Bergh wrote:

No, but you'll need to use the 10.4 SDK (it's optional when you
install Xcode though). Same problem as last time, between 10.4 and
10.5. But any binaries you compile for 10.4 should work on 10.6 as
well.


I did have the 10.4 SDK installed, but apparently the upgrade deleted 
it because the makefiles that referred to it all broke.


Yeah, it does so. Unless you check the Mac OS X 10.4 Support 
subpackage, which is unchecked by default, in the custom installation 
panel of the Xcode installer.


Also, you can keep your old installations of Xcode on 10.6. I have 
Xcode 2.5 from Tiger, 3.0 and 3.1 from Leopard, and 3.2 from Snow 
Leopard running all side by side just fine on my computer. This 
includes both the IDE and the command line utilities. Even the old 
compilers and linkers work fine. Before installing a new version, I 
just rename the old /Developer folder to something else so the new 
one won't override it. It is documented to work in the Read Me file 
accompanying Xcode, and it does indeed work fine.


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/



Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread BCS

Hello Michel,


Really? Can't you just partition your hard disk in two for 10.5? I'm
not saying you should take the burden of testing with both, but saying
you can't install 10.5 alongside 10.6 seems dubious to me:

1. Use Disk Utility to resize your current partition and create a new
one.
2. Boot using your 10.5 installer DVD and install on the new
partition.
3. Press option at startup to see a boot menu; open the Startup
preference pane to set the default boot partition (or use bless on
the command line).


IIRC Walter mentioned in the NG that his mac box is running as a headless 
box in the basement somewhere so boot switching might be annoying.





Re: dmd 1.052 for Mac OSX 10.6

2009-11-13 Thread Long Chang
may be use a virtual machine can work. like VMware or XEN.


Re: dmd 1.052 for Mac OSX 10.6

2009-11-12 Thread Walter Bright

Fixed url:

http://ftp.digitalmars.com/dmd.1.052.zip


Re: dmd 1.052 for Mac OSX 10.6

2009-11-12 Thread Nick Sabalausky
Walter Bright newshou...@digitalmars.com wrote in message 
news:hdim1s$30m...@digitalmars.com...
 An update just to support Mac OSX 10.6. That also means the end of the 
 line for official support of 10.5 and earlier.

 http://ftp.digitalmars.com/dmd.1.051.zip

I propose that the first person to complain about the withdrawn 10.5 support 
be obligated to wear a Welcome to Apple sticker on their forehead for the 
rest of the day. (Hell, if I'm stuck with this Beware of smartass 
sticker...just...won't...come off...) 




Re: dmd 1.052 for Mac OSX 10.6

2009-11-12 Thread Walter Bright

Anders Bergh wrote:

No, but you'll need to use the 10.4 SDK (it's optional when you
install Xcode though). Same problem as last time, between 10.4 and
10.5. But any binaries you compile for 10.4 should work on 10.6 as
well.


I did have the 10.4 SDK installed, but apparently the upgrade deleted it 
because the makefiles that referred to it all broke.