mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
macos tweaks
This commit is contained in:
10
PyInt.cpp
10
PyInt.cpp
@@ -163,10 +163,9 @@ auto python_taskqueue::init() -> bool {
|
|||||||
else
|
else
|
||||||
Py_SetPythonHome("macpython");
|
Py_SetPythonHome("macpython");
|
||||||
#endif
|
#endif
|
||||||
Py_Initialize();
|
Py_InitializeEx(0);
|
||||||
PyEval_InitThreads();
|
|
||||||
|
|
||||||
m_initialized = true;
|
PyEval_InitThreads();
|
||||||
|
|
||||||
PyObject *stringiomodule { nullptr };
|
PyObject *stringiomodule { nullptr };
|
||||||
PyObject *stringioclassname { nullptr };
|
PyObject *stringioclassname { nullptr };
|
||||||
@@ -213,6 +212,8 @@ auto python_taskqueue::init() -> bool {
|
|||||||
if( false == worker.joinable() ) { return false; }
|
if( false == worker.joinable() ) { return false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_initialized = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
release_and_exit:
|
release_and_exit:
|
||||||
@@ -246,7 +247,8 @@ void python_taskqueue::exit() {
|
|||||||
// adds specified task along with provided collection of data to the work queue. returns true on success
|
// adds specified task along with provided collection of data to the work queue. returns true on success
|
||||||
auto python_taskqueue::insert( task_request const &Task ) -> bool {
|
auto python_taskqueue::insert( task_request const &Task ) -> bool {
|
||||||
|
|
||||||
if( ( false == Global.python_enabled )
|
if( !m_initialized
|
||||||
|
|| ( false == Global.python_enabled )
|
||||||
|| ( Task.renderer.empty() )
|
|| ( Task.renderer.empty() )
|
||||||
|| ( Task.input == nullptr )
|
|| ( Task.input == nullptr )
|
||||||
|| ( Task.target == 0 ) ) { return false; }
|
|| ( Task.target == 0 ) ) { return false; }
|
||||||
|
|||||||
@@ -143,7 +143,9 @@ eu07_application::init( int Argc, char *Argv[] ) {
|
|||||||
if( ( result = init_data() ) != 0 ) {
|
if( ( result = init_data() ) != 0 ) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if( Global.python_enabled ) {
|
||||||
m_taskqueue.init();
|
m_taskqueue.init();
|
||||||
|
}
|
||||||
if( ( result = init_modes() ) != 0 ) {
|
if( ( result = init_modes() ) != 0 ) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -735,6 +737,7 @@ eu07_application::init_glfw() {
|
|||||||
// activate core profile for opengl 3.3 renderer
|
// activate core profile for opengl 3.3 renderer
|
||||||
if( !Global.gfx_usegles ) {
|
if( !Global.gfx_usegles ) {
|
||||||
glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE );
|
glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE );
|
||||||
|
glfwWindowHint( GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE );
|
||||||
glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 3 );
|
glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 3 );
|
||||||
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 3 );
|
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 3 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,12 +35,22 @@ jobs:
|
|||||||
sudo xcode-select -s /Applications/Xcode_12.3.app
|
sudo xcode-select -s /Applications/Xcode_12.3.app
|
||||||
displayName: 'Setup Xcode'
|
displayName: 'Setup Xcode'
|
||||||
- script: |
|
- script: |
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install glew glfw libpng glm luajit libserialport libsndfile asio pkg-config
|
cd /tmp
|
||||||
|
git clone https://github.com/microsoft/vcpkg
|
||||||
|
cd vcpkg
|
||||||
|
git remote add milek https://github.com/Milek7/vcpkg
|
||||||
|
git fetch milek
|
||||||
|
git checkout c0020eb4
|
||||||
|
./bootstrap-vcpkg.sh
|
||||||
|
./vcpkg install glfw3:x64-osx libpng:x64-osx libsndfile:x64-osx asio:x64-osx
|
||||||
|
git cherry-pick 9b7f342
|
||||||
|
git cherry-pick f1b4a0e
|
||||||
|
MACOSX_DEPLOYMENT_TARGET="10.12" ./vcpkg install luajit:x64-osx
|
||||||
displayName: 'Install dependencies'
|
displayName: 'Install dependencies'
|
||||||
- script: |
|
- script: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_ZMQ=OFF -DWITH_OPENVR=OFF
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_TOOLCHAIN_FILE=/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-osx -DWITH_ZMQ=OFF -DWITH_OPENVR=OFF -DWITH_UART=OFF
|
||||||
cmake --build .
|
cmake --build .
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
@@ -49,10 +59,10 @@ jobs:
|
|||||||
artifactName: binaries_macos
|
artifactName: binaries_macos
|
||||||
displayName: 'Publish binaries'
|
displayName: 'Publish binaries'
|
||||||
|
|
||||||
- job: macos1015_arm64
|
- job: macos11_arm64
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'macOS-10.15'
|
vmImage: 'macOS-10.15'
|
||||||
displayName: 'MacOS 10.15 ARM64'
|
displayName: 'MacOS 11.1 ARM64'
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
sudo xcode-select -s /Applications/Xcode_12.3.app
|
sudo xcode-select -s /Applications/Xcode_12.3.app
|
||||||
@@ -67,6 +77,7 @@ jobs:
|
|||||||
./bootstrap-vcpkg.sh
|
./bootstrap-vcpkg.sh
|
||||||
./vcpkg install glfw3:arm64-osx libpng:arm64-osx libsndfile:arm64-osx asio:arm64-osx
|
./vcpkg install glfw3:arm64-osx libpng:arm64-osx libsndfile:arm64-osx asio:arm64-osx
|
||||||
git cherry-pick 9b7f342
|
git cherry-pick 9b7f342
|
||||||
|
git cherry-pick ea5d2d7
|
||||||
./vcpkg install luajit:arm64-osx
|
./vcpkg install luajit:arm64-osx
|
||||||
displayName: 'Install dependencies'
|
displayName: 'Install dependencies'
|
||||||
- script: |
|
- script: |
|
||||||
|
|||||||
Reference in New Issue
Block a user