Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
Konstantin Tokarev wrote: >> It does sound like we're a little too enthusiastic about jumping to a >> conclusion here - is there a better way to decide what we're compiling >> for ? Surely we should ignore uname if configure has options that >> explicitly ask for cross-compilation; but it's a reasonable thing to >> consult otherwise, when auto-detecting in the absence of explicit >> instructions - in particular, more to be trusted than the existence of >> (possibly non-native) frameworks, > > Note that in opening letter different question was asked, namely how to > detect if script is running on Mac or not, presumably to avoid asking Linux > users to install Xcode. I think Edward is raising the same question, but yes, the reason I raised my question was that I was prompted to install Xcode AND that that was all the script would do. The former is ... pittoresque, the latter is more annoying. A combination of tests might be the way to go. I noticed the same check for Carbon.framework in the MacPorts sources (also to distinguish PureDarwin). But in their case they check the result from `tcl_platform(os)` first. If memory serves me well that variable is initialised from uname. I.e. something like if [ $UNAME_SYSTEM = Darwin -a -d /System/Library/Frameworks/Carbon.framework ]; then BUILD_ON_MAC=yes fi The only situation in which this test could fail validly would be on PureDarwin or similar OS ("true and false"). That's exactly what is required here, no? Alternatively, there's `sysctl hw.model` which can probably be used as the unique test. And of course there's the possibility to add a way to force the script to continue in an unforeseen situation (but that seems more work). R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
04.01.2018, 17:51, "Edward Welbourne": > René J.V. Bertin: Here's a silly one: configuring Qt for building on my Linux rig I was told that I needed Xcode, and how to get it. :) Long story short, it turns out that the configure script determines whether it's building on Mac by checking if the Carbon framework exists in the designated location. And it turns out that I copied over the entire header dir. structure under /System/Library/Frameworks onto said Linux rig because I use it for cross-platform development. Apart from the fact that it should probably check for a framework with a more certain future, isn't there a less "rootsy" way of determining whether the script is running on Mac? > > On quinta-feira, 21 de dezembro de 2017 04:47:34 CST Konstantin Tokarev wrote: >>> Check uname maybe? > > Thiago Macieira (21 December 2017 12:54) replied: >> That would tell you the host you're running on, not the target you're >> compiling to. >> >> If your sysroot contains Apple files, it's reasonable to conclude it's an >> Apple system. > > Well, it's reasonable to conclude you're set up to be capable of > compiling for an Apple system; as here, it's possible this may be for > the sake of cross-compiling; but the fact of having the means to > cross-compile for a particular target does not mean that every build > done on this machine necessarily is a cross-compile for that target. > > It does sound like we're a little too enthusiastic about jumping to a > conclusion here - is there a better way to decide what we're compiling > for ? Surely we should ignore uname if configure has options that > explicitly ask for cross-compilation; but it's a reasonable thing to > consult otherwise, when auto-detecting in the absence of explicit > instructions - in particular, more to be trusted than the existence of > (possibly non-native) frameworks, Note that in opening letter different question was asked, namely how to detect if script is running on Mac or not, presumably to avoid asking Linux users to install Xcode. > > Eddy. > ___ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development -- Regards, Konstantin ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
René J.V. Bertin: >>> Here's a silly one: configuring Qt for building on my Linux rig I was told >>> that I needed Xcode, and how to get it. :) >>> >>> Long story short, it turns out that the configure script determines >>> whether it's building on Mac by checking if the Carbon framework exists >>> in the designated location. And it turns out that I copied over the >>> entire header dir. structure under /System/Library/Frameworks onto said >>> Linux rig because I use it for cross-platform development. >>> >>> Apart from the fact that it should probably check for a framework with a >>> more certain future, isn't there a less "rootsy" way of determining >>> whether the script is running on Mac? On quinta-feira, 21 de dezembro de 2017 04:47:34 CST Konstantin Tokarev wrote: >> Check uname maybe? Thiago Macieira (21 December 2017 12:54) replied: > That would tell you the host you're running on, not the target you're > compiling to. > > If your sysroot contains Apple files, it's reasonable to conclude it's an > Apple system. Well, it's reasonable to conclude you're set up to be capable of compiling for an Apple system; as here, it's possible this may be for the sake of cross-compiling; but the fact of having the means to cross-compile for a particular target does not mean that every build done on this machine necessarily is a cross-compile for that target. It does sound like we're a little too enthusiastic about jumping to a conclusion here - is there a better way to decide what we're compiling for ? Surely we should ignore uname if configure has options that explicitly ask for cross-compilation; but it's a reasonable thing to consult otherwise, when auto-detecting in the absence of explicit instructions - in particular, more to be trusted than the existence of (possibly non-native) frameworks, Eddy. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
On quinta-feira, 21 de dezembro de 2017 14:53:35 -02 René J.V. Bertin wrote: > I'm pretty sure `sysctl hw.model` doesn't return anything that starts with > Mac when you're not on a Mac though? Entirely irrelevant, since it would tell you what you're running on, not what you're compiling for. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
On Thursday December 21 2017 20:19:03 Konstantin Tokarev wrote: >> I'm pretty sure `sysctl hw.model` doesn't return anything that starts with >> Mac when you're not on a Mac though? > >Are you trying to distinguish it from PureDarwin? No, in theory that command should always return the identification of the actual hardware it's running on. (I thought that project was dead, apparently not, cool, but will Qt support it?). R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
21.12.2017, 19:53, "René J.V. Bertin": > On Thursday December 21 2017 16:25:02 Jake Petroules wrote: > >> > Possibly: just `uname` returns Darwin. That should certainly work for the >> desktop OS, but I have no way of checking what it returns on other Apple OSes >> >> they all return "Darwin" > > Figures... > >> > (and if the Carbon.framework exists there). >> >> it does not :) > > I'm pretty sure `sysctl hw.model` doesn't return anything that starts with > Mac when you're not on a Mac though? Are you trying to distinguish it from PureDarwin? > > R -- Regards, Konstantin ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
On Thursday December 21 2017 16:25:02 Jake Petroules wrote: > > Possibly: just `uname` returns Darwin. That should certainly work for the > > desktop OS, but I have no way of checking what it returns on other Apple > > OSes > > they all return "Darwin" Figures... > > (and if the Carbon.framework exists there). > > it does not :) I'm pretty sure `sysctl hw.model` doesn't return anything that starts with Mac when you're not on a Mac though? R ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
> On Dec 21, 2017, at 3:57 AM, René J.V. Bertinwrote: > > On Thursday December 21 2017 13:47:34 Konstantin Tokarev wrote: > >> Check uname maybe? > > Possibly: just `uname` returns Darwin. That should certainly work for the > desktop OS, but I have no way of checking what it returns on other Apple OSes they all return "Darwin" > (and if the Carbon.framework exists there). it does not :) > > R. > ___ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development -- Jake Petroules - jake.petrou...@qt.io The Qt Company - Silicon Valley Qbs build tool evangelist - qbs.io ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
On quinta-feira, 21 de dezembro de 2017 04:47:34 CST Konstantin Tokarev wrote: > > Hi, > > > > Here's a silly one: configuring Qt for building on my Linux rig I was told > > that I needed Xcode, and how to get it. :) > > > > Long story short, it turns out that the configure script determines > > whether it's building on Mac by checking if the Carbon framework exists > > in the designated location. And it turns out that I copied over the > > entire header dir. structure under /System/Library/Frameworks onto said > > Linux rig because I use it for cross-platform development. > > > > Apart from the fact that it should probably check for a framework with a > > more certain future, isn't there a less "rootsy" way of determining > > whether the script is running on Mac? > Check uname maybe? That would tell you the host you're running on, not the target you're compiling to. If your sysroot contains Apple files, it's reasonable to conclude it's an Apple system. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
On Thursday December 21 2017 13:47:34 Konstantin Tokarev wrote: > Check uname maybe? Possibly: just `uname` returns Darwin. That should certainly work for the desktop OS, but I have no way of checking what it returns on other Apple OSes (and if the Carbon.framework exists there). R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] About the presence of /System/Library/Frameworks/Carbon.framework
> Hi, > > Here's a silly one: configuring Qt for building on my Linux rig I was told > that I needed Xcode, and how to get it. :) > > Long story short, it turns out that the configure script determines whether > it's building on Mac by checking if the Carbon framework exists in the > designated location. And it turns out that I copied over the entire header > dir. structure under /System/Library/Frameworks onto said Linux rig because I > use it for cross-platform development. > > Apart from the fact that it should probably check for a framework with a more > certain future, isn't there a less "rootsy" way of determining whether the > script is running on Mac? Check uname maybe? > > R. > ___ > Development mailing list > Development@qt-project.org > http://lists.qt-project.org/mailman/listinfo/development -- Regards, Konstantin ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development