Skip to content

Commit

Permalink
Merge branch 'master' into blaze-controller-target-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcszk committed Jan 22, 2024
2 parents 5dd2fa5 + 51ab010 commit 2b0dac9
Show file tree
Hide file tree
Showing 638 changed files with 54,602 additions and 38,630 deletions.
6 changes: 0 additions & 6 deletions .bettercodehub.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- store_artifacts: {path: ./build/devilutionx.cia, destination: devilutionx.cia}
amigaos-m68k:
docker:
- image: amigadev/crosstools:m68k-amigaos
- image: amigadev/crosstools:m68k-amigaos-gcc10
working_directory: ~/repo
steps:
- checkout
Expand Down
43 changes: 43 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ARG VARIANT=debian-12
FROM mcr.microsoft.com/devcontainers/base:${VARIANT}
USER root

# Install APT packages
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install tar curl zip unzip bash-completion build-essential ripgrep htop \
ninja-build ccache g++ mold gdb clang-format clang-tidy \
rpm pkg-config cmake git smpq gettext libsdl2-dev libsdl2-image-dev libsodium-dev \
libpng-dev libbz2-dev libfmt-dev libgtest-dev libgmock-dev libsimpleini-dev zsh \
qtbase5-dev qt6-base-dev ristretto \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

# Install devilutionx-graphics-tools
RUN git clone https://github.com/diasurgical/devilutionx-graphics-tools.git /tmp/devilutionx-graphics-tools && \
cd /tmp/devilutionx-graphics-tools && \
cmake -S. -Bbuild-rel -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF && \
cmake --build build-rel -j $(getconf _NPROCESSORS_ONLN) && \
cmake --install build-rel --component Binaries && \
rm -rf /tmp/devilutionx-graphics-tools

# Install devilutionx-mpq-tools
RUN git clone https://github.com/diasurgical/devilutionx-mpq-tools.git /tmp/devilutionx-mpq-tools && \
cd /tmp/devilutionx-mpq-tools && \
cmake -S. -Bbuild-rel -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF && \
cmake --build build-rel -j $(getconf _NPROCESSORS_ONLN) && \
cmake --install build-rel && \
rm -rf /tmp/devilutionx-mpq-tools

# Install d1-graphics-tool
RUN curl -O -L https://github.com/diasurgical/d1-graphics-tool/releases/latest/download/D1GraphicsTool-Linux-x64.deb && \
dpkg -i D1GraphicsTool-Linux-x64.deb && \
rm D1GraphicsTool-Linux-x64.deb

# Download spawn.mpq and fonts.mpq
RUN curl --create-dirs -O -L --output-dir /usr/local/share/diasurgical/devilutionx/ \
https://github.com/diasurgical/devilutionx-assets/releases/latest/download/spawn.mpq && \
curl --create-dirs -O -L --output-dir /usr/local/share/diasurgical/devilutionx/ \
https://github.com/diasurgical/devilutionx-assets/releases/latest/download/fonts.mpq && \
chown -R vscode: /usr/local/share/diasurgical/

# Desktop environment configuration
COPY fluxbox /home/vscode/.fluxbox/
30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"github.vscode-github-actions",
"ms-vscode.cmake-tools"
]
}
},
"features": {
// https://github.com/devcontainers/features/tree/main/src/desktop-lite
"ghcr.io/devcontainers/features/desktop-lite:1": {
"webPort": 6080,
"password": "vscode"
},
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {},
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
},
"forwardPorts": [
6080
],
"portsAttributes": {
"6080": {
"label": "desktop"
}
}
}
7 changes: 7 additions & 0 deletions .devcontainer/fluxbox/apps
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[transient] (role=GtkFileChooserDialog)
[Dimensions] {70% 70%}
[Position] (CENTER) {0 0}
[end]
[app] (name=AppRun) (class=tiled)
[Fullscreen] {yes}
[end]
20 changes: 20 additions & 0 deletions .devcontainer/fluxbox/menu
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[begin] ( Application Menu )
[exec] (File Manager) { nautilus /workspaces/devilutionX } </usr/share/icons/gnome/32x32/apps/file-manager.png>
[exec] (D1 Graphics Tool) { D1GraphicsTool } <>
[exec] (Text Editor) { mousepad } <>
[exec] (Terminal) { tilix -w ~ -e $(readlink -f /proc/$$/exe) -il } <>
[exec] (Web Browser) { x-www-browser --disable-dev-shm-usage } <>
[submenu] (System) {}
[exec] (Set Resolution) { tilix -t "Set Resolution" -e bash /usr/local/bin/set-resolution } <>
[exec] (Edit Application Menu) { mousepad ~/.fluxbox/menu } <>
[exec] (Passwords and Keys) { seahorse } <>
[exec] (Top Processes) { tilix -t "Top" -e htop } <>
[exec] (Disk Utilization) { tilix -t "Disk Utilization" -e ncdu / } <>
[exec] (Editres) {editres} <>
[exec] (Xfontsel) {xfontsel} <>
[exec] (Xkill) {xkill} <>
[exec] (Xrefresh) {xrefresh} <>
[end]
[config] (Configuration)
[workspaces] (Workspaces)
[end]
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ end_of_line = lf
[*.po]
end_of_line = lf

[*.lua]
indent_style = space
indent_size = 2
end_of_line = lf

[*.py]
indent_style = space
indent_size = 4
Expand Down Expand Up @@ -53,6 +58,9 @@ end_of_line = lf
[*.txt]
end_of_line = crlf

[*.tsv]
trim_trailing_whitespace = false

[AppRun]
end_of_line = lf

Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Bug report
description: Create a report to help us improve
title: "[Issue Report]: "
labels: ["issue report"]
body:
- type: dropdown
id: operating-system
Expand All @@ -26,7 +28,8 @@ body:
attributes:
label: DevilutionX version
options:
- 1.5.0 (latest release)
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.0
Expand Down
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Feature Request
description: Request a feature or improvement.
title: "[Feature Request]: "
labels: ["enhancement"]
body:
- type: dropdown
id: feature-type
attributes:
label: Feature Type
options:
- Quality of Life
- Touch Controls
- Gamepad Controls
- Other (please specify)
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe
placeholder: A clear and concise description of the desired feature/change.
validations:
required: true
12 changes: 7 additions & 5 deletions .github/workflows/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ on:
- master
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
types: [ opened, synchronize ]
paths-ignore:
- '*.md'
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -23,12 +25,12 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y gettext

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
Expand All @@ -38,8 +40,8 @@ jobs:
uses: actions/cache@v3
with:
path: android-project/app/.cxx
key: ${{ github.workflow }}-v2-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v2-
key: ${{ github.workflow }}-v4-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v4-

- name: Build
working-directory: ${{github.workspace}}
Expand All @@ -48,7 +50,7 @@ jobs:

- name: Upload-Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: devilutionx-debug.apk
path: android-project/app/build/outputs/apk/debug/app-debug.apk
Expand Down
46 changes: 35 additions & 11 deletions .github/workflows/Linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ on:
- master
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
types: [opened, synchronize]
paths-ignore:
- '*.md'
- 'docs/**'
release:
types: [published]
paths-ignore:
- '*.md'
- 'docs/**'
workflow_dispatch:

concurrency:
Expand All @@ -25,23 +28,44 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create Build Environment
# Work around the somewhat broken packages in the GitHub Actions Ubuntu 20.04 image.
# https://github.com/actions/runner-images/issues/4620#issuecomment-981333260
- name: Work around broken packages
run: sudo apt-get -y install --allow-downgrades libpcre2-8-0=10.34-7

- name: Add clang repo
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo tee /etc/apt/sources.list.d/clang.list <<LIST
deb [arch=amd64,arm64] http://apt.llvm.org/focal/ llvm-toolchain-focal main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
LIST
# Installs dependencies, including arm64 libraries (runs `sudo apt-get update` as part of it)
- name: Install dependencies
run: Packaging/nix/debian-cross-aarch64-prep.sh --no-gcc

- name: Install clang-18
run: |
# Work around the somewhat broken packages in the GitHub Actions Ubuntu 20.04 image.
# https://github.com/actions/runner-images/issues/4620#issuecomment-981333260
sudo apt-get -y install --allow-downgrades libpcre2-8-0=10.34-7
Packaging/nix/debian-cross-aarch64-prep.sh
sudo apt-get install -yq --no-install-recommends clang-18 lld-18 libc++-18-dev:arm64 \
libgcc-10-dev-arm64-cross binutils-aarch64-linux-gnu libc++1-18:arm64 libc++abi1-18:arm64 && \
sudo update-alternatives --install \
/usr/bin/clang++ clang++ /usr/bin/clang++-18 200 && \
sudo update-alternatives --install \
/usr/bin/clang clang /usr/bin/clang-18 200 \
--slave /usr/bin/lld lld /usr/bin/lld-18 \
--slave /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-18
- name: Cache CMake build folder
uses: actions/cache@v3
with:
path: build
key: ${{ github.workflow }}-v2-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v2-
key: ${{ github.workflow }}-v6-${{ github.sha }}
restore-keys: ${{ github.workflow }}-v6-

- name: Build
working-directory: ${{github.workspace}}
Expand All @@ -51,7 +75,7 @@ jobs:
# We set DEVILUTIONX_SYSTEM_LIBFMT=OFF because its soversion changes frequently.
# We set DEVILUTIONX_SYSTEM_SIMPLEINI=OFF because we require v4.19+, still missing from many distributions.
run: |
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/aarch64-linux-gnu.toolchain.cmake \
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/aarch64-linux-gnu-clang-static-libc++.toolchain.cmake \
-DCMAKE_BUILD_TYPE=${{env.CMAKE_BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr -DCPACK=ON \
-DDEVILUTIONX_SYSTEM_LIBFMT=OFF -DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF && \
cmake --build build -j $(getconf _NPROCESSORS_ONLN) --target package
Expand All @@ -65,15 +89,15 @@ jobs:

- name: Upload Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: devilutionx-aarch64-linux-gnu.tar.xz
path: devilutionx-aarch64-linux-gnu.tar.xz

# AppImage cross-packaging is not implemented yet.
# - name: Upload AppImage
# if: ${{ !env.ACT }}
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: devilutionx-aarch64-linux-gnu.appimage
# path: devilutionx-aarch64-linux-gnu.appimage
Expand Down
Loading

0 comments on commit 2b0dac9

Please sign in to comment.