Merge pull request #63225 from bruvzg/mac_rename
This commit is contained in:
commit
a9e4eac7b9
245 changed files with 1151 additions and 1149 deletions
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
|
@ -139,10 +139,10 @@ doc_classes/* @godotengine/documentation
|
||||||
# Platform
|
# Platform
|
||||||
|
|
||||||
/platform/android/ @godotengine/android
|
/platform/android/ @godotengine/android
|
||||||
/platform/iphone/ @godotengine/ios
|
/platform/ios/ @godotengine/ios
|
||||||
/platform/javascript/ @godotengine/html5
|
/platform/javascript/ @godotengine/html5
|
||||||
/platform/linuxbsd/ @godotengine/linux-bsd
|
/platform/linuxbsd/ @godotengine/linux-bsd
|
||||||
/platform/osx/ @godotengine/macos
|
/platform/macos/ @godotengine/macos
|
||||||
/platform/uwp/ @godotengine/uwp
|
/platform/uwp/ @godotengine/uwp
|
||||||
/platform/windows/ @godotengine/windows
|
/platform/windows/ @godotengine/windows
|
||||||
|
|
||||||
|
|
2
.github/workflows/ios_builds.yml
vendored
2
.github/workflows/ios_builds.yml
vendored
|
@ -30,7 +30,7 @@ jobs:
|
||||||
uses: ./.github/actions/godot-build
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
sconsflags: ${{ env.SCONSFLAGS }}
|
sconsflags: ${{ env.SCONSFLAGS }}
|
||||||
platform: iphone
|
platform: ios
|
||||||
target: release
|
target: release
|
||||||
tools: false
|
tools: false
|
||||||
tests: false
|
tests: false
|
||||||
|
|
4
.github/workflows/macos_builds.yml
vendored
4
.github/workflows/macos_builds.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
target: release_debug
|
target: release_debug
|
||||||
tools: true
|
tools: true
|
||||||
tests: true
|
tests: true
|
||||||
bin: "./bin/godot.osx.opt.tools.64"
|
bin: "./bin/godot.macos.opt.tools.64"
|
||||||
|
|
||||||
- name: Template (target=release, tools=no)
|
- name: Template (target=release, tools=no)
|
||||||
cache-name: macos-template
|
cache-name: macos-template
|
||||||
|
@ -49,7 +49,7 @@ jobs:
|
||||||
uses: ./.github/actions/godot-build
|
uses: ./.github/actions/godot-build
|
||||||
with:
|
with:
|
||||||
sconsflags: ${{ env.SCONSFLAGS }}
|
sconsflags: ${{ env.SCONSFLAGS }}
|
||||||
platform: osx
|
platform: macos
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
tools: ${{ matrix.tools }}
|
tools: ${{ matrix.tools }}
|
||||||
tests: ${{ matrix.tests }}
|
tests: ${{ matrix.tests }}
|
||||||
|
|
18
SConstruct
18
SConstruct
|
@ -260,7 +260,7 @@ else:
|
||||||
):
|
):
|
||||||
selected_platform = "linuxbsd"
|
selected_platform = "linuxbsd"
|
||||||
elif sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
selected_platform = "osx"
|
selected_platform = "macos"
|
||||||
elif sys.platform == "win32":
|
elif sys.platform == "win32":
|
||||||
selected_platform = "windows"
|
selected_platform = "windows"
|
||||||
else:
|
else:
|
||||||
|
@ -272,6 +272,20 @@ else:
|
||||||
if selected_platform != "":
|
if selected_platform != "":
|
||||||
print("Automatically detected platform: " + selected_platform)
|
print("Automatically detected platform: " + selected_platform)
|
||||||
|
|
||||||
|
if selected_platform in ["macos", "osx"]:
|
||||||
|
if selected_platform == "osx":
|
||||||
|
# Deprecated alias kept for compatibility.
|
||||||
|
print('Platform "osx" has been renamed to "macos" in Godot 4.0. Building for platform "macos".')
|
||||||
|
# Alias for convenience.
|
||||||
|
selected_platform = "macos"
|
||||||
|
|
||||||
|
if selected_platform in ["ios", "iphone"]:
|
||||||
|
if selected_platform == "iphone":
|
||||||
|
# Deprecated alias kept for compatibility.
|
||||||
|
print('Platform "iphone" has been renamed to "ios" in Godot 4.0. Building for platform "ios".')
|
||||||
|
# Alias for convenience.
|
||||||
|
selected_platform = "ios"
|
||||||
|
|
||||||
if selected_platform in ["linux", "bsd", "x11"]:
|
if selected_platform in ["linux", "bsd", "x11"]:
|
||||||
if selected_platform == "x11":
|
if selected_platform == "x11":
|
||||||
# Deprecated alias kept for compatibility.
|
# Deprecated alias kept for compatibility.
|
||||||
|
@ -554,7 +568,7 @@ if selected_platform in platform_list:
|
||||||
)
|
)
|
||||||
# Apple LLVM versions differ from upstream LLVM version \o/, compare
|
# Apple LLVM versions differ from upstream LLVM version \o/, compare
|
||||||
# in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
|
# in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
|
||||||
elif env["platform"] == "osx" or env["platform"] == "iphone":
|
elif env["platform"] == "macos" or env["platform"] == "ios":
|
||||||
vanilla = methods.is_vanilla_clang(env)
|
vanilla = methods.is_vanilla_clang(env)
|
||||||
if vanilla and cc_version_major < 6:
|
if vanilla and cc_version_major < 6:
|
||||||
print(
|
print(
|
||||||
|
|
|
@ -129,7 +129,7 @@ if env["builtin_zstd"]:
|
||||||
"decompress/zstd_decompress_block.c",
|
"decompress/zstd_decompress_block.c",
|
||||||
"decompress/zstd_decompress.c",
|
"decompress/zstd_decompress.c",
|
||||||
]
|
]
|
||||||
if env["platform"] in ["android", "iphone", "linuxbsd", "osx"]:
|
if env["platform"] in ["android", "ios", "linuxbsd", "macos"]:
|
||||||
# Match platforms with ZSTD_ASM_SUPPORTED in common/portability_macros.h
|
# Match platforms with ZSTD_ASM_SUPPORTED in common/portability_macros.h
|
||||||
thirdparty_zstd_sources.append("decompress/huf_decompress_amd64.S")
|
thirdparty_zstd_sources.append("decompress/huf_decompress_amd64.S")
|
||||||
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]
|
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]
|
||||||
|
|
|
@ -488,7 +488,7 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
|
||||||
// We need to test both possibilities as extensions for Linux binaries are optional
|
// We need to test both possibilities as extensions for Linux binaries are optional
|
||||||
// (so both 'mygame.bin' and 'mygame' should be able to find 'mygame.pck').
|
// (so both 'mygame.bin' and 'mygame' should be able to find 'mygame.pck').
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
if (!found) {
|
if (!found) {
|
||||||
// Attempt to load PCK from macOS .app bundle resources.
|
// Attempt to load PCK from macOS .app bundle resources.
|
||||||
found = _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_basename + ".pck")) || _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_filename + ".pck"));
|
found = _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_basename + ".pck")) || _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_filename + ".pck"));
|
||||||
|
|
|
@ -47,9 +47,9 @@ def make_default_controller_mappings(target, source, env):
|
||||||
platform_variables = {
|
platform_variables = {
|
||||||
"Linux": "#if X11_ENABLED",
|
"Linux": "#if X11_ENABLED",
|
||||||
"Windows": "#ifdef WINDOWS_ENABLED",
|
"Windows": "#ifdef WINDOWS_ENABLED",
|
||||||
"Mac OS X": "#ifdef OSX_ENABLED",
|
"Mac OS X": "#ifdef MACOS_ENABLED",
|
||||||
"Android": "#if defined(__ANDROID__)",
|
"Android": "#if defined(__ANDROID__)",
|
||||||
"iOS": "#ifdef IPHONE_ENABLED",
|
"iOS": "#ifdef IOS_ENABLED",
|
||||||
"Javascript": "#ifdef JAVASCRIPT_ENABLED",
|
"Javascript": "#ifdef JAVASCRIPT_ENABLED",
|
||||||
"UWP": "#ifdef UWP_ENABLED",
|
"UWP": "#ifdef UWP_ENABLED",
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ static const _KeyCodeText _keycodes[] = {
|
||||||
{Key::PAGEDOWN ,"PageDown"},
|
{Key::PAGEDOWN ,"PageDown"},
|
||||||
{Key::SHIFT ,"Shift"},
|
{Key::SHIFT ,"Shift"},
|
||||||
{Key::CTRL ,"Ctrl"},
|
{Key::CTRL ,"Ctrl"},
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
{Key::META ,"Command"},
|
{Key::META ,"Command"},
|
||||||
#else
|
#else
|
||||||
{Key::META ,"Meta"},
|
{Key::META ,"Meta"},
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
Adds a static lib from the given [code]path[/code] to the iOS project.
|
Adds a static lib from the given [code]path[/code] to the iOS project.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="add_osx_plugin_file">
|
<method name="add_macos_plugin_file">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="path" type="String" />
|
<argument index="0" name="path" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#define kOutputBus 0
|
#define kOutputBus 0
|
||||||
#define kInputBus 1
|
#define kInputBus 1
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
OSStatus AudioDriverCoreAudio::input_device_address_cb(AudioObjectID inObjectID,
|
OSStatus AudioDriverCoreAudio::input_device_address_cb(AudioObjectID inObjectID,
|
||||||
UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses,
|
UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses,
|
||||||
void *inClientData) {
|
void *inClientData) {
|
||||||
|
@ -72,7 +72,7 @@ Error AudioDriverCoreAudio::init() {
|
||||||
AudioComponentDescription desc;
|
AudioComponentDescription desc;
|
||||||
memset(&desc, 0, sizeof(desc));
|
memset(&desc, 0, sizeof(desc));
|
||||||
desc.componentType = kAudioUnitType_Output;
|
desc.componentType = kAudioUnitType_Output;
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
desc.componentSubType = kAudioUnitSubType_HALOutput;
|
desc.componentSubType = kAudioUnitSubType_HALOutput;
|
||||||
#else
|
#else
|
||||||
desc.componentSubType = kAudioUnitSubType_RemoteIO;
|
desc.componentSubType = kAudioUnitSubType_RemoteIO;
|
||||||
|
@ -85,7 +85,7 @@ Error AudioDriverCoreAudio::init() {
|
||||||
OSStatus result = AudioComponentInstanceNew(comp, &audio_unit);
|
OSStatus result = AudioComponentInstanceNew(comp, &audio_unit);
|
||||||
ERR_FAIL_COND_V(result != noErr, FAILED);
|
ERR_FAIL_COND_V(result != noErr, FAILED);
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
AudioObjectPropertyAddress prop;
|
AudioObjectPropertyAddress prop;
|
||||||
prop.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
prop.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
||||||
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
||||||
|
@ -135,7 +135,7 @@ Error AudioDriverCoreAudio::init() {
|
||||||
// Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels)
|
// Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels)
|
||||||
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
|
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
result = AudioUnitSetProperty(audio_unit, kAudioDevicePropertyBufferFrameSize, kAudioUnitScope_Global, kOutputBus, &buffer_frames, sizeof(UInt32));
|
result = AudioUnitSetProperty(audio_unit, kAudioDevicePropertyBufferFrameSize, kAudioUnitScope_Global, kOutputBus, &buffer_frames, sizeof(UInt32));
|
||||||
ERR_FAIL_COND_V(result != noErr, FAILED);
|
ERR_FAIL_COND_V(result != noErr, FAILED);
|
||||||
#endif
|
#endif
|
||||||
|
@ -313,7 +313,7 @@ void AudioDriverCoreAudio::finish() {
|
||||||
ERR_PRINT("AudioUnitUninitialize failed");
|
ERR_PRINT("AudioUnitUninitialize failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
AudioObjectPropertyAddress prop;
|
AudioObjectPropertyAddress prop;
|
||||||
prop.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
prop.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
|
||||||
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
||||||
|
@ -339,7 +339,7 @@ Error AudioDriverCoreAudio::capture_init() {
|
||||||
AudioComponentDescription desc;
|
AudioComponentDescription desc;
|
||||||
memset(&desc, 0, sizeof(desc));
|
memset(&desc, 0, sizeof(desc));
|
||||||
desc.componentType = kAudioUnitType_Output;
|
desc.componentType = kAudioUnitType_Output;
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
desc.componentSubType = kAudioUnitSubType_HALOutput;
|
desc.componentSubType = kAudioUnitSubType_HALOutput;
|
||||||
#else
|
#else
|
||||||
desc.componentSubType = kAudioUnitSubType_RemoteIO;
|
desc.componentSubType = kAudioUnitSubType_RemoteIO;
|
||||||
|
@ -352,7 +352,7 @@ Error AudioDriverCoreAudio::capture_init() {
|
||||||
OSStatus result = AudioComponentInstanceNew(comp, &input_unit);
|
OSStatus result = AudioComponentInstanceNew(comp, &input_unit);
|
||||||
ERR_FAIL_COND_V(result != noErr, FAILED);
|
ERR_FAIL_COND_V(result != noErr, FAILED);
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
AudioObjectPropertyAddress prop;
|
AudioObjectPropertyAddress prop;
|
||||||
prop.mSelector = kAudioHardwarePropertyDefaultInputDevice;
|
prop.mSelector = kAudioHardwarePropertyDefaultInputDevice;
|
||||||
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
||||||
|
@ -370,7 +370,7 @@ Error AudioDriverCoreAudio::capture_init() {
|
||||||
ERR_FAIL_COND_V(result != noErr, FAILED);
|
ERR_FAIL_COND_V(result != noErr, FAILED);
|
||||||
|
|
||||||
UInt32 size;
|
UInt32 size;
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
AudioDeviceID deviceId;
|
AudioDeviceID deviceId;
|
||||||
size = sizeof(AudioDeviceID);
|
size = sizeof(AudioDeviceID);
|
||||||
AudioObjectPropertyAddress property = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
|
AudioObjectPropertyAddress property = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
|
||||||
|
@ -447,7 +447,7 @@ void AudioDriverCoreAudio::capture_finish() {
|
||||||
ERR_PRINT("AudioUnitUninitialize failed");
|
ERR_PRINT("AudioUnitUninitialize failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
AudioObjectPropertyAddress prop;
|
AudioObjectPropertyAddress prop;
|
||||||
prop.mSelector = kAudioHardwarePropertyDefaultInputDevice;
|
prop.mSelector = kAudioHardwarePropertyDefaultInputDevice;
|
||||||
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
prop.mScope = kAudioObjectPropertyScopeGlobal;
|
||||||
|
@ -491,7 +491,7 @@ Error AudioDriverCoreAudio::capture_stop() {
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
|
|
||||||
Array AudioDriverCoreAudio::_get_device_list(bool capture) {
|
Array AudioDriverCoreAudio::_get_device_list(bool capture) {
|
||||||
Array list;
|
Array list;
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "servers/audio_server.h"
|
#include "servers/audio_server.h"
|
||||||
|
|
||||||
#import <AudioUnit/AudioUnit.h>
|
#import <AudioUnit/AudioUnit.h>
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
#import <CoreAudio/AudioHardware.h>
|
#import <CoreAudio/AudioHardware.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class AudioDriverCoreAudio : public AudioDriver {
|
||||||
Vector<int32_t> samples_in;
|
Vector<int32_t> samples_in;
|
||||||
Vector<int16_t> input_buf;
|
Vector<int16_t> input_buf;
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
Array _get_device_list(bool capture = false);
|
Array _get_device_list(bool capture = false);
|
||||||
void _set_device(const String &device, bool capture = false);
|
void _set_device(const String &device, bool capture = false);
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public:
|
||||||
bool try_lock();
|
bool try_lock();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
virtual Array get_device_list();
|
virtual Array get_device_list();
|
||||||
virtual String get_device();
|
virtual String get_device();
|
||||||
virtual void set_device(String device);
|
virtual void set_device(String device);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Import("env")
|
Import("env")
|
||||||
|
|
||||||
if env["platform"] in ["haiku", "osx", "windows", "linuxbsd"]:
|
if env["platform"] in ["haiku", "macos", "windows", "linuxbsd"]:
|
||||||
# Thirdparty source files
|
# Thirdparty source files
|
||||||
thirdparty_dir = "#thirdparty/glad/"
|
thirdparty_dir = "#thirdparty/glad/"
|
||||||
thirdparty_sources = [
|
thirdparty_sources = [
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(IPHONE_ENABLED) && !defined(JAVASCRIPT_ENABLED)
|
#if !defined(IOS_ENABLED) && !defined(JAVASCRIPT_ENABLED)
|
||||||
// We include EGL below to get debug callback on GLES2 platforms,
|
// We include EGL below to get debug callback on GLES2 platforms,
|
||||||
// but EGL is not available on iOS.
|
// but EGL is not available on iOS.
|
||||||
#define CAN_DEBUG
|
#define CAN_DEBUG
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(OSX_ENABLED) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28)
|
#if defined(MACOS_ENABLED) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28)
|
||||||
// Random location for getentropy. Fitting.
|
// Random location for getentropy. Fitting.
|
||||||
#include <sys/random.h>
|
#include <sys/random.h>
|
||||||
#define UNIX_GET_ENTROPY
|
#define UNIX_GET_ENTROPY
|
||||||
|
|
|
@ -15,11 +15,11 @@ if env["use_volk"]:
|
||||||
|
|
||||||
if env["platform"] == "android":
|
if env["platform"] == "android":
|
||||||
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_ANDROID_KHR"])
|
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_ANDROID_KHR"])
|
||||||
elif env["platform"] == "iphone":
|
elif env["platform"] == "ios":
|
||||||
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_IOS_MVK"])
|
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_IOS_MVK"])
|
||||||
elif env["platform"] == "linuxbsd" and env["x11"]:
|
elif env["platform"] == "linuxbsd" and env["x11"]:
|
||||||
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_XLIB_KHR"])
|
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_XLIB_KHR"])
|
||||||
elif env["platform"] == "osx":
|
elif env["platform"] == "macos":
|
||||||
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_MACOS_MVK"])
|
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_MACOS_MVK"])
|
||||||
elif env["platform"] == "windows":
|
elif env["platform"] == "windows":
|
||||||
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_WIN32_KHR"])
|
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_WIN32_KHR"])
|
||||||
|
@ -40,7 +40,7 @@ elif env["platform"] == "android":
|
||||||
# Our current NDK version only provides old Vulkan headers,
|
# Our current NDK version only provides old Vulkan headers,
|
||||||
# so we have to limit VMA.
|
# so we have to limit VMA.
|
||||||
env_thirdparty_vma.AppendUnique(CPPDEFINES=["VMA_VULKAN_VERSION=1000000"])
|
env_thirdparty_vma.AppendUnique(CPPDEFINES=["VMA_VULKAN_VERSION=1000000"])
|
||||||
elif env["platform"] == "osx" or env["platform"] == "iphone":
|
elif env["platform"] == "macos" or env["platform"] == "ios":
|
||||||
# MoltenVK supports only Vulkan 1.1 API, limit VMA to the same version.
|
# MoltenVK supports only Vulkan 1.1 API, limit VMA to the same version.
|
||||||
env_thirdparty_vma.AppendUnique(CPPDEFINES=["VMA_VULKAN_VERSION=1001000"])
|
env_thirdparty_vma.AppendUnique(CPPDEFINES=["VMA_VULKAN_VERSION=1001000"])
|
||||||
|
|
||||||
|
|
|
@ -698,12 +698,12 @@ String EditorExportPlugin::get_ios_cpp_code() const {
|
||||||
return ios_cpp_code;
|
return ios_cpp_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorExportPlugin::add_osx_plugin_file(const String &p_path) {
|
void EditorExportPlugin::add_macos_plugin_file(const String &p_path) {
|
||||||
osx_plugin_files.push_back(p_path);
|
macos_plugin_files.push_back(p_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Vector<String> &EditorExportPlugin::get_osx_plugin_files() const {
|
const Vector<String> &EditorExportPlugin::get_macos_plugin_files() const {
|
||||||
return osx_plugin_files;
|
return macos_plugin_files;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorExportPlugin::add_ios_project_static_lib(const String &p_path) {
|
void EditorExportPlugin::add_ios_project_static_lib(const String &p_path) {
|
||||||
|
@ -746,7 +746,7 @@ void EditorExportPlugin::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("add_ios_linker_flags", "flags"), &EditorExportPlugin::add_ios_linker_flags);
|
ClassDB::bind_method(D_METHOD("add_ios_linker_flags", "flags"), &EditorExportPlugin::add_ios_linker_flags);
|
||||||
ClassDB::bind_method(D_METHOD("add_ios_bundle_file", "path"), &EditorExportPlugin::add_ios_bundle_file);
|
ClassDB::bind_method(D_METHOD("add_ios_bundle_file", "path"), &EditorExportPlugin::add_ios_bundle_file);
|
||||||
ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
|
ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
|
||||||
ClassDB::bind_method(D_METHOD("add_osx_plugin_file", "path"), &EditorExportPlugin::add_osx_plugin_file);
|
ClassDB::bind_method(D_METHOD("add_macos_plugin_file", "path"), &EditorExportPlugin::add_macos_plugin_file);
|
||||||
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
|
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
|
||||||
|
|
||||||
GDVIRTUAL_BIND(_export_file, "path", "type", "features");
|
GDVIRTUAL_BIND(_export_file, "path", "type", "features");
|
||||||
|
|
|
@ -366,7 +366,7 @@ class EditorExportPlugin : public RefCounted {
|
||||||
Vector<String> ios_bundle_files;
|
Vector<String> ios_bundle_files;
|
||||||
String ios_cpp_code;
|
String ios_cpp_code;
|
||||||
|
|
||||||
Vector<String> osx_plugin_files;
|
Vector<String> macos_plugin_files;
|
||||||
|
|
||||||
_FORCE_INLINE_ void _clear() {
|
_FORCE_INLINE_ void _clear() {
|
||||||
shared_objects.clear();
|
shared_objects.clear();
|
||||||
|
@ -381,7 +381,7 @@ class EditorExportPlugin : public RefCounted {
|
||||||
ios_plist_content = "";
|
ios_plist_content = "";
|
||||||
ios_linker_flags = "";
|
ios_linker_flags = "";
|
||||||
ios_cpp_code = "";
|
ios_cpp_code = "";
|
||||||
osx_plugin_files.clear();
|
macos_plugin_files.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features);
|
void _export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features);
|
||||||
|
@ -402,7 +402,7 @@ protected:
|
||||||
void add_ios_linker_flags(const String &p_flags);
|
void add_ios_linker_flags(const String &p_flags);
|
||||||
void add_ios_bundle_file(const String &p_path);
|
void add_ios_bundle_file(const String &p_path);
|
||||||
void add_ios_cpp_code(const String &p_code);
|
void add_ios_cpp_code(const String &p_code);
|
||||||
void add_osx_plugin_file(const String &p_path);
|
void add_macos_plugin_file(const String &p_path);
|
||||||
|
|
||||||
void skip();
|
void skip();
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ public:
|
||||||
String get_ios_linker_flags() const;
|
String get_ios_linker_flags() const;
|
||||||
Vector<String> get_ios_bundle_files() const;
|
Vector<String> get_ios_bundle_files() const;
|
||||||
String get_ios_cpp_code() const;
|
String get_ios_cpp_code() const;
|
||||||
const Vector<String> &get_osx_plugin_files() const;
|
const Vector<String> &get_macos_plugin_files() const;
|
||||||
|
|
||||||
EditorExportPlugin();
|
EditorExportPlugin();
|
||||||
};
|
};
|
||||||
|
|
|
@ -102,7 +102,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
|
||||||
// - macOS doesn't use font hinting.
|
// - macOS doesn't use font hinting.
|
||||||
// - Windows uses ClearType, which is in between "Light" and "Normal" hinting.
|
// - Windows uses ClearType, which is in between "Light" and "Normal" hinting.
|
||||||
// - Linux has configurable font hinting, but most distributions including Ubuntu default to "Light".
|
// - Linux has configurable font hinting, but most distributions including Ubuntu default to "Light".
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
font_hinting = TextServer::HINTING_NONE;
|
font_hinting = TextServer::HINTING_NONE;
|
||||||
#else
|
#else
|
||||||
font_hinting = TextServer::HINTING_LIGHT;
|
font_hinting = TextServer::HINTING_LIGHT;
|
||||||
|
|
|
@ -414,7 +414,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||||
_initial_set("interface/editor/code_font_custom_opentype_features", "");
|
_initial_set("interface/editor/code_font_custom_opentype_features", "");
|
||||||
_initial_set("interface/editor/code_font_custom_variations", "");
|
_initial_set("interface/editor/code_font_custom_variations", "");
|
||||||
_initial_set("interface/editor/font_antialiased", true);
|
_initial_set("interface/editor/font_antialiased", true);
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (None),None,Light,Normal")
|
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (None),None,Light,Normal")
|
||||||
#else
|
#else
|
||||||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (Light),None,Light,Normal")
|
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (Light),None,Light,Normal")
|
||||||
|
@ -1370,7 +1370,7 @@ String EditorSettings::get_editor_layouts_config() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
float EditorSettings::get_auto_display_scale() const {
|
float EditorSettings::get_auto_display_scale() const {
|
||||||
#if defined(OSX_ENABLED) || defined(ANDROID_ENABLED)
|
#if defined(MACOS_ENABLED) || defined(ANDROID_ENABLED)
|
||||||
return DisplayServer::get_singleton()->screen_get_max_scale();
|
return DisplayServer::get_singleton()->screen_get_max_scale();
|
||||||
#else
|
#else
|
||||||
const int screen = DisplayServer::get_singleton()->window_get_current_screen();
|
const int screen = DisplayServer::get_singleton()->window_get_current_screen();
|
||||||
|
@ -1489,7 +1489,7 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c
|
||||||
for (int i = 0; i < p_keycodes.size(); i++) {
|
for (int i = 0; i < p_keycodes.size(); i++) {
|
||||||
Key keycode = (Key)p_keycodes[i];
|
Key keycode = (Key)p_keycodes[i];
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
|
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
|
||||||
if (keycode == Key::KEY_DELETE) {
|
if (keycode == Key::KEY_DELETE) {
|
||||||
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
|
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
|
||||||
|
@ -1519,7 +1519,7 @@ Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, cons
|
||||||
for (int i = 0; i < p_keycodes.size(); i++) {
|
for (int i = 0; i < p_keycodes.size(); i++) {
|
||||||
Key keycode = (Key)p_keycodes[i];
|
Key keycode = (Key)p_keycodes[i];
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
|
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
|
||||||
if (keycode == Key::KEY_DELETE) {
|
if (keycode == Key::KEY_DELETE) {
|
||||||
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
|
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
|
String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
|
||||||
if (grabber->is_visible()) {
|
if (grabber->is_visible()) {
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
Key key = Key::META;
|
Key key = Key::META;
|
||||||
#else
|
#else
|
||||||
Key key = Key::CTRL;
|
Key key = Key::CTRL;
|
||||||
|
|
|
@ -1998,7 +1998,7 @@ void ProjectManager::shortcut_input(const Ref<InputEvent> &p_ev) {
|
||||||
// Pressing Command + Q quits the Project Manager
|
// Pressing Command + Q quits the Project Manager
|
||||||
// This is handled by the platform implementation on macOS,
|
// This is handled by the platform implementation on macOS,
|
||||||
// so only define the shortcut on other platforms
|
// so only define the shortcut on other platforms
|
||||||
#ifndef OSX_ENABLED
|
#ifndef MACOS_ENABLED
|
||||||
if (k->get_keycode_with_modifiers() == (KeyModifierMask::CMD | Key::Q)) {
|
if (k->get_keycode_with_modifiers() == (KeyModifierMask::CMD | Key::Q)) {
|
||||||
_dim_window();
|
_dim_window();
|
||||||
get_tree()->quit();
|
get_tree()->quit();
|
||||||
|
|
|
@ -685,7 +685,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
|
|
||||||
I = args.front();
|
I = args.front();
|
||||||
while (I) {
|
while (I) {
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
// Ignore the process serial number argument passed by macOS Gatekeeper.
|
// Ignore the process serial number argument passed by macOS Gatekeeper.
|
||||||
// Otherwise, Godot would try to open a non-existent project on the first start and abort.
|
// Otherwise, Godot would try to open a non-existent project on the first start and abort.
|
||||||
if (I->get().begins_with("-psn_")) {
|
if (I->get().begins_with("-psn_")) {
|
||||||
|
@ -2668,7 +2668,7 @@ bool Main::start() {
|
||||||
ERR_FAIL_COND_V_MSG(!scene, false, "Failed loading scene: " + local_game_path);
|
ERR_FAIL_COND_V_MSG(!scene, false, "Failed loading scene: " + local_game_path);
|
||||||
sml->add_current_scene(scene);
|
sml->add_current_scene(scene);
|
||||||
|
|
||||||
#ifdef OSX_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
String mac_iconpath = GLOBAL_DEF("application/config/macos_native_icon", "Variant()");
|
String mac_iconpath = GLOBAL_DEF("application/config/macos_native_icon", "Variant()");
|
||||||
if (!mac_iconpath.is_empty()) {
|
if (!mac_iconpath.is_empty()) {
|
||||||
DisplayServer::get_singleton()->set_native_icon(mac_iconpath);
|
DisplayServer::get_singleton()->set_native_icon(mac_iconpath);
|
||||||
|
|
10
methods.py
10
methods.py
|
@ -833,15 +833,15 @@ def Run(env, function, short_message, subprocess=True):
|
||||||
|
|
||||||
def detect_darwin_sdk_path(platform, env):
|
def detect_darwin_sdk_path(platform, env):
|
||||||
sdk_name = ""
|
sdk_name = ""
|
||||||
if platform == "osx":
|
if platform == "macos":
|
||||||
sdk_name = "macosx"
|
sdk_name = "macosx"
|
||||||
var_name = "MACOS_SDK_PATH"
|
var_name = "MACOS_SDK_PATH"
|
||||||
elif platform == "iphone":
|
elif platform == "ios":
|
||||||
sdk_name = "iphoneos"
|
sdk_name = "iphoneos"
|
||||||
var_name = "IPHONESDK"
|
var_name = "IOS_SDK_PATH"
|
||||||
elif platform == "iphonesimulator":
|
elif platform == "iossimulator":
|
||||||
sdk_name = "iphonesimulator"
|
sdk_name = "iphonesimulator"
|
||||||
var_name = "IPHONESDK"
|
var_name = "IOS_SDK_PATH"
|
||||||
else:
|
else:
|
||||||
raise Exception("Invalid platform argument passed to detect_darwin_sdk_path")
|
raise Exception("Invalid platform argument passed to detect_darwin_sdk_path")
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue