DiskImagery64
DiskImagery64 copied to clipboard
Compiling for macOS Big Sur
I've managed to almost compile the binary for macOS Bug Sur:
Installed QT:
brew install qt
Edited the project.pro
and replace the QMAKE_MAC_SDK
path to:
QMAKE_MAC_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
Finally run make
...
But then got these errors:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -fPIC -std=gnu++1z -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -mmacosx-version-min=11 -Wall -Wextra -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../base -I/usr/local/lib/QtNetwork.framework/Headers -I/usr/local/lib/QtCore.framework/Headers -I. -I/usr/local/share/qt/mkspecs/macx-clang -F/usr/local/lib -o netdrivedevice.o netdrivedevice.cpp
netdrivedevice.cpp:146:29: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
if ((openMode != WRITE) || (openMode != APPEND)) {
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
netdrivedevice.cpp:218:5: error: unknown type name 'QRegExp'
QRegExp globPat(glob, Qt::CaseSensitive, QRegExp::Wildcard);
^
netdrivedevice.cpp:218:46: error: use of undeclared identifier 'QRegExp'
QRegExp globPat(glob, Qt::CaseSensitive, QRegExp::Wildcard);
^
netdrivedevice.cpp:301:15: error: no member named 'sprintf' in 'QString'; did you mean 'asprintf'?
m_message.sprintf("%02d,%s,00,00", msg, txt);
^~~~~~~
asprintf
Investigating...
Got passed through these but stuck again with #include <QDirModel>
– it should exist in [email protected]_1.big_sur.bottle.tar.gz
.
Seems it's been obsolete: https://www.qt.io/blog/2010/01/08/qdirmodel-is-now-obsolete-qfilesystemmodel-is-taking-the-job
same on Mac Monteray 12.1
first ran cmake then make
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -fPIC -std=gnu++1z -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -mmacosx-version-min=12 -Wall -Wextra -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../base -I/usr/local/lib/QtNetwork.framework/Headers -I/usr/local/lib/QtCore.framework/Headers -I. -I/usr/local/share/qt/mkspecs/macx-clang -F/usr/local/lib -o netdrivedevice.o netdrivedevice.cpp
netdrivedevice.cpp:146:29: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
if ((openMode != WRITE) || (openMode != APPEND)) {
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
netdrivedevice.cpp:218:5: error: unknown type name 'QRegExp'
QRegExp globPat(glob, Qt::CaseSensitive, QRegExp::Wildcard);
^
netdrivedevice.cpp:218:46: error: use of undeclared identifier 'QRegExp'
QRegExp globPat(glob, Qt::CaseSensitive, QRegExp::Wildcard);
^
netdrivedevice.cpp:301:15: error: no member named 'sprintf' in 'QString'; did you mean 'asprintf'?
m_message.sprintf("%02d,%s,00,00", msg, txt);
^~~~~~~
asprintf
/usr/local/lib/QtCore.framework/Headers/qstring.h:502:20: note: 'asprintf' declared here
static QString asprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(1, 2);
^
1 warning and 3 errors generated.
make[1]: *** [netdrivedevice.o] Error 1
make: *** [sub-net-make_first] Error 2
alright, I have some time this weekend free to investigate compilation under MacOS thanks for the info
excellent !
Would it be possible to add a homebrew formula for this project?