Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename platforms to better reflect their current names #80

Merged
merged 13 commits into from
Jun 22, 2024

Conversation

madmiraal
Copy link
Contributor

Rebel is a cross-platform game engine (and game editor) that runs on Android, Linux, iOS, macOS, Windows and the web. However, currently, for historical reasons, some of these platforms are not named as such. This PR renames the platforms to reflect their current names.

iOS was previously called iPhone OS, but was renamed in 2010. iOS was also used by iPads until iPadOS was introduced in 2019 [1]. So, although it was and is currently only used on iPhones, it has not always been the case. Therefore, it is more appropriate to call the platform by the OS name not its target. This PR renames the iphone platform to ios.

macOS was originally called Mac OS X. It was shortened to OS X in 2012 and renamed to macOS in 2016 [2]. This PR renames the osx platform to its current name: macos.

The web platform consists of three components: HTML5, JavaScript and WebAssembly. HTML5 is the markup language used to display documents in a web browser and provide interactivity through JavaScript. In Rebel Engine, HTML5 is only used to display the canvas. JavaScript is only used for the interface between the browser and Rebel Engine. JavaScript is not used for Rebel Engine itself. Rather, Rebel Engine is compiled into a WebAssembly (Wasm) binary. It makes more sense to refer to the platform as "web", rather than one of its components. Therefore, this PR renames the javascript platfrom to web.

Linux is a unix-like operating system. BSD is another discontinued unix-like operating system that has multiple open source descendants (e.g. FreeBSD, OpenBSD and NetBSD) and proprietary descendants (eg. macOS and iOS). Rebel Engine and Rebel Editor should compile and run on BSD like operating systems using the Linux build. However, currently only Linux, macOS and iOS unix-like operating systems are supported. X is a windowing system used on unix-like operating systems to display windows and receive input. It reached version 11 in 1987, and is commonly known as X11. Wayland is another windowing system. Wayland supports X11 applications. Currently Rebel Engine and Rebel Editor on Linux use X11 so it's supported on both windowing systems, but direct support for Wayland still needs to be added. Therefore, this PR renames the x11 platform to linux.

The platform renaming includes renaming classes and filenames appropriately. To ensure consistency, where required, the classes and filenames on the other platforms and the common Unix drivers have been renamed too. In addition, default implementations of network drivers have been moved to their own network folder and renamed accordingly.

To facilitate renaming the platforms, this PR includes two build system improvements. It removes the global build system variables MACOS_SDK_PATH and IPHONESDK and repurposes the function used to set these variables to a function that returns the desired SDK path when required. In addition, the xctoolchain path variable was renamed from IPHONEPATH to xctoolchain to better reflect is purpose.

Finally, this PR cleans up references to a Haiku platform that is no more.

References:

  1. https://en.wikipedia.org/wiki/IOS
  2. https://en.wikipedia.org/wiki/MacOS

@madmiraal madmiraal added the PR Type: Enhancement Your current game will work better. label Jun 17, 2024
@DanielaOrtner DanielaOrtner self-requested a review June 22, 2024 11:55
Copy link
Contributor

@DanielaOrtner DanielaOrtner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the tidy up. It makes everything clearer.

@DanielaOrtner DanielaOrtner merged commit cd19edb into RebelToolbox:main Jun 22, 2024
15 checks passed
@madmiraal madmiraal deleted the rename-platforms branch June 22, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR Type: Enhancement Your current game will work better.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants