Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Northfear committed Apr 23, 2024
2 parents aa74b2b + ad8a275 commit 165f279
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 89 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo apt install cppcheck
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: cppcheck
run: cppcheck --std=c++17 src/
Expand All @@ -38,7 +38,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: clang-format
run: find src -type f -name \*.cc -o -name \*.h | xargs clang-format --dry-run --Werror
Expand All @@ -50,7 +50,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
Expand All @@ -60,7 +60,7 @@ jobs:
cache: gradle

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: os/android/app/.cxx
key: android-cmake-v1
Expand All @@ -81,7 +81,7 @@ jobs:
./gradlew assembleDebug
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fallout-ce-debug.apk
path: os/android/app/build/outputs/apk/debug/app-debug.apk
Expand All @@ -94,10 +94,10 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: ios-cmake-v2
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
cpack -C RelWithDebInfo
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fallout-ce.ipa
path: build/fallout-ce.ipa
Expand All @@ -148,7 +148,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Dependencies (x86)
if: matrix.arch == 'x86'
Expand All @@ -165,7 +165,7 @@ jobs:
sudo apt install libsdl2-dev zlib1g-dev
- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: linux-${{ matrix.arch }}-cmake-v1
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
# EOL
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fallout-ce-linux-${{ matrix.arch }}
path: build/fallout-ce
Expand All @@ -208,10 +208,10 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: macos-cmake-v4
Expand All @@ -238,7 +238,7 @@ jobs:
cpack -C RelWithDebInfo
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fallout-ce-macos.dmg
path: build/Fallout Community Edition.dmg
Expand All @@ -260,10 +260,10 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: windows-${{ matrix.arch }}-cmake-v1
Expand All @@ -284,7 +284,7 @@ jobs:
# EOL
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: fallout-ce-windows-${{ matrix.arch }}
path: build/RelWithDebInfo/fallout-ce.exe
Expand Down
67 changes: 40 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
cache: gradle

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: os/android/app/.cxx
key: android-cmake-v1
Expand All @@ -51,22 +51,22 @@ jobs:
run: |
cd os/android/app/build/outputs/apk/release
cp app-release.apk fallout-ce-android.apk
gh release upload ${{ github.ref_name }} fallout-ce-android.apk
gh release upload ${{ github.event.release.tag_name }} fallout-ce-android.apk
rm fallout-ce-android.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

ios:
name: iOS

runs-on: macos-11
runs-on: macos-12

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: ios-cmake-v1
Expand All @@ -75,25 +75,31 @@ jobs:
run: |
cmake \
-B build \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \
-D ENABLE_BITCODE=0 \
-D PLATFORM=OS64 \
-G Xcode \
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \
# EOL
- name: Build
run: |
cmake \
--build build \
--config RelWithDebInfo \
-j $(sysctl -n hw.physicalcpu) \
--target package \
# EOL
- name: Pack
run: |
cd build
cpack -C RelWithDebInfo
- name: Upload
run: |
cd build
cp fallout-ce.zip fallout-ce-ios.ipa
gh release upload ${{ github.ref_name }} fallout-ce-ios.ipa
cp fallout-ce.ipa fallout-ce-ios.ipa
gh release upload ${{ github.event.release.tag_name }} fallout-ce-ios.ipa
rm fallout-ce-ios.ipa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -112,7 +118,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Dependencies (x86)
if: matrix.arch == 'x86'
Expand All @@ -129,7 +135,7 @@ jobs:
sudo apt install libsdl2-dev zlib1g-dev
- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: linux-${{ matrix.arch }}-cmake-v1
Expand Down Expand Up @@ -162,7 +168,7 @@ jobs:
run: |
cd build
tar -czvf fallout-ce-linux-${{ matrix.arch }}.tar.gz fallout-ce
gh release upload ${{ github.ref_name }} fallout-ce-linux-${{ matrix.arch }}.tar.gz
gh release upload ${{ github.event.release.tag_name }} fallout-ce-linux-${{ matrix.arch }}.tar.gz
rm fallout-ce-linux-${{ matrix.arch }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -174,16 +180,16 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Import code signing certificates
uses: apple-actions/import-codesign-certs@v1
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_FILE_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_PASSWORD }}

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: macos-cmake-v3
Expand All @@ -192,26 +198,33 @@ jobs:
run: |
cmake \
-B build \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CPACK_BUNDLE_APPLE_CERT_APP="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
-G Xcode \
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS="NO" \
-D CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--options=runtime --timestamp" \
# EOL
- name: Build
run: |
cmake \
--build build \
--config RelWithDebInfo \
-j $(sysctl -n hw.physicalcpu) \
--target package \
# EOL
- name: Pack
run: |
cd build
cpack -C RelWithDebInfo
- name: Notarize
run: |
brew install mitchellh/gon/gon
cat << EOF > config.json
{
"notarize": {
"path": "build/fallout-ce.dmg",
"bundle_id": "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" build/fallout-ce.app/Contents/Info.plist)",
"path": "build/Fallout Community Edition.dmg",
"bundle_id": "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "build/RelWithDebInfo/Fallout Community Edition.app/Contents/Info.plist")",
"staple": true
}
}
Expand All @@ -225,8 +238,8 @@ jobs:
- name: Upload
run: |
cd build
cp fallout-ce.dmg fallout-ce-macos.dmg
gh release upload ${{ github.ref_name }} fallout-ce-macos.dmg
cp "Fallout Community Edition.dmg" fallout-ce-macos.dmg
gh release upload ${{ github.event.release.tag_name }} fallout-ce-macos.dmg
rm fallout-ce-macos.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -247,10 +260,10 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache cmake build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build
key: windows-${{ matrix.arch }}-cmake-v1
Expand All @@ -274,7 +287,7 @@ jobs:
run: |
cd build/RelWithDebInfo
7z a fallout-ce-windows-${{ matrix.arch }}.zip fallout-ce.exe
gh release upload ${{ github.ref_name }} fallout-ce-windows-${{ matrix.arch }}.zip
gh release upload ${{ github.event.release.tag_name }} fallout-ce-windows-${{ matrix.arch }}.zip
rm fallout-ce-windows-${{ matrix.arch }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ if(VITA)
add_definitions(-D_DEBUG)
endif()

if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND NOT VITA)
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND NOT VITA)
add_subdirectory("third_party/sdl2")
else()
find_package(SDL2)
Expand All @@ -388,13 +388,6 @@ if(APPLE)
else()
install(TARGETS ${EXECUTABLE_NAME} DESTINATION .)

if (CPACK_BUNDLE_APPLE_CERT_APP)
install(CODE "
execute_process(COMMAND codesign --deep --force --options runtime --sign \"${CPACK_BUNDLE_APPLE_CERT_APP}\" ${CMAKE_BINARY_DIR}/Fallout Community Edition.app)
"
COMPONENT Runtime)
endif()

set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON)
set(CPACK_PACKAGE_FILE_NAME "Fallout Community Edition")
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ Download and copy `fallout-ce.exe` to your `Fallout` folder. It serves as a drop

- Use Windows installation as a base - it contains data assets needed to play. Copy `Fallout` folder somewhere, for example `/home/john/Desktop/Fallout`.

- Alternatively you can extract the needed files from the GoG installer:

```console
$ sudo apt install innoextract
$ innoextract ~/Downloads/setup_fallout_2.1.0.18.exe -I app
$ mv app Fallout
```

- Download and copy `fallout-ce` to this folder.

- Install [SDL2](https://libsdl.org/download-2.0.php):
Expand All @@ -97,6 +105,14 @@ $ sudo apt install libsdl2-2.0-0

- Alternatively you can use Fallout from MacPlay/The Omni Group as a base - you need to extract game assets from the original bundle. Mount CD/DMG, right click `Fallout` -> `Show Package Contents`, navigate to `Contents/Resources`. Copy `GameData` folder somewhere, for example `/Applications/Fallout`.

- Or if you're a Terminal user and have Homebrew installed you can extract the needed files from the GoG installer:

```console
$ brew install innoextract
$ innoextract ~/Downloads/setup_fallout_2.1.0.18.exe -I app
$ mv app /Applications/Fallout
```

- Download and copy `fallout-ce.app` to this folder.

- Run `fallout-ce.app`.
Expand Down
Loading

0 comments on commit 165f279

Please sign in to comment.