diff options
author | Robert Müller <robytemueller@gmail.com> | 2022-03-12 10:38:06 +0100 |
---|---|---|
committer | Robert Müller <robytemueller@gmail.com> | 2023-06-14 17:09:20 +0200 |
commit | 3fb07fcd7110e848b9a4b94bbddcd8b0cab3cbbc (patch) | |
tree | 4776a71b235ff0d45d6c5a8d324cbe9a37cb023e | |
parent | 8569cc882c824d34a5c1b117441f2e1808cfcb73 (diff) |
Replace "OSX" with "macOS"
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
-rw-r--r-- | .github/workflows/build.yaml | 4 | ||||
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | bam.lua | 8 | ||||
-rw-r--r-- | scripts/build.py | 2 | ||||
-rwxr-xr-x | scripts/copyright.py | 2 | ||||
-rw-r--r-- | scripts/make_release.py | 6 | ||||
-rw-r--r-- | src/base/detect.h | 4 | ||||
-rw-r--r-- | src/base/system.c | 6 | ||||
-rw-r--r-- | src/base/system.h | 4 | ||||
-rw-r--r-- | src/base/tl/threading.h | 4 | ||||
-rw-r--r-- | src/engine/client/backend_sdl.cpp | 6 | ||||
-rw-r--r-- | src/engine/client/backend_sdl.h | 2 | ||||
-rw-r--r-- | src/engine/client/client.cpp | 4 | ||||
-rw-r--r-- | src/engine/client/input.cpp | 2 | ||||
-rw-r--r-- | src/game/client/components/menus_settings.cpp | 2 | ||||
-rw-r--r-- | src/game/client/lineinput.cpp | 2 | ||||
-rw-r--r-- | src/macoslaunch/client.m (renamed from src/osxlaunch/client.m) | 0 | ||||
-rw-r--r-- | src/macoslaunch/server.m (renamed from src/osxlaunch/server.m) | 0 | ||||
-rw-r--r-- | src/macoslaunch/server.mm (renamed from src/osxlaunch/server.mm) | 0 | ||||
-rw-r--r-- | storage.cfg | 2 |
20 files changed, 33 insertions, 33 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ae6d91329..d2ab1de57 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: - os: macOS-latest cmake-args: -G "Unix Makefiles" build-args: --parallel - package-file: teeworlds-*-osx.dmg + package-file: teeworlds-*-macos.dmg env: CFLAGS: -Wdeclaration-after-statement -Werror CXXFLAGS: -Werror @@ -156,4 +156,4 @@ jobs: - name: Create MacOS app using make_release.py if: contains(matrix.os, 'macOS') run: | - sudo python3 scripts/make_release.py master osx + sudo python3 scripts/make_release.py master macos diff --git a/CMakeLists.txt b/CMakeLists.txt index 6704b3385..612ba180a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,7 +391,7 @@ elseif(TARGET_OS STREQUAL "mac") find_library(COCOA Cocoa) find_library(OPENGL OpenGL) set(PLATFORM_CLIENT - src/osxlaunch/client.m + src/macoslaunch/client.m ) set(PLATFORM_CLIENT_LIBS ${COCOA} ${OPENGL}) set(PLATFORM_LIBS ${CARBON}) @@ -1656,7 +1656,7 @@ list(APPEND TARGETS_OWN ${TARGET_SERVER}) list(APPEND TARGETS_LINK ${TARGET_SERVER}) if(TARGET_OS AND TARGET_OS STREQUAL "mac") - set(SERVER_LAUNCHER_SRC src/osxlaunch/server.mm) + set(SERVER_LAUNCHER_SRC src/macoslaunch/server.mm) set(TARGET_SERVER_LAUNCHER ${TARGET_SERVER}-Launcher) add_executable(${TARGET_SERVER_LAUNCHER} ${SERVER_LAUNCHER_SRC}) target_link_libraries(${TARGET_SERVER_LAUNCHER} ${COCOA}) @@ -1844,7 +1844,7 @@ if(TARGET_OS AND TARGET_BITS) set(CPACK_SYSTEM_NAME "linux_x86_64") endif() elseif(TARGET_OS STREQUAL "mac") - set(CPACK_SYSTEM_NAME "osx") + set(CPACK_SYSTEM_NAME "macos") set(CPACK_GENERATOR DMG) endif() endif() @@ -108,7 +108,7 @@ function GenerateCommonSettings(settings, conf, arch, compiler) libs = {zlib=zlib, wavpack=wavpack, png=png, md5=md5, json=json} end -function GenerateMacOSXSettings(settings, conf, arch, compiler) +function GenerateMacOSSettings(settings, conf, arch, compiler) if arch == "x86" then settings.cc.flags:Add("-arch i386") settings.link.flags:Add("-arch i386") @@ -145,7 +145,7 @@ function GenerateMacOSXSettings(settings, conf, arch, compiler) GenerateCommonSettings(settings, conf, arch, compiler) -- Build server launcher before adding game stuff - local serverlaunch = Link(settings, "serverlaunch", Compile(settings, "src/osxlaunch/server.m")) + local serverlaunch = Link(settings, "serverlaunch", Compile(settings, "src/macoslaunch/server.m")) -- Master server, version server and tools BuildEngineCommon(settings) @@ -166,7 +166,7 @@ function GenerateMacOSXSettings(settings, conf, arch, compiler) settings.link.frameworks:Add("AGL") -- FIXME: the SDL config is applied in BuildClient too but is needed here before so the launcher will compile config.sdl:Apply(settings) - settings.link.extrafiles:Merge(Compile(settings, "src/osxlaunch/client.m")) + settings.link.extrafiles:Merge(Compile(settings, "src/macoslaunch/client.m")) BuildClient(settings) -- Content @@ -465,7 +465,7 @@ function GenerateSettings(conf, arch, builddir, compiler, headless) GenerateWindowsSettings(settings, conf, arch, compiler) elseif family == "unix" then if platform == "macosx" then - GenerateMacOSXSettings(settings, conf, arch, compiler) + GenerateMacOSSettings(settings, conf, arch, compiler) elseif platform == "solaris" then GenerateSolarisSettings(settings, conf, arch, compiler) else -- Linux, BSD diff --git a/scripts/build.py b/scripts/build.py index d9904c4a9..a34c99eba 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -40,7 +40,7 @@ else: # get name osname = os.popen("uname").readline().strip().lower() if osname == "darwin": - osname = "osx" + osname = "macos" # get arch machine = os.popen("uname -m").readline().strip().lower() diff --git a/scripts/copyright.py b/scripts/copyright.py index c5221a50a..3d040be4a 100755 --- a/scripts/copyright.py +++ b/scripts/copyright.py @@ -2,7 +2,7 @@ import os, sys os.chdir(os.path.dirname(os.path.realpath(sys.argv[0])) + "/..") notice = [("/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */" + os.linesep).encode('utf-8'), ("/* If you are missing that file, acquire a complete release at teeworlds.com. */" + os.linesep).encode('utf-8')] -exclude = ["src%sengine%sexternal" % (os.sep, os.sep), "src%sosxlaunch" % os.sep, "src%sbase%shash_libtomcrypt.c" % (os.sep, os.sep)] +exclude = ["src%sengine%sexternal" % (os.sep, os.sep), "src%smacoslaunch" % os.sep, "src%sbase%shash_libtomcrypt.c" % (os.sep, os.sep)] updated_files = 0 def fix_copyright_notice(filename): diff --git a/scripts/make_release.py b/scripts/make_release.py index 23a13ad84..f498aae37 100644 --- a/scripts/make_release.py +++ b/scripts/make_release.py @@ -3,7 +3,7 @@ from distutils.dir_util import copy_tree os.chdir(os.path.dirname(os.path.realpath(sys.argv[0])) + "/..") import twlib -arguments = optparse.OptionParser(usage="usage: %prog VERSION PLATFORM [options]\n\nVERSION - Version number\nPLATFORM - Target platform (f.e. linux_x86, linux_x86_64, osx, src, win32, win64)") +arguments = optparse.OptionParser(usage="usage: %prog VERSION PLATFORM [options]\n\nVERSION - Version number\nPLATFORM - Target platform (f.e. linux_x86, linux_x86_64, macos, src, win32, win64)") arguments.add_option("-l", "--url-languages", default = "http://github.com/teeworlds/teeworlds-translation/archive/master.zip", help = "URL from which the teeworlds language files will be downloaded") arguments.add_option("-m", "--url-maps", default = "http://github.com/teeworlds/teeworlds-maps/archive/master.zip", help = "URL from which the teeworlds maps files will be downloaded") arguments.add_option("-s", "--source-dir", help = "Source directory which is used for building the package") @@ -18,7 +18,7 @@ if options.source_dir != None: exit(1) os.chdir(options.source_dir) -valid_platforms = ["win32", "win64", "osx", "linux_x86", "linux_x86_64", "src"] +valid_platforms = ["win32", "win64", "macos", "linux_x86", "linux_x86_64", "src"] name = "teeworlds" version = sys.argv[1] @@ -45,7 +45,7 @@ elif platform == 'win32' or platform == 'win64': exe_ext = ".exe" use_zip = 1 use_gz = 0 -elif platform == 'osx': +elif platform == 'macos': use_dmg = 1 use_gz = 0 use_bundle = 1 diff --git a/src/base/detect.h b/src/base/detect.h index 50931623e..f702bc142 100644 --- a/src/base/detect.h +++ b/src/base/detect.h @@ -63,8 +63,8 @@ #if defined(MACOSX) || defined(__APPLE__) || defined(__DARWIN__) #define CONF_FAMILY_UNIX 1 #define CONF_FAMILY_STRING "unix" - #define CONF_PLATFORM_MACOSX 1 - #define CONF_PLATFORM_STRING "macosx" + #define CONF_PLATFORM_MACOS 1 + #define CONF_PLATFORM_STRING "macos" #endif #if defined(__sun) diff --git a/src/base/system.c b/src/base/system.c index 339dfa813..1db073eee 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -28,7 +28,7 @@ #include <dirent.h> - #if defined(CONF_PLATFORM_MACOSX) + #if defined(CONF_PLATFORM_MACOS) #include <Carbon/Carbon.h> #endif @@ -674,7 +674,7 @@ void lock_unlock(LOCK lock) #endif } -#if !defined(CONF_PLATFORM_MACOSX) +#if !defined(CONF_PLATFORM_MACOS) #if defined(CONF_FAMILY_UNIX) void semaphore_init(SEMAPHORE *sem) { sem_init(sem, 0, 0); } void semaphore_wait(SEMAPHORE *sem) { sem_wait(sem); } @@ -1673,7 +1673,7 @@ int fs_storage_path(const char *appname, char *path, int max) if(!home) return -1; -#if defined(CONF_PLATFORM_MACOSX) +#if defined(CONF_PLATFORM_MACOS) str_format(path, max, "%s/Library/Application Support/%s", home, appname); return 0; #endif diff --git a/src/base/system.h b/src/base/system.h index 9c5efadcf..d48bacdc7 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -474,7 +474,7 @@ void lock_unlock(LOCK lock); /* Group: Semaphores */ -#if !defined(CONF_PLATFORM_MACOSX) +#if !defined(CONF_PLATFORM_MACOS) #if defined(CONF_FAMILY_UNIX) #include <semaphore.h> typedef sem_t SEMAPHORE; @@ -1402,7 +1402,7 @@ int fs_makedir_recursive(const char *path); Remarks: - Returns ~/.appname on UNIX based systems - - Returns ~/Library/Applications Support/appname on Mac OS X + - Returns ~/Library/Applications Support/appname on macOS - Returns %APPDATA%/Appname on Windows based systems */ int fs_storage_path(const char *appname, char *path, int max); diff --git a/src/base/tl/threading.h b/src/base/tl/threading.h index 49a174b42..57cde5d25 100644 --- a/src/base/tl/threading.h +++ b/src/base/tl/threading.h @@ -65,9 +65,9 @@ #error missing atomic implementation for this compiler #endif -#if defined(CONF_PLATFORM_MACOSX) +#if defined(CONF_PLATFORM_MACOS) /* - use semaphore provided by SDL on macosx + use semaphore provided by SDL on macos */ #else class semaphore diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index df2a49a51..9da31b0aa 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -33,7 +33,7 @@ void CGraphicsBackend_Threaded::ThreadFunc(void *pUser) pThis->m_Activity.wait(); if(pThis->m_pBuffer) { - #ifdef CONF_PLATFORM_MACOSX + #ifdef CONF_PLATFORM_MACOS CAutoreleasePool AutoreleasePool; #endif pThis->m_pProcessor->RunBuffer(pThis->m_pBuffer); @@ -651,7 +651,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *pScreen, int *pWin if(Flags&IGraphicsBackend::INITFLAG_BORDERLESS) SdlFlags |= SDL_WINDOW_BORDERLESS; if(Flags&IGraphicsBackend::INITFLAG_FULLSCREEN) -#if defined(CONF_PLATFORM_MACOSX) // Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen) +#if defined(CONF_PLATFORM_MACOS) // Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen) { SdlFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP; // always use "fake" fullscreen *pWindowWidth = *pDesktopWidth; @@ -784,7 +784,7 @@ void CGraphicsBackend_SDL_OpenGL::Maximize() bool CGraphicsBackend_SDL_OpenGL::Fullscreen(bool State) { -#if defined(CONF_PLATFORM_MACOSX) // Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen) +#if defined(CONF_PLATFORM_MACOS) // Todo SDL: remove this when fixed (game freezes when losing focus in fullscreen) return SDL_SetWindowFullscreen(m_pWindow, State ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) == 0; #else return SDL_SetWindowFullscreen(m_pWindow, State ? SDL_WINDOW_FULLSCREEN : 0) == 0; diff --git a/src/engine/client/backend_sdl.h b/src/engine/client/backend_sdl.h index 282cc3489..d614afd06 100644 --- a/src/engine/client/backend_sdl.h +++ b/src/engine/client/backend_sdl.h @@ -5,7 +5,7 @@ #include "graphics_threaded.h" -#if defined(CONF_PLATFORM_MACOSX) +#if defined(CONF_PLATFORM_MACOS) #include <objc/objc-runtime.h> class semaphore diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 498008a7b..898cc4af6 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2454,7 +2454,7 @@ void CClient::ConchainWindowScreen(IConsole::IResult *pResult, void *pUserData, bool CClient::ToggleFullscreen() { -#ifndef CONF_PLATFORM_MACOSX +#ifndef CONF_PLATFORM_MACOS if(Graphics()->Fullscreen(Config()->m_GfxFullscreen^1)) Config()->m_GfxFullscreen ^= 1; return true; @@ -2566,7 +2566,7 @@ void CClient::DoVersionSpecificActions() Prediction Latency Upstream latency */ -#if defined(CONF_PLATFORM_MACOSX) +#if defined(CONF_PLATFORM_MACOS) extern "C" int TWMain(int argc, const char **argv) // ignore_convention #else int main(int argc, const char **argv) // ignore_convention diff --git a/src/engine/client/input.cpp b/src/engine/client/input.cpp index 5f9187e85..06e9df9c9 100644 --- a/src/engine/client/input.cpp +++ b/src/engine/client/input.cpp @@ -620,7 +620,7 @@ int CInput::Update() Scancode = Key; break; -#if defined(CONF_PLATFORM_MACOSX) // Todo SDL: remove this when fixed (mouse state is faulty on start) +#if defined(CONF_PLATFORM_MACOS) // Todo SDL: remove this when fixed (mouse state is faulty on start) case SDL_WINDOWEVENT: if(Event.window.event == SDL_WINDOWEVENT_MAXIMIZED) { diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 6966e8cc8..59f6c6fb5 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -1591,7 +1591,7 @@ bool CMenus::DoResolutionList(CUIRect* pRect, CListBox* pListBox, void CMenus::RenderSettingsGraphics(CUIRect MainView) { bool CheckFullscreen = false; - #ifdef CONF_PLATFORM_MACOSX + #ifdef CONF_PLATFORM_MACOS CheckFullscreen = true; #endif diff --git a/src/game/client/lineinput.cpp b/src/game/client/lineinput.cpp index 3123eb03d..49614fd66 100644 --- a/src/game/client/lineinput.cpp +++ b/src/game/client/lineinput.cpp @@ -212,7 +212,7 @@ bool CLineInput::ProcessInput(const IInput::CEvent &Event) const bool CtrlPressed = s_pInput->KeyIsPressed(KEY_LCTRL) || s_pInput->KeyIsPressed(KEY_RCTRL); const bool AltPressed = s_pInput->KeyIsPressed(KEY_LALT) || s_pInput->KeyIsPressed(KEY_RALT); -#ifdef CONF_PLATFORM_MACOSX +#ifdef CONF_PLATFORM_MACOS const bool MoveWord = AltPressed && !CtrlPressed; #else const bool MoveWord = CtrlPressed && !AltPressed; diff --git a/src/osxlaunch/client.m b/src/macoslaunch/client.m index cfd62570a..cfd62570a 100644 --- a/src/osxlaunch/client.m +++ b/src/macoslaunch/client.m diff --git a/src/osxlaunch/server.m b/src/macoslaunch/server.m index f075422ec..f075422ec 100644 --- a/src/osxlaunch/server.m +++ b/src/macoslaunch/server.m diff --git a/src/osxlaunch/server.mm b/src/macoslaunch/server.mm index 3135d439c..3135d439c 100644 --- a/src/osxlaunch/server.mm +++ b/src/macoslaunch/server.mm diff --git a/storage.cfg b/storage.cfg index 5df0e1216..14547e4e0 100644 --- a/storage.cfg +++ b/storage.cfg @@ -7,7 +7,7 @@ # There are 3 special paths available: # $USERDIR # - ~/.appname on UNIX based systems -# - ~/Library/Applications Support/appname on Mac OS X +# - ~/Library/Applications Support/appname on macOS # - %APPDATA%/Appname on Windows based systems # $DATADIR # - the 'data' directory which is part of an official |