Skip to content

Commit

Permalink
Merge pull request #1331 from etternagame/develop
Browse files Browse the repository at this point in the history
0.74.0 merge
  • Loading branch information
poco0317 authored Dec 25, 2024
2 parents 9a0b9fb + de70c0c commit 4afe6cd
Show file tree
Hide file tree
Showing 10,090 changed files with 752,154 additions and 397,889 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions .changelog/Release_0-73-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Release Changelog


## [0.73.0] - 2024-xx-xx - EtternaOnline Rewrite

Refer to the 0.74 release notes for information here.

This release was renamed due to a lack of an official release, but copius public testing.
246 changes: 246 additions & 0 deletions .changelog/Release_0-74-0.md

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion .ci/install_ldoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ mkdir lua_tmp && cd lua_tmp
sudo apt install build-essential libreadline-dev unzip

# Acquire and install Lua
curl -R -O http://www.lua.org/ftp/lua-5.1.5.tar.gz
# curl -R -O http://www.lua.org/ftp/lua-5.1.5.tar.gz
echo "Getting lua"
wget http://www.lua.org/ftp/lua-5.1.5.tar.gz
file lua-5.1.5.tar.gz
tar -zxf lua-5.1.5.tar.gz
cd lua-5.1.5
make linux
sudo make install
cd ..

# Acquire and install LuaRocks
echo "Getting luarocks"
wget https://luarocks.org/releases/luarocks-3.9.1.tar.gz
file luarocks-3.9.1.tar.gz
tar zxpf luarocks-3.9.1.tar.gz
cd luarocks-3.9.1
./configure && make
Expand Down
239 changes: 221 additions & 18 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ jobs:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-20.04, apt: g++-8, cxx: g++-8, cc: gcc-8, dist: false}
- { os: ubuntu-20.04, apt: g++-9, cxx: g++-9, cc: gcc-9, dist: false}
- { os: ubuntu-20.04, apt: g++-10, cxx: g++-10, cc: gcc-10, dist: false}
- { os: ubuntu-20.04, apt: clang-9, cxx: clang++-9, cc: clang-9, dist: false}
- { os: ubuntu-20.04, apt: clang-10, cxx: clang++-10, cc: clang-10, dist: false}
- { os: ubuntu-20.04, apt: clang-11, cxx: clang++-11, cc: clang-11, dist: false}
- { os: ubuntu-20.04, apt: clang-12, cxx: clang++-12, cc: clang-12, dist: true}
- { os: ubuntu-22.04, apt: g++-8, cxx: g++-8, cc: gcc-8, dist: false}
- { os: ubuntu-22.04, apt: g++-9, cxx: g++-9, cc: gcc-9, dist: false}
- { os: ubuntu-22.04, apt: g++-10, cxx: g++-10, cc: gcc-10, dist: false}
- { os: ubuntu-22.04, apt: g++-13, cxx: g++-13, cc: gcc-13, dist: false}
- { os: ubuntu-22.04, apt: clang-9, cxx: clang++-9, cc: clang-9, dist: false}
- { os: ubuntu-22.04, apt: clang-10, cxx: clang++-10, cc: clang-10, dist: false}
- { os: ubuntu-22.04, apt: clang-11, cxx: clang++-11, cc: clang-11, dist: false}
- { os: ubuntu-22.04, apt: clang-12, cxx: clang++-12, cc: clang-12, dist: true}
- { os: ubuntu-22.04, apt: clang-16, cxx: clang++-16, cc: clang-16, dist: false}

steps:
- name: Checkout Etterna
Expand Down Expand Up @@ -97,15 +99,107 @@ jobs:
with:
files: ${{github.workspace}}/main/build/*.tar.gz

macos_aarch64:
name: macOS aarch64 ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
- { os: macos-14, name: "Sonoma", dist: true }

steps:

- name: Checkout Etterna
uses: actions/checkout@v3
with:
path: main

- name: Checkout CrashpadTools
uses: actions/checkout@v3
with:
repository: etternagame/CrashpadTools
path: tools

- name: Install homebrew packages
run: brew install cmake nasm ninja openssl

- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_CRASHPAD=OFF -G Ninja ..

- name: Build Project
run: cd main/build && ninja

- name: Generate binary
if: ${{matrix.cfg.dist}}
run: cd main/build && cpack

- name: Upload Binary
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: "Etterna - macOS aarch64"
path: '${{github.workspace}}/main/build/*.dmg'

- name: Update Environment Variables
if: ${{matrix.cfg.dist}}
run: |
echo "${{github.workspace}}/tools/mac" >> $GITHUB_PATH
echo "ETTERNA_ARCH=aarch64" >> $GITHUB_ENV
- name: Generate Symbols
if: ${{matrix.cfg.dist}}
run: |
echo "Running dsymutil..."
dsymutil -o ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > /dev/null
echo "Dumping Symbols..."
dump_syms ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > ${{github.workspace}}/main/Etterna.sym
echo "Stripping debug symbols from binary..."
strip main/Etterna.app/Contents/MacOS/Etterna
- name: Prepare symbols for upload artifacts
if: ${{matrix.cfg.dist}}
run: cd main && ${{github.workspace}}/main/.ci/prepare_symbols.py

- name: Upload Symbols to action artifacts
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: Etterna Symbols - ${{github.sha}}
path: '${{github.workspace}}/main/EtternaSymbolsUploadDir'

- name: Get version for CrashServer Upload
id: get_version
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload Symbols to Crash Server
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: symupload ${{github.workspace}}/main/Etterna.sym "https://crash.etterna.dev/api/symbol/upload?api_key=${{secrets.CRASHSERVER_API_KEY}}&version=${{ steps.get_version.outputs.VERSION }}"

- name: Upload files to Release
uses: softprops/action-gh-release@v1
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
with:
files: ${{github.workspace}}/main/build/*.dmg

macos:
name: macOS x64 ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
- { os: macos-10.15, name: "Catalina", dist: true}
- { os: macos-11, name: "Big Sur", dist: false}
#- { os: macos-10.15, name: "Catalina", dist: false} # rendered useless by GHA
- { os: macos-13, name: "Ventura", dist: true}
#- { os: macos-12, name: "Monterey", dist: true} # rendered useless by GHA
#- { os: macos-11, name: "Big Sur", dist: true} # rendered useless by GHA

steps:

Expand All @@ -123,6 +217,16 @@ jobs:
- name: Install homebrew packages
run: brew install cmake nasm ninja openssl

- name: Setup Python 2.7
uses: MatteoH2O1999/[email protected]
with:
python-version: '2.7'

- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja ..

Expand Down Expand Up @@ -152,7 +256,7 @@ jobs:
echo "Running dsymutil..."
dsymutil -o ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > /dev/null
echo "Dumping Symbols..."
dump_syms -g ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > ${{github.workspace}}/main/Etterna.sym
dump_syms ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > ${{github.workspace}}/main/Etterna.sym
echo "Stripping debug symbols from binary..."
strip main/Etterna.app/Contents/MacOS/Etterna
Expand Down Expand Up @@ -182,7 +286,93 @@ jobs:
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
with:
files: ${{github.workspace}}/main/build/*.dmg
macos_high_sierra:
name: macOS High Sierra (Legacy) ${{matrix.cfg.name}}
runs-on: ${{matrix.cfg.os}}
strategy:
fail-fast: false
matrix:
cfg:
#- { os: macos-10.15, name: "Catalina", dist: false} # rendered useless by GHA
- { os: macos-13, name: "Ventura", dist: true}
#- { os: macos-12, name: "Monterey", dist: true} # rendered useless by GHA
#- { os: macos-11, name: "Big Sur", dist: true}

steps:

- name: Checkout Etterna
uses: actions/checkout@v3
with:
path: main

- name: Checkout CrashpadTools
uses: actions/checkout@v3
with:
repository: etternagame/CrashpadTools
path: tools

- name: Install homebrew packages
run: brew install cmake nasm ninja && brew tap etternagame/etterna && brew update && HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install etternagame/etterna/[email protected]_osx_high_sierra

- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/[email protected]_osx_high_sierra -DWITH_CRASHPAD=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja ..

- name: Build Project
run: cd main/build && ninja

- name: Generate binary
if: ${{matrix.cfg.dist}}
run: cd main/build && cpack

- name: Upload Binary
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: "Etterna - OSX High Sierra (Legacy)"
path: '${{github.workspace}}/main/build/*.dmg'

- name: Update Environment Variables
if: ${{matrix.cfg.dist}}
run: |
echo "${{github.workspace}}/tools/mac" >> $GITHUB_PATH
echo "ETTERNA_ARCH=x64" >> $GITHUB_ENV
- name: Generate Symbols
if: ${{matrix.cfg.dist}}
run: |
echo "Running dsymutil..."
dsymutil -o ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > /dev/null
echo "Dumping Symbols..."
dump_syms ${{github.workspace}}/main/Etterna.dsym main/Etterna.app/Contents/MacOS/Etterna > ${{github.workspace}}/main/Etterna.sym
echo "Stripping debug symbols from binary..."
strip main/Etterna.app/Contents/MacOS/Etterna
- name: Prepare symbols for upload artifacts
if: ${{matrix.cfg.dist}}
run: cd main && ${{github.workspace}}/main/.ci/prepare_symbols.py

- name: Upload Symbols to action artifacts
if: ${{matrix.cfg.dist}}
uses: actions/upload-artifact@v3
with:
name: Etterna Symbols - ${{github.sha}}
path: '${{github.workspace}}/main/EtternaSymbolsUploadDir'

- name: Get version for CrashServer Upload
id: get_version
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: |
echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Upload Symbols to Crash Server
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
run: symupload ${{github.workspace}}/main/Etterna.sym "https://crash.etterna.dev/api/symbol/upload?api_key=${{secrets.CRASHSERVER_API_KEY}}&version=${{ steps.get_version.outputs.VERSION }}"

- name: Upload files to Release
uses: softprops/action-gh-release@v1
if: ${{ matrix.cfg.dist && github.event_name == 'release' && github.event.action == 'published' }}
with:
files: ${{github.workspace}}/main/build/*.dmg
windows: # Windows x64 and x86 build matrix
strategy:
fail-fast: false # Don't cancel other matrix jobs if one fails
Expand Down Expand Up @@ -216,18 +406,31 @@ jobs:
echo "${{github.workspace}}/tools/win/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "ETTERNA_ARCH=${{matrix.cfg.name}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup Python 2.7
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Setup Python 2.7
uses: MatteoH2O1999/[email protected]
with:
python-version: '2.7'

- name: Install chocolatey packages (i386)
if: ${{ matrix.cfg.arch == 'x86' }}
run: choco install ninja nsis openssl curl -y --x86
run: choco install ninja nsis curl -y --x86

- name: Install openSSL (i386)
if: ${{ matrix.cfg.arch == 'x86' }}
run: choco install openssl --version=1.1.1.2100 -y --x86

- name: Install chocolatey packages (x64)
if: ${{ matrix.cfg.arch == 'x64' }}
run: choco install ninja nsis openssl curl -y
run: choco install ninja nsis curl -y

- name: Install openSSL (x64)
if: ${{ matrix.cfg.arch == 'x64' }}
run: choco install openssl --version=1.1.1.2100 -y

- name: Configure MSBuild
uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -251,16 +454,16 @@ jobs:
name: "Etterna - Windows ${{matrix.cfg.name}}"
path: '${{github.workspace}}/main/build/*.exe'

- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Generate Symbols
run: |
echo "Dumping Symbols..."
dump_syms.exe main/Program/Etterna.pdb > ${{github.workspace}}/main/Etterna.sym
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Prepare symbols for action artifacts
run: cd main && python ${{github.workspace}}/main/.ci/prepare_symbols.py

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.vs
.idea
/[Bb]uild
/out/

# Ignore executables (Linux, macOS, Windows)
/Etterna
Expand Down
22 changes: 20 additions & 2 deletions CMake/Helpers/CMakeMacOS.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# TODO: Remove CPU_X86_64, CPU_X86, and CRASH_HANDLER
# CRASH_HANDLER is unnecessary as the game should have that as an option component
# CPU_X86_64, CPU_X86 already exists as compiler predefined macros. Use those instead.
list(APPEND cdefs _XOPEN_SOURCE CPU_X86_64 GL_SILENCE_DEPRECATION)

list(APPEND cdefs _XOPEN_SOURCE GL_SILENCE_DEPRECATION)
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")
list(APPEND cdefs CPU_X86_64)
endif()
set_target_properties(Etterna PROPERTIES COMPILE_DEFINITIONS "${cdefs}")

set_target_properties(Etterna PROPERTIES MACOSX_BUNDLE TRUE)
set(CMAKE_EXE_LINKER_FLAGS "-pagezero_size 10000 -image_base 100000000")

if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")
#TODO: Do we even need these on x86_64?
# For the ARM build, it breaks if they're present, and seems to work just fine without them...
# Seems to have made its way into this file eventually after 2d03a8163f5d10c6b569eb3c92543677c910e82e
# That commit appears to be copying part of luajit's CMakeLists, originating at f31f6eea7bf52400929fcfb303637741bb645818
# (https://github.com/LuaJIT/LuaJIT/commit/f31f6eea7bf52400929fcfb303637741bb645818)
# *That* appears to have originated from https://github.com/LuaJIT/LuaJIT/commit/f76e5a311ba543ae174acd3b585fb672fde8a3b5 which states
### /* OSX mmap() uses a naive first-fit linear search. That's perfect for us.
### ** But -pagezero_size must be set, otherwise the lower 4GB are blocked.
### */
set(CMAKE_EXE_LINKER_FLAGS "-pagezero_size 10000 -image_base 100000000")
endif()

set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")

# Set AppBundle icon
Expand Down
Loading

0 comments on commit 4afe6cd

Please sign in to comment.