Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7e88d9b
feat: macOS app bundle packaging
TmLev May 1, 2026
035011e
fix: macOS new-game loading and intro cutscene
TmLev May 1, 2026
184689b
fix: Properly detect default macOS deployment target from `sw_vers`
TmLev May 1, 2026
4f1b2d4
build(macos): use configured SDK for LuaJIT
TmLev Aug 11, 2026
ffec573
feat(macos): package game-specific app bundles
TmLev Aug 11, 2026
e3ea2d6
feat(macos): support Shadow of Chernobyl archives
TmLev Aug 11, 2026
1bc9b39
fix(macos): detect attached debuggers
TmLev Aug 11, 2026
181844e
fix(macos): fit bordered windows to the display
TmLev Aug 11, 2026
3cc21e5
fix(render): skip pipeline validation on macOS
TmLev Aug 11, 2026
4f748cf
feat(xrUICore): support legacy Shadow of Chernobyl UI
TmLev Aug 11, 2026
e540035
fix(xrGame): preserve SoC save sentinels
TmLev Aug 11, 2026
3ed54c5
fix(xrUICore): tolerate child list mutations
TmLev Aug 11, 2026
e3ae99a
fix(xrUICore): preserve SoC check button proportions
TmLev Aug 11, 2026
5a6b3d4
fix(xrGame): support SoC main menu scripts
TmLev Aug 11, 2026
502593f
fix(render): restore OpenGL save thumbnails
TmLev Aug 11, 2026
f91d6e3
fix(xrGame): support SoC HUD layouts
TmLev Aug 11, 2026
417c86f
fix(xrGame): restore SoC inventory status display
TmLev Aug 11, 2026
fe4aa93
fix(xrGame): preserve SoC news icon regions
TmLev Aug 11, 2026
1879945
fix(xrGame): use SoC dog rest animations
TmLev Aug 11, 2026
2f7208d
fix(xrGame): restore SoC map behavior
TmLev Aug 11, 2026
c18608b
feat(xrGame): add SoC diary and encyclopedia windows
TmLev Aug 11, 2026
2e71289
feat(xrGame): restore SoC task tracking
TmLev Aug 11, 2026
2919804
feat(xrGame): restore SoC contacts and ranking
TmLev Aug 11, 2026
e6714a0
feat(xrGame): integrate SoC PDA sections
TmLev Aug 11, 2026
0fde2f7
docs(macos): document SoC setup
TmLev Aug 11, 2026
45f86f4
fix(build): include SoC PDA sources in Visual Studio
TmLev Aug 11, 2026
a6df2a2
fix(build): stabilize xrGame unity batches
TmLev Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Install macOS packages
if: ${{ startsWith(matrix.platform.name, 'macOS') }}
run: |
brew install ccache cmake sdl2 lzo libogg libvorbis theora openal-soft jpeg-turbo
brew install ccache cmake dylibbundler sdl2 lzo libogg libvorbis theora openal-soft jpeg-turbo

- name: Install Fedora packages
if: ${{ matrix.platform.name == 'Fedora' }}
Expand Down Expand Up @@ -187,6 +187,13 @@ jobs:
if: ${{ startsWith(matrix.platform.name, 'macOS') }}
run: ccache -s || true

- name: Make macOS app bundle
if: ${{ startsWith(matrix.platform.name, 'macOS') && matrix.configuration == 'Release' && steps.cmake-build.outcome == 'success' }}
id: make-macos-app-bundle
run: |
bash misc/macos/make_app_bundle.sh "${{ matrix.platform.arch }}" "${{ matrix.configuration }}"
file build/artifacts/openxray*.*

# TODO: Merge this step with 'Make AppImage' once we switch to CMake 4.2 which directly supports AppImage generation with CPack
# https://cmake.org/cmake/help/latest/cpack_gen/appimage.html
- name: Make package
Expand All @@ -209,7 +216,7 @@ jobs:
file build/artifacts/openxray*.*

- name: Upload OpenXRay artifact
if: ${{ steps.make-package.outcome == 'success' || steps.make-appimage.outcome == 'success' }}
if: ${{ steps.make-package.outcome == 'success' || steps.make-appimage.outcome == 'success' || steps.make-macos-app-bundle.outcome == 'success' }}
uses: actions/upload-artifact@main
with:
name: ${{ matrix.platform.name }} ${{ matrix.configuration }} ${{ matrix.platform.arch }} (${{ matrix.platform.cc }} github-${{ github.run_number }})
Expand Down
1 change: 0 additions & 1 deletion Externals/LuaJIT-proj/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ set(RELVER 5)
set(ABIVER 5.1)
set(NODOTABIVER 51)

set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")
set(LUAJIT_DIR ${CMAKE_SOURCE_DIR}/Externals/LuaJIT/src CACHE PATH "Location of luajit sources")

option(BUILD_SHARED_LIBS "Build as shared library" ON)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ However, they know about many community projects, including this, and support S.

Installation instructions are on the [How to install and play](https://github.com/OpenXRay/xray-16/wiki/[EN]-How-to-install-and-play) page.

The experimental Shadow of Chernobyl procedure for Apple silicon Macs is in
[the macOS guide](misc/macos/README.md).

## Supported game platforms
- Call of Chernobyl 1.4.22.
- Call of Pripyat 1.6.02.
Expand Down
24 changes: 22 additions & 2 deletions cmake/XRay.Compiler.GNULike.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,28 @@ if (APPLE)
if ($ENV{MACOSX_DEPLOYMENT_TARGET})
set(CMAKE_OSX_DEPLOYMENT_TARGET $ENV{MACOSX_DEPLOYMENT_TARGET})
else()
message(NOTICE "CMAKE_OSX_DEPLOYMENT_TARGET is not set, defaulting it to your system's version: ${CMAKE_SYSTEM_VERSION}")
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CMAKE_SYSTEM_VERSION})
execute_process(
COMMAND sw_vers -productVersion
OUTPUT_VARIABLE XRAY_MACOS_PRODUCT_VERSION
RESULT_VARIABLE XRAY_SW_VERS_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)

if (XRAY_SW_VERS_RESULT STREQUAL "0" AND XRAY_MACOS_PRODUCT_VERSION MATCHES "^([0-9]+)")
set(CMAKE_OSX_DEPLOYMENT_TARGET "${CMAKE_MATCH_1}.0")
message(NOTICE "CMAKE_OSX_DEPLOYMENT_TARGET is not set, defaulting it to macOS ${CMAKE_OSX_DEPLOYMENT_TARGET}")
elseif (CMAKE_SYSTEM_VERSION MATCHES "^([0-9]+)")
set(XRAY_DARWIN_VERSION_MAJOR "${CMAKE_MATCH_1}")
if (XRAY_DARWIN_VERSION_MAJOR GREATER_EQUAL 20)
math(EXPR XRAY_MACOS_VERSION_MAJOR "${XRAY_DARWIN_VERSION_MAJOR} - 9")
set(CMAKE_OSX_DEPLOYMENT_TARGET "${XRAY_MACOS_VERSION_MAJOR}.0")
message(NOTICE "CMAKE_OSX_DEPLOYMENT_TARGET is not set, defaulting it to macOS ${CMAKE_OSX_DEPLOYMENT_TARGET}")
else()
message(NOTICE "CMAKE_OSX_DEPLOYMENT_TARGET is not set, defaulting it to 10.15")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
endif()
endif()
endif()
endif()
message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
Expand Down
186 changes: 186 additions & 0 deletions misc/macos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Run Shadow of Chernobyl on an Apple silicon Mac

This procedure is experimental. The main OpenXRay project does not yet list
Shadow of Chernobyl as a supported game. Use a licensed Steam copy of the
original game.

## 1. Install the build tools

Install the Xcode command-line tools:

```sh
xcode-select --install
```

Install the required Homebrew packages:

```sh
brew install git cmake ninja dylibbundler sdl2 lzo libogg libvorbis theora openal-soft jpeg-turbo
```

Install SteamCMD for macOS as described in the
[Valve SteamCMD guide](https://developer.valvesoftware.com/wiki/SteamCMD).
Make sure that the `steamcmd` command is in `PATH`.

## 2. Get the source code

Clone the repository with its submodules:

```sh
git clone https://github.com/OpenXRay/xray-16.git --recurse-submodules
cd xray-16
```

If you already have the repository, update its submodules:

```sh
git submodule update --init --recursive
```

## 3. Get the licensed game data from Steam

Your Steam account must own S.T.A.L.K.E.R.: Shadow of Chernobyl. The Steam app
ID is `4500`.

Create a data directory in the repository:

```sh
mkdir -p "$PWD/build/game-data/soc"
```

Download the Windows game data. Replace `YOUR_STEAM_ACCOUNT_NAME` with your
Steam account name. Do not put your password in the command. SteamCMD asks for
the password and the Steam Guard code when they are necessary.

```sh
steamcmd \
+@sSteamCmdForcePlatformType windows \
+force_install_dir "$PWD/build/game-data/soc" \
+login YOUR_STEAM_ACCOUNT_NAME \
+app_update 4500 validate \
+quit
```

The selected directory must contain the original archives from
`gamedata.db0` through `gamedata.dbd`. Keep these files unchanged. Do not
extract or decrypt them. OpenXRay detects the encrypted SoC archives and
decrypts their contents when it reads them.

Do not add these licensed data files to Git. The application package contains
only OpenXRay files.

## 4. Build OpenXRay

Configure and build the Release version:

```sh
cmake -S . -B build-macos -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build-macos --config Release -j "$(sysctl -n hw.logicalcpu)"
```

The Apple silicon build files are in `bin/arm64/Release`.

## 5. Build the macOS application

Create the application, ZIP file, and DMG file:

```sh
bash misc/macos/make_app_bundle.sh arm64 Release soc
```

For a faster local package without a DMG file, use:

```sh
OPENXRAY_SKIP_DMG=1 bash misc/macos/make_app_bundle.sh arm64 Release soc
```

The files are in `build/artifacts`.

## 6. Install and start the game

If `/Applications/OpenXRay SoC.app` already exists, move it to the Trash or to
a backup directory first. Do not copy a new application over an old
application. macOS can merge the two directory trees and keep old scripts.

Copy `build/artifacts/OpenXRay SoC.app` to `/Applications`. Then start it from
Finder.

To skip the publisher title videos for one start, run:

```sh
open -F -n --env OPENXRAY_SKIP_INTRO=1 "/Applications/OpenXRay SoC.app"
```

This starts the application through macOS LaunchServices. The normal Finder
launch keeps the title videos. The `-F` option also tells macOS not to restore
old application window state.

At the first start, select this directory when OpenXRay asks for game data:

```text
<repository>/build/game-data/soc
```

OpenXRay creates its runtime directory here:

```text
~/Library/Application Support/GSC Game World/S.T.A.L.K.E.R. - Shadow of Chernobyl
```

The runtime directory has links to the licensed archives and to the OpenXRay
resources in the application. Saves, settings, and logs also use this runtime
directory.

To select a different game-data directory, run:

```sh
"/Applications/OpenXRay SoC.app/Contents/MacOS/xr_3da" -reset_gamedata_path
```

## 7. Stop a process that does not close

If the game does not close, stop only the OpenXRay SoC process:

```sh
pkill -f '/Applications/OpenXRay SoC.app/Contents/MacOS/xr_3da'
```

Confirm that no game process remains:

```sh
pgrep -fl '/Applications/OpenXRay SoC.app/Contents/MacOS/xr_3da'
```

The second command has no output when the process is stopped.

## 8. Use a resizable window with borders

Open the in-game console and run:

```text
vid_window_mode st_opt_windowed
vid_restart
```

The setting is saved in `user.ltx`. Other available values include
`st_opt_windowed_borderless`, `st_opt_fullscreen`, and
`st_opt_fullscreen_borderless`.

## 9. Get a crash log

Logs are in:

```text
~/Library/Application Support/GSC Game World/S.T.A.L.K.E.R. - Shadow of Chernobyl/_appdata_/logs
```

Send the newest `.log` file with a crash report. It usually has more useful
information than the short stack trace in the error window.

## Known visual detail

The black area in the upper-right part of the main menu is in the original SoC
`ui_mainmenu.dds` image. It is not a missing texture.

The general OpenXRay build procedure is in the
[Linux and macOS build guide](https://github.com/OpenXRay/xray-16/wiki/%5BEN%5D-How-to-build-and-setup-on-Linux-and-MacOS).
Loading
Loading