Closed jvernet closed 11 months ago
No. But, I wonder which of the frontends is MacOsX ready.
applen
? probably not what people look forqapple
? do you have QT?sa2
? Probably your best betFeel free to comment out lines 36, 37 & 39 from https://github.com/audetto/AppleWin/blob/master/CMakeLists.txt#L34
But then you need to find out how to use ImGui on OsX and change this area (and source code) accordingly. https://github.com/audetto/AppleWin/blob/master/source/frontends/sdl/CMakeLists.txt
If all fails and you can only compile / link SDL2, then you have to manually remove all of this https://github.com/audetto/AppleWin/tree/master/source/frontends/sdl/imgui
You will have problems with libpcap
and libslirp
too. None of which are compulsory, but you will have to add some #ifdef
around.
I can go a little bit further selecting Qt only. sa2 require glesv2
`jeromevernet@macbook ~/D/d/G/A/build (master)> cmake .. -DCMAKE_PREFIX_PATH=/Users/jeromevernet/Qt/5.15.2/clang_64/
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_BUILD_TYPE:
CMAKE_CXX_FLAGS:
CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG
CMAKE_CXX_FLAGS_DEBUG: -g
CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O2 -g -DNDEBUG
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.2.5
-- Checking for module 'minizip'
-- Found minizip, version 1.2.11
-- Checking for module 'slirp'
-- Found slirp, version 4.4.0
-- Checking for module 'libpcap'
-- Found libpcap, version 1.10.1
-- Found Boost: /opt/local/include (found version "1.76.0")
CMake Warning at /Applications/CMake.app/Contents/share/cmake-3.19/Modules/FindBoost.cmake:1219 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.19/Modules/FindBoost.cmake:1341 (_Boost_COMPONENT_DEPENDENCIES)
/Applications/CMake.app/Contents/share/cmake-3.19/Modules/FindBoost.cmake:1950 (_Boost_MISSING_DEPENDENCIES)
source/frontends/common2/CMakeLists.txt:28 (find_package)
-- Found Boost: /opt/local/include (found version "1.76.0") found components: program_options -- Configuring done -- Generating done -- Build files have been written to: /Users/jeromevernet/Documents/dev/Github/AppleWin/build`
But make fail with errors
`jeromevernet@macbook ~/D/d/G/A/build (master)> make -j2
Scanning dependencies of target common2
Scanning dependencies of target appleii
[ 0%] Building CXX object source/CMakeFiles/appleii.dir/Tfe/tfe.cpp.o
[ 1%] Building CXX object source/frontends/common2/CMakeFiles/common2.dir/commonframe.cpp.o
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfe.cpp:27:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/../StdAfx.h:58:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/win.h:16:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:81:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myPlayPosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:82:26: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myWritePosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:83:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
WORD myStatus = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:84:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
LONG myVolume = DSBVOLUME_MAX;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:94:21: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
HRESULT Release() override;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.cpp:1:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/StdAfx.h:58:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/win.h:16:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:81:25: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myPlayPosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:82:26: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myWritePosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:83:17: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
WORD myStatus = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:84:17: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
LONG myVolume = DSBVOLUME_MAX;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:94:21: warning: 'override' keyword is a C++11
extension [-Wc++11-extensions]
HRESULT Release() override;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.cpp:2:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.h:3:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/linuxframe.h:3:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/FrameBase.h:76:14: error: implicit instantiation of undefined template
'std::1::basic_string<char, std::__1::char_traits
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.cpp:45:13: error: no member named
'emplace_back' in 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >'
paths.emplace_back(std::string(path) + '/'+ SHARE_PATH);
~~~~~ ^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.cpp:49:11: error: no member named
'emplace_back' in 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >'
paths.emplace_back(CMAKE_SOURCE_DIR);
~~~~~ ^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.cpp:51:35: warning: range-based for loop is a
C++11 extension [-Wc++11-extensions]
for (const std::string & path : paths)
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.cpp:83:17: error: cannot initialize object
parameter of type 'LinuxFrame' with an expression of type 'common2::CommonFrame'
LinuxFrame::Initialize();
^~~~~~~~~~
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/frontends/common2/commonframe.cpp:88:17: error: cannot initialize object
parameter of type 'LinuxFrame' with an expression of type 'common2::CommonFrame'
LinuxFrame::Destroy();
^~~~~~~
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:30:10: warning: non-portable path to file '"Pcap.h"';
specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "pcap.h"
^~~~~~~~
"Pcap.h"
24 warnings and 6 errors generated.
make[2]: *** [source/frontends/common2/CMakeFiles/common2.dir/commonframe.cpp.o] Error 1
make[1]: *** [source/frontends/common2/CMakeFiles/common2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:30:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/pcap.h:49:10: warning: non-portable path to file '"Bpf.h"'; specified
path differs in case from file name on disk [-Wnonportable-include-path]
#include "bpf.h"
^~~~~~~
"Bpf.h"
[ 3%] Building CXX object source/CMakeFiles/appleii.dir/Tfe/tfesupp.cpp.o
[ 4%] Building CXX object source/CMakeFiles/appleii.dir/Debugger/Debug.cpp.o
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:37:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/StdAfx.h:58:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/win.h:16:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:81:25: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myPlayPosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:82:26: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myWritePosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:83:17: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
WORD myStatus = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:84:17: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
LONG myVolume = DSBVOLUME_MAX;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:94:21: warning: 'override' keyword is a C++11
extension [-Wc++11-extensions]
HRESULT Release() override;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:160:27: error: use of undeclared identifier
'pcap_lib_version'
LogOutput("%s\n", p_pcap_lib_version());
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:152:28: note: expanded from macro 'p_pcap_lib_version'
#define p_pcap_lib_version pcap_lib_version
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:161:31: error: use of undeclared identifier
'pcap_lib_version'
LogFileOutput("%s\n", p_pcap_lib_version());
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:152:28: note: expanded from macro 'p_pcap_lib_version'
#define p_pcap_lib_version pcap_lib_version
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:533:11: error: use of undeclared identifier
'pcap_sendpacket'
if ((*p_pcap_sendpacket)(TfePcapFP, txframe, txlength) == -1) {
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Tfe/tfearch.cpp:150:27: note: expanded from macro 'p_pcap_sendpacket'
#define p_pcap_sendpacket pcap_sendpacket
^
7 warnings and 3 errors generated.
make[2]: *** [source/CMakeFiles/appleii.dir/Tfe/tfearch.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:32:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/StdAfx.h:58:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/win.h:16:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:81:25: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myPlayPosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:82:26: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
size_t myWritePosition = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:83:17: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
WORD myStatus = 0;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:84:17: warning: in-class initialization of
non-static data member is a C++11 extension [-Wc++11-extensions]
LONG myVolume = DSBVOLUME_MAX;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/linux/windows/dsound.h:94:21: warning: 'override' keyword is a C++11
extension [-Wc++11-extensions]
HRESULT Release() override;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:40:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Interface.h:17:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/FrameBase.h:76:14: error: implicit instantiation of undefined template
'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string g_pLastDiskImageName;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:43:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Disk.h:28:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/DiskFormatTrack.h:67:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string m_strReadD5AAxxDetected;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:43:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Disk.h:28:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/DiskFormatTrack.h:45:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string GetReadD5AAxxDetectedString(void) { std::string tmp = m_strReadD5AAxxDetected; m_strReadD5AAxxDetected ...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:43:
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Disk.h:28:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/DiskFormatTrack.h:45:62: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string GetReadD5AAxxDetectedString(void) { std::string tmp = m_strReadD5AAxxDetected; m_strReadD5AAxxDetected ...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:43:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Disk.h:73:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string m_imagename; // <FILENAME> (ie. no extension)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:43:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Disk.h:74:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string m_fullname; // <FILENAME.EXT> or <FILENAME.zip> : This is persisted to the snapshot file
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:43:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Disk.h:75:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string m_strFilenameInZip; // "" or <FILENAME.EXT>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
In file included from /Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:47:
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../SoundCore.h:22:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string name;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:230:20: **error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
const std::string g_FileNameProfile = TEXT("Profile.txt"); // changed from .csv to .txt since Excel doesn't give imp...
^**
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:250:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string g_aSourceFileName;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:290:14: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string g_sFileNameConfig =
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:2039:15: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
std::string sFileName;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:2048:21: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
const std::string sFilePath = g_sCurrentDir + sFileName;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:2350:46: error: invalid operands to binary expression
('std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') and 'const char *')
const std::string sFileName = g_sCurrentDir + pFileName; // TODO: g_sDebugDir
~~~~~~~~~~~~~ ^ ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator:765:1: note: candidate
template ignored: could not match 'reverse_iterator<type-parameter-0-0>' against 'const char *'
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator:1184:1: note: candidate
template ignored: could not match 'move_iterator<type-parameter-0-0>' against 'const char *'
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator:1455:5: note: candidate
template ignored: could not match '__wrap_iter<type-parameter-0-0>' against 'const char *'
operator+(typename __wrap_iter<_Iter1>::difference_type, __wrap_iter<_Iter1>) _NOEXCEPT_DEBUG;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:2350:20: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
const std::string sFileName = g_sCurrentDir + pFileName; // TODO: g_sDebugDir
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:2404:20: **error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
const std::string sFilename = g_sProgramDir + g_sFileNameConfig;**
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:3279:13: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
diskCard.GetCurrentTrackString().c_str(),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:3280:13: error: implicit instantiation of undefined
template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
diskCard.GetCurrentPhaseString().c_str(),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is
declared here
class _LIBCPP_TEMPLATE_VIS basic_string;
^
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/Debug.cpp:3337:32: error: reference to type 'const std::string'
(aka 'const basic_string<char, char_traits<char>, allocator<char> >') could not bind to an lvalue of type 'LPCTSTR'
(aka 'const char *')
diskCard.InsertDisk( iDrive, pDiskName, IMAGE_FORCE_WRITE_PROTECTED, IMAGE_DONT_CREATE );
^~~~~~~~~
/Users/jeromevernet/Documents/dev/Github/AppleWin/source/Debugger/../Disk.h:145:62: note: passing argument to parameter 'pathname'
here
ImageError_e InsertDisk(const int drive, const std::string& pathname, const bool bForceWriteProtected, const bool bC...
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
5 warnings and 20 errors generated.
make[2]: *** [source/CMakeFiles/appleii.dir/Debugger/Debug.cpp.o] Error 1
make[1]: *** [source/CMakeFiles/appleii.dir/all] Error 2
make: *** [all] Error 2
`
The compiler seems to have issues with C++11.
Try to add this
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
make VERBOSE=1
to see exactly what is executedThat shut off C11 warnings
Next, I had to correct "Bpf.h" and "Pcacp.h' in tfearch.cpp (caption in the filename).
Then, there is error with p_cap function, and error in linuxframe.h, like
implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >' std::string g_pLastDiskImageName;
See attached file
macosxError.txt
ar
I wouldn't do that. It should ignore them and use the system header files. You should try to figure out why it cannot find system header files for pcap. I think this is the cause of the other pcap errors too. The "mispelling" is actually a feature, otherwise I would have to remove the files as I want to use system's pcap and not AW's.
common2: it is not needed to QT, comment out the makefile line.
in source/tTfe there is a file Pcap.h.
In tsearch.cpp, a #include "pcap.h"
it should be #include
I need to add #include
I'm making progress... Now it goes to the linking phase, but stop with ld: library not found for -lyaml
libyaml was found before, but cmake do not go in /opt/local/lib where libyaml lib are... Cannot figure out HOW i can add lib path the cmake build system.... There is no more -L option in final make !
I've fixed 3 things you reported (pcap, string and C++11).
Adding many header files should not be required. Which ones did you need?
Re yaml:
try to add statements like this
message("YAML INFO: ${YAML_LIBRARIES} and ${YAML_INCLUDE_DIRS}.")
to
https://github.com/audetto/AppleWin/blob/master/source/CMakeLists.txt#L6
and see what gets printed.
cmake
uses pkg-config
so make sure yours is setup properly.
pkg-config yaml-0.1 --libs
or
pkg-config yaml-0.1 --cflags
for this and other 3rd party libs.
Edit:
unless you need to use
_LINK_LIBRARIES
instead of _LIBRARIES
in places like https://github.com/audetto/AppleWin/blob/master/source/CMakeLists.txt#L244
I need to add some headers like sys/types/h in the network sources
and #include
cmake found yaml: YAML_LIBRARIES: yaml YAML_INCLUDE_DIRS: /opt/local/include YAML_LIBRARY_DIRS: /opt/local/lib
and $>pkg-config yaml-0.1 --libs -L/opt/local/lib -lyaml
cmake simply do not add ANY -L library search path to the link phase. More over, I want to link against static library so that you will need to havev them installed, so I added set(BUILD_SHARED_LIBS OFF) set(CMAKE_EXE_LINKER_FLAGS "-static") link_libraries("-static")
but cmake don't care about it (cmake version 3.21.3)
[ 84%] Linking CXX shared library libappleii.dylib cd /Users/jeromevernet/Documents/dev/Github/AppleWin/build/source && /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/appleii.dir/link.txt --verbose=1 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -o libappleii.dylib -install_name @rpath/libappleii.dylib CMakeFiles/appleii.dir/Tfe/tfe.cpp.o CMakeFiles/appleii.dir/Tfe/tfearch.cpp.o CMakeFiles/appleii.dir/Tfe/tfesupp.cpp.o CMakeFiles/appleii.dir/Debugger/Debug.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Help.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Color.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Disassembler.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Symbols.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_DisassemblerData.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Console.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Assembler.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Parser.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Range.cpp.o CMakeFiles/appleii.dir/Debugger/Debugger_Commands.cpp.o CMakeFiles/appleii.dir/Debugger/Util_MemoryTextFile.cpp.o CMakeFiles/appleii.dir/SSI263.cpp.o CMakeFiles/appleii.dir/Speaker.cpp.o CMakeFiles/appleii.dir/SoundCore.cpp.o CMakeFiles/appleii.dir/AY8910.cpp.o CMakeFiles/appleii.dir/Mockingboard.cpp.o CMakeFiles/appleii.dir/Pravets.cpp.o CMakeFiles/appleii.dir/YamlHelper.cpp.o CMakeFiles/appleii.dir/Log.cpp.o CMakeFiles/appleii.dir/Disk.cpp.o CMakeFiles/appleii.dir/DiskFormatTrack.cpp.o CMakeFiles/appleii.dir/DiskImage.cpp.o CMakeFiles/appleii.dir/DiskImageHelper.cpp.o CMakeFiles/appleii.dir/Harddisk.cpp.o CMakeFiles/appleii.dir/Memory.cpp.o CMakeFiles/appleii.dir/CPU.cpp.o CMakeFiles/appleii.dir/6821.cpp.o CMakeFiles/appleii.dir/NoSlotClock.cpp.o CMakeFiles/appleii.dir/SAM.cpp.o CMakeFiles/appleii.dir/z80emu.cpp.o CMakeFiles/appleii.dir/ParallelPrinter.cpp.o CMakeFiles/appleii.dir/MouseInterface.cpp.o CMakeFiles/appleii.dir/LanguageCard.cpp.o CMakeFiles/appleii.dir/RGBMonitor.cpp.o CMakeFiles/appleii.dir/NTSC.cpp.o CMakeFiles/appleii.dir/NTSC_CharSet.cpp.o CMakeFiles/appleii.dir/CardManager.cpp.o CMakeFiles/appleii.dir/Disk2CardManager.cpp.o CMakeFiles/appleii.dir/Riff.cpp.o CMakeFiles/appleii.dir/SaveState.cpp.o CMakeFiles/appleii.dir/SynchronousEventManager.cpp.o CMakeFiles/appleii.dir/Video.cpp.o CMakeFiles/appleii.dir/Core.cpp.o CMakeFiles/appleii.dir/Utilities.cpp.o CMakeFiles/appleii.dir/FrameBase.cpp.o CMakeFiles/appleii.dir/Configuration/PropertySheetHelper.cpp.o CMakeFiles/appleii.dir/linux/windows/handles.cpp.o CMakeFiles/appleii.dir/linux/windows/files.cpp.o CMakeFiles/appleii.dir/linux/windows/time.cpp.o CMakeFiles/appleii.dir/linux/windows/stringcb.cpp.o CMakeFiles/appleii.dir/linux/windows/strings.cpp.o CMakeFiles/appleii.dir/linux/windows/misc.cpp.o CMakeFiles/appleii.dir/linux/windows/winbase.cpp.o CMakeFiles/appleii.dir/linux/windows/winuser.cpp.o CMakeFiles/appleii.dir/linux/windows/dsound.cpp.o CMakeFiles/appleii.dir/linux/windows/guiddef.cpp.o CMakeFiles/appleii.dir/linux/windows/dmusicc.cpp.o CMakeFiles/appleii.dir/linux/windows/winnls.cpp.o CMakeFiles/appleii.dir/linux/resources.cpp.o CMakeFiles/appleii.dir/linux/benchmark.cpp.o CMakeFiles/appleii.dir/linux/paddle.cpp.o CMakeFiles/appleii.dir/linux/version.cpp.o CMakeFiles/appleii.dir/linux/registry.cpp.o CMakeFiles/appleii.dir/linux/keyboard.cpp.o CMakeFiles/appleii.dir/linux/linuxframe.cpp.o CMakeFiles/appleii.dir/linux/context.cpp.o CMakeFiles/appleii.dir/linux/tape.cpp.o CMakeFiles/appleii.dir/linux/network/uthernet2.cpp.o CMakeFiles/appleii.dir/linux/network/tfe2.cpp.o CMakeFiles/appleii.dir/linux/network/slirp2.cpp.o CMakeFiles/appleii.dir/linux/duplicates/Debugger_Display.cpp.o CMakeFiles/appleii.dir/linux/duplicates/Debugger_Win32.cpp.o CMakeFiles/appleii.dir/linux/duplicates/Joystick.cpp.o CMakeFiles/appleii.dir/linux/duplicates/SerialComms.cpp.o CMakeFiles/appleii.dir/linux/duplicates/PropertySheet.cpp.o CMakeFiles/appleii.dir/Z80VICE/z80.cpp.o CMakeFiles/appleii.dir/Z80VICE/z80mem.cpp.o CMakeFiles/appleii.dir/Z80VICE/daa.cpp.o -static -lyaml -lminizip -lpcap ld: library not found for -lyaml
Try now. I've added https://github.com/audetto/AppleWin/blob/master/source/CMakeLists.txt#L250
_LINK_LIBRARIES instead of _LIBRARIES in places like.. do the job.
Now, I'm dealing with a mixe of 64 and 32 bits library
I need to add some headers like sys/types/h in the network sources and #include everywhere else
you will have to be more precise than that.
_LINK_LIBRARIES instead of _LIBRARIES in places like.. do the job.
I've added the library dir separately. Will do it to the other cases too.
Now, I'm dealing with a mixe of 64 and 32 bits library
retry with my latest code.
Back with a fresh git clone. Will need to note what I'm doing to go at least at link time.
I forgot to mention this error:
/Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/Debugger/Debug.cpp:814:53: error: cannot pass object of non-trivial type 'const std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> >') through variadic function; call will abort at runtime [-Wnon-pod-varargs] ConsoleBufferPushFormat ( sText, " Saved: %s", g_FileNameProfile );
I simply removed g_FileNameProfile in such ConsoleBufferFormat calls.
In benchmark.cpp it complain about Interface.h. Need to use "../Interface.h" Same in linuxframe `[ 1%] Building CXX object source/CMakeFiles/appleii.dir/linux/benchmark.cpp.o /Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:12:10: warning: non-portable path to file "interface.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
^~~~~~~~~~~~~
"interface.h"
/Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:20:3: error: unknown type name 'FrameBase' FrameBase & frame = GetFrame(); ^ /Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:20:23: error: use of undeclared identifier 'GetFrame' FrameBase & frame = GetFrame(); ^ /Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:21:19: error: use of undeclared identifier 'GetVideo' Video & video = GetVideo(); ^ 1 warning and 3 errors generated.`
Back with a fresh git clone. Will need to note what I'm doing to go at least at link time.
I forgot to mention this error:
/Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/Debugger/Debug.cpp:814:53: error: cannot pass object of non-trivial type 'const std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> >') through variadic function; call will abort at runtime [-Wnon-pod-varargs] ConsoleBufferPushFormat ( sText, " Saved: %s", g_FileNameProfile );
I simply removed g_FileNameProfile in such ConsoleBufferFormat calls.
Yes, I am aware of some issues, I have a PR ready. But this has to go to AppleWin, so it will take a bit longer, for now, just comment out.
I am pleased to see that clang
warns by default.
In benchmark.cpp it complain about Interface.h. Need to use "../Interface.h" Same in linuxframe
[ 1%] Building CXX object source/CMakeFiles/appleii.dir/linux/benchmark.cpp.o /Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:12:10: warning: non-portable path to file "interface.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] #include "Interface.h" ^~~~~~~~~~~~~ "interface.h" /Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:20:3: error: unknown type name 'FrameBase' FrameBase & frame = GetFrame(); ^ /Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:20:23: error: use of undeclared identifier 'GetFrame' FrameBase & frame = GetFrame(); ^ /Users/jeromevernet/Documents/dev/Github/temp/AppleWin/source/linux/benchmark.cpp:21:19: error: use of undeclared identifier 'GetVideo' Video & video = GetVideo(); ^ 1 warning and 3 errors generated.
Good point too. I will rename to avoid path warnings.
Renamed.
In uthernet2.cpp, need to add:
#include <unistd.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <poll.h>
// fix SOCK_NONBLOCK for e.g. macOS
#ifndef SOCK_NONBLOCK
#include <fcntl.h>
#define SOCK_NONBLOCK O_NONBLOCK
#endif
#define
Next: the gz thing are not obvious as I have 64Bits minizip and gzip lib: lipo -info /opt/local/lib/libminizip.a Architectures in the fat file: /opt/local/lib/libminizip.a are: x86_64 i386
` Undefined symbols for architecture x86_64: "SingleStep(bool)", referenced from: DebugContinueStepping(bool) in Debug.cpp.o
"registerSoundBuffer(IDirectSoundBuffer)", referenced from: IDirectSound::CreateSoundBuffer(_DSBUFFERDESC const, IDirectSoundBuffer*, IUnknown) in dsound.cpp.o
"unregisterSoundBuffer(IDirectSoundBuffer*)", referenced from: IDirectSoundBuffer::Release() in dsound.cpp.o
"_crc32", referenced from: CWOZHelper::CreateEmptyDisk(unsigned int&) in DiskImageHelper.cpp.o CDiskImageHelper::Detect(unsigned char, unsigned int, char const, unsigned int&, ImageInfo) in DiskImageHelper.cpp.o CWOZ1Image::Write(ImageInfo, float, unsigned char, int) in DiskImageHelper.cpp.o CWOZ2Image::Write(ImageInfo, float, unsigned char, int) in DiskImageHelper.cpp.o _unzReadCurrentFile in libminizip.a(unzip.o) _zipWriteInFileInZip in libminizip.a(zip.o) "_deflate", referenced from: _zipWriteInFileInZip in libminizip.a(zip.o) _zipCloseFileInZipRaw64 in libminizip.a(zip.o) "_deflateEnd", referenced from: _zipCloseFileInZipRaw64 in libminizip.a(zip.o) "deflateInit2", referenced from: _zipOpenNewFileInZip4_64 in libminizip.a(zip.o) "_get_crc_table", referenced from: _zipOpenNewFileInZip4_64 in libminizip.a(zip.o) "_gzclose", referenced from: CImageBase::WriteImageData(ImageInfo, unsigned char, unsigned int, long) in DiskImageHelper.cpp.o CImageHelperBase::CheckGZipFile(char const, ImageInfo) in DiskImageHelper.cpp.o "_gzopen", referenced from: CImageBase::WriteImageData(ImageInfo, unsigned char, unsigned int, long) in DiskImageHelper.cpp.o CImageHelperBase::CheckGZipFile(char const, ImageInfo) in DiskImageHelper.cpp.o "_gzread", referenced from: CImageHelperBase::CheckGZipFile(char const, ImageInfo) in DiskImageHelper.cpp.o "_gzwrite", referenced from: CImageBase::WriteImageData(ImageInfo, unsigned char*, unsigned int, long) in DiskImageHelper.cpp.o "_inflate", referenced from: _unzReadCurrentFile in libminizip.a(unzip.o) "_inflateEnd", referenced from: _unzCloseCurrentFile in libminizip.a(unzip.o) "inflateInit2", referenced from: _unzOpenCurrentFile3 in libminizip.a(unzip.o) ld: symbol(s) not found for architecture x86_64 `
OK, couple of things
libz
explicitly toolibappleiie
is not fully resolved. it leaves undefined a few things that depend on the frontend. a sort of "link-time" interface. ld
lets me do it, but your linker is probably more strict.I've created a new STATIC branch https://github.com/audetto/AppleWin/tree/static
Try.
Now it complain about missing zipinfo.... May be minizip at least on macosx do not work. There is libz and zlib directory in applwin tree, may be use them ?
What is zipinfo exactly?
I think system libraries are much more portable and require no maintenance. But give it a go.
I needed libzip and not minizip for another port... so I need to activate/deactivate minizip libzip and so on... Frameworks on Mac are so easy to use rather than linux libraries.... Simply clic on the one you need, the version you need,embed it in your binary, and done... but cmake struggle to find the correct one.
Ok, I'm going a litle bit further with the static branch. Now it goes to link qapple and again complain about missing library yaml, etc. You need to add them like you did for libappleII
I've added option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) in sources/CMakelist.txt so that ld will use static libs rather that .dylib.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O3 -DNDEBUG -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/qapple.dir/qapple_autogen/mocs_compilation.cpp.o CMakeFiles/qapple.dir/main.cpp.o CMakeFiles/qapple.dir/qapple.cpp.o CMakeFiles/qapple.dir/preferences.cpp.o CMakeFiles/qapple.dir/emulator.cpp.o CMakeFiles/qapple.dir/memorycontainer.cpp.o CMakeFiles/qapple.dir/gamepadpaddle.cpp.o CMakeFiles/qapple.dir/qvideo.cpp.o CMakeFiles/qapple.dir/configuration.cpp.o CMakeFiles/qapple.dir/options.cpp.o CMakeFiles/qapple.dir/loggingcategory.cpp.o CMakeFiles/qapple.dir/viewbuffer.cpp.o CMakeFiles/qapple.dir/qdirectsound.cpp.o CMakeFiles/qapple.dir/qtframe.cpp.o CMakeFiles/qapple.dir/qapple_autogen/EWIEGA46WW/qrc_qapple.cpp.o -o ../../../qapple -Wl,-rpath,/Users/jeromevernet/Qt/5.15.2/clang_64/lib /Users/jeromevernet/Qt/5.15.2/clang_64/lib/QtGamepad.framework/QtGamepad /Users/jeromevernet/Qt/5.15.2/clang_64/lib/QtMultimedia.framework/QtMultimedia ../../libappleii.a QHexView/libqhexview-lib.a /Users/jeromevernet/Qt/5.15.2/clang_64/lib/QtNetwork.framework/QtNetwork -lyaml -lminizip -lpcap -lz /Users/jeromevernet/Qt/5.15.2/clang_64/lib/QtWidgets.framework/QtWidgets /Users/jeromevernet/Qt/5.15.2/clang_64/lib/QtGui.framework/QtGui /Users/jeromevernet/Qt/5.15.2/clang_64/lib/QtCore.framework/QtCore ld: library not found for -lyaml
Uhm.. there was a mistake https://github.com/audetto/AppleWin/commit/3904cf58b2bd04845893f5c361842e40cfb3bb9e which affected libraries in non standard locations (which I cant really test).
Otherwise poke around https://github.com/audetto/AppleWin/blob/master/source/CMakeLists.txt#L250 and https://github.com/audetto/AppleWin/blob/master/source/frontends/qt/CMakeLists.txt#L51 adding -L
until it works.
Then we can fix cmake.
I'm making some progess ! Well, I cannot find how to add static lib to qappel CMakeFiles, the same that work for libapple do not work. Simplu modified by hand link.txt.
Got something/ no image no sound !
Yesss !! No sound, but something show (using Apple//e emulation).
Fantastic. Now
This one in particular: https://github.com/ocornut/imgui/tree/master/examples/example_sdl_metal
Even better, this one: https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl3/main.cpp
It claims to work on __APPLE__
, that would be the easiest to support.
It's working
Then I will integrate the if defs. You will have to put back "common2" and "sdl" in the makefiles and work your way through the other issues.
You will have to agree with me that Mac OS X development is a pain. If you could run a VM for it, it would be so much easier!
Ok, in that example the code uses GL 3.2 Core on Apple, while I was using GLES 2 (or 3) to be compatible with the Pi3/4.
Unless Apple supports GLES 2 or 3, the best approach is that I first support GL 3.2 (which I can develop on my desktop), and then the step to Apple will be shorter.
the example_sdl_opengl2 is also working, metal should be the best thing to use.
Well, if you developpe for MacOsX, it's pretty easy. But porting (multiple) thing from Linux is a pain due to all these library you have to use. On MacOsX, we use Framework (simply packaged library), you can have as much version as you want. Linux tools are not very friendly... CMake try to find Framework, but often fail. I'm working on Hatari, for example, and spent a lot of time to make Frameworks pour all library used. It can be done also with Applewin, to have an XCode project. But I'm not good with cmake.... You can run a VM of Apple, I'm using a VM with Oracle VirtualBox. It's painfully slow on my PC wich only have 8Gb of RAM, but it work. I can provide you the VM. Thanks for support !
If you say MacOS is so easy to use, why don't you extend this https://github.com/audetto/AppleWin/blob/master/.travis.yml to include the Mac OS CI environment.
They claim to support it
https://docs.travis-ci.com/user/reference/osx/
It would be much easier going forward having a way to test the code.
Except that my travis credit has run out. But if you open a travis account they give you more.
I never took time to look at Travis CI. May try to find how it work.
I finally found a libGLESV2 library on my mac. I don not know if it's complete ? But sa2 build and show me this: `jeromevernet@macbook ~/D/d/G/t/A/build ((51b66041…)) [2]> ./sa2
SDL: 4 drivers 0: metal 1: opengl 2: opengles2 3: software Active driver (-1): metal SDL_RENDERER_SOFTWARE: 0 SDL_RENDERER_ACCELERATED: 1 SDL_RENDERER_PRESENTVSYNC: 1 SDL_RENDERER_TARGETTEXTURE: 1 Supported pixel formats: SDL_PIXELFORMAT_ARGB8888 SDL_PIXELFORMAT_ABGR8888 SDL_PIXELFORMAT_YV12 SDL_PIXELFORMAT_IYUV SDL_PIXELFORMAT_NV12 SDL_PIXELFORMAT_NV21 Selected format: SDL_PIXELFORMAT_ARGB8888 [DSInit] PC=00000000, WC=00000000, Diff=00000000 SDL_GL_SetSwapInterval: No OpenGL context has been made current`
Your system supports GLES2, good.
Try it: --sdl-driver 2
or if you still get the SDL_GL_SetSwapInterval
error, disable it: --gl-swap 0
, but your refresh rate will be random.
Anyway, this is not what you want.
What you really want is sa2 --imgui
(got to make this the default). If this works, use it and enjoy it.
./sa2 --imgui=>Could not load EGL library
sa2 --sdl-driver 2 say Metal and OpenGL not supported on same window
sa2 --sdl-driver 1 start and show a big resizabe windows (what to do then ?)
0 and 3 do not start (SDL_GL_SetSwapInterval: No OpenGL context has been made current
So,
About imgui
you will have to poke around the initialisation and see if some changes fix it.
You tried https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl3/main.cpp#L37 but what my code does is https://github.com/ocornut/imgui/blob/master/examples/example_sdl_opengl3/main.cpp#L30
So define IMGUI_IMPL_OPENGL_ES2
and try the example and see if it works or you get the same problem.
Otherwise I will have to run ImGui with OpenGL 3.2 (so NOT GLES).
sa2 --sdl-driver 2 say Metal and OpenGL not supported on same window
can you figure out which line causes it. probably the same as the next error.
0 and 3 do not start (SDL_GL_SetSwapInterval: No OpenGL context has been made current
have you disabled it --gl-swap 0
?
Just comment out SDL_GL_SetSwapInterval
completely and try again.
--sdl-driver 1 start and show a big resizabe windows (what to do then ?)
this should be the emulator. give it a disk (sa2 --help
) and see if it runs it.
if you do sa2 --qt-ini
it will reuse the same settings as your last qapple
run.
./sa2 --sdl-driver x --gl-swap 0 work with x=0,1 or 3
So I tried to replace in SDLImGuiFrame and it crash
IMGUI_VERSION: 1.84 WIP GL_VENDOR: fish: Job 1, './sa2 --imgui' terminated by signal SIGSEGV (Erreur de frontière d'adresse)
#if defined(__APPLE__)
// GL 3.2 Core + GLSL 150
const char* glsl_version = "#version 150";
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
#elif
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, SDL_CONTEXT_MAJOR); // from local gles.h
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
#endif
Yes, more or less it is correct.
Attach gdb
and figure out when it crashes.
If you managed to run the example, you are not far from running it properly.
Crash happen in
std::cerr << "GL_VENDOR: " << glGetString(GL_VENDOR) << std::endl; std::cerr << "GL_RENDERER: " << glGetString(GL_RENDERER) << std::endl; std::cerr << "GL_VERSION: " << glGetString(GL_VERSION) << std::endl; std::cerr << "GL_SHADING_LANGUAGE_VERSION: " << glGetString(GL_SHADING_LANGUAGE_VERSION) << std::endl;
....
So removed, it start, but
Video refresh rate: 60 Hz, 16.67 ms ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile vertex shader! With GLSL: #version 100
I think I'm not using the correct GLES library. IMGUI example do not use it at all ?
That is what I am trying to tell you. I've changed the code to work with OpenGL as well (branch static)
On Darwin it goes to OpenGL directly.
Here
https://github.com/audetto/AppleWin/blob/static/source/frontends/sdl/imgui/glselector.h#L46
see if you need further adjustments.
BTW, colors are wrong, got to figure out how to flip them in OpenGL.
Fixed that too. Try now.
In fact, there is NO opengles port to MacOsX. I tried to use an old lib that came with a product, tweaking it. Not Working....
The latest code does not use GLES for Mac, and should not try to link it either. If it does, then I made a mistake on the cmake configuration.
Now, the example and my code are the same on a Mac, and (pending errors) should just work. If you see a black screen, try to click on the menu and see if that works.
I have updated master with all the issues you have reported.
It should now just work, but only you can check. If I have missed something, please comment below.
Hello,
I'm trying to build on MacOsX (10.13). cmake ask for libevdev and libglesv2. None of them seems to exist on MacOsX.
Are they totally mandatory ?