Enable compiling on macOS 64-bit using llvm

Closes #6
This commit is contained in:
Leroy Hopson 2020-11-20 09:00:03 +07:00 committed by Leroy Hopson
parent 007182b117
commit c075ae7418
3 changed files with 26 additions and 3 deletions

View file

@ -44,3 +44,19 @@ jobs:
with: with:
name: bin name: bin
path: addons/godot_xterm/native/bin/*.dll path: addons/godot_xterm/native/bin/*.dll
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install SCons software construction tool
run: brew install scons
- name: Buid for macOS 64-bit using llvm
run: |
cd addons/godot_xterm/native
scons platform=osx target=release bits=64
- uses: actions/upload-artifact@v2
with:
name: bin
path: addons/godot_xterm/native/bin/*.dylib

View file

@ -194,8 +194,7 @@ Default(libtsm)
# Build libgodot-xterm. # Build libgodot-xterm.
#env.Append(CCFLAGS=['-std=c++14']) env.Append(CXXFLAGS=['-std=c++14'])
env.Append(CPPPATH=[ env.Append(CPPPATH=[
'src/', 'src/',
'external/libtsm/build/src/tsm', 'external/libtsm/build/src/tsm',

View file

@ -1,9 +1,17 @@
#include "pseudoterminal.h" #include "pseudoterminal.h"
#include <pty.h>
#include <unistd.h> #include <unistd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <termios.h> #include <termios.h>
// Platform specific includes.
#if defined(PLATFORM_LINUX)
#include <pty.h>
#endif
#if defined(PLATFORM_OSX)
#include <util.h>
#include <sys/ioctl.h>
#endif
using namespace godot; using namespace godot;
void Pseudoterminal::_register_methods() void Pseudoterminal::_register_methods()