638 changed files with 54602 additions and 38630 deletions
@ -1,6 +0,0 @@
|
||||
exclude: |
||||
- /Packaging/.* |
||||
- /3rdParty/.* |
||||
languages: |
||||
- cpp |
||||
component_depth: 2 |
||||
@ -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/ |
||||
@ -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" |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,7 @@
|
||||
[transient] (role=GtkFileChooserDialog) |
||||
[Dimensions] {70% 70%} |
||||
[Position] (CENTER) {0 0} |
||||
[end] |
||||
[app] (name=AppRun) (class=tiled) |
||||
[Fullscreen] {yes} |
||||
[end] |
||||
@ -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] |
||||
@ -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 |
||||
@ -0,0 +1,66 @@
|
||||
name: Windows 9x MinGW |
||||
|
||||
on: |
||||
push: |
||||
branches: |
||||
- master |
||||
paths-ignore: |
||||
- '*.md' |
||||
- 'docs/**' |
||||
pull_request: |
||||
types: [ opened, synchronize ] |
||||
paths-ignore: |
||||
- '*.md' |
||||
- 'docs/**' |
||||
release: |
||||
types: [published] |
||||
paths-ignore: |
||||
- '*.md' |
||||
- 'docs/**' |
||||
workflow_dispatch: |
||||
|
||||
concurrency: |
||||
group: ${{ github.workflow }}-${{ github.ref }} |
||||
cancel-in-progress: true |
||||
|
||||
jobs: |
||||
build: |
||||
runs-on: ubuntu-22.04 |
||||
steps: |
||||
- name: Checkout |
||||
uses: actions/checkout@v4 |
||||
with: |
||||
fetch-depth: 0 |
||||
|
||||
- name: Create Build Environment |
||||
run: > |
||||
sudo apt-get update && |
||||
sudo apt-get install -y cmake gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools libz-mingw-w64-dev gettext dpkg-dev wget git sudo smpq && |
||||
sudo rm /usr/i686-w64-mingw32/lib/libz.dll.a && |
||||
sudo Packaging/windows/mingw9x-prep.sh |
||||
|
||||
- name: Configure CMake |
||||
shell: bash |
||||
working-directory: ${{github.workspace}} |
||||
run: cmake -S. -Bbuild-windows9x -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCPACK=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingw9x.toolchain.cmake -DTARGET_PLATORM=windows9x |
||||
|
||||
- name: Build |
||||
working-directory: ${{github.workspace}} |
||||
shell: bash |
||||
run: | |
||||
cmake --build build-windows9x -j $(nproc) --target package |
||||
mv build-windows9x/devilutionx.zip devilutionx-win9x.zip |
||||
|
||||
- name: Upload-Package |
||||
if: ${{ !env.ACT }} |
||||
uses: actions/upload-artifact@v4 |
||||
with: |
||||
path: devilutionx-win9x.zip |
||||
|
||||
- name: Update Release |
||||
if: ${{ github.event_name == 'release' && !env.ACT }} |
||||
uses: svenstaro/upload-release-action@v2 |
||||
with: |
||||
file: devilutionx-win9x.zip |
||||
overwrite: true |
||||
|
||||
@ -0,0 +1,24 @@
|
||||
include(functions/FetchContent_MakeAvailableExcludeFromAll) |
||||
|
||||
set(LUA_ENABLE_TESTING OFF) |
||||
set(LUA_BUILD_COMPILER OFF) |
||||
if(DEVILUTIONX_STATIC_LUA) |
||||
set(LUA_ENABLE_SHARED OFF) |
||||
else() |
||||
set(LUA_ENABLE_SHARED ON) |
||||
endif() |
||||
|
||||
include(FetchContent) |
||||
FetchContent_Declare(Lua |
||||
URL https://github.com/walterschell/Lua/archive/88246d621abf7b6fba9332f49229d507f020e450.tar.gz |
||||
URL_HASH MD5=03b76927cb5341ffc53bea12c37ddcca |
||||
) |
||||
FetchContent_MakeAvailableExcludeFromAll(Lua) |
||||
|
||||
if(ANDROID AND ("${ANDROID_ABI}" STREQUAL "armeabi-v7a" OR "${ANDROID_ABI}" STREQUAL "x86")) |
||||
target_compile_definitions(lua_internal INTERFACE -DLUA_USE_C89) |
||||
elseif(NINTENDO_3DS OR VITA OR NINTENDO_SWITCH OR NXDK) |
||||
target_compile_definitions(lua_static PUBLIC -DLUA_USE_C89) |
||||
elseif(IOS) |
||||
target_compile_definitions(lua_static PUBLIC -DLUA_USE_IOS) |
||||
endif() |
||||
@ -0,0 +1,18 @@
|
||||
#include <string_view> |
||||
|
||||
#define ErrAsio(message) devilution::ErrDlg("ASIO Error", message, __FILE__, __LINE__) |
||||
|
||||
namespace devilution { |
||||
|
||||
extern void ErrDlg(const char* title, std::string_view error, std::string_view logFilePath, int logLineNr); |
||||
|
||||
} // namespace devilution
|
||||
|
||||
namespace asio::detail { |
||||
|
||||
void fatal_exception(const char* message) |
||||
{ |
||||
ErrAsio(message); |
||||
} |
||||
|
||||
} // namespace asio::detail
|
||||
@ -0,0 +1,17 @@
|
||||
#pragma once |
||||
|
||||
#include <asio/detail/throw_exception.hpp> |
||||
|
||||
namespace asio::detail { |
||||
|
||||
void fatal_exception(const char *message); |
||||
|
||||
template <typename Exception> |
||||
void throw_exception( |
||||
const Exception &e |
||||
ASIO_SOURCE_LOCATION_PARAM) |
||||
{ |
||||
fatal_exception(e.what()); |
||||
} |
||||
|
||||
} // namespace asio::detail
|
||||
@ -0,0 +1,13 @@
|
||||
include(functions/FetchContent_MakeAvailableExcludeFromAll) |
||||
|
||||
set(SOL2_ENABLE_INSTALL OFF) |
||||
|
||||
include(FetchContent) |
||||
FetchContent_Declare(sol2 |
||||
URL https://github.com/ThePhD/sol2/archive/9c882a28fdb6f4ad79a53a4191b43ce48a661175.tar.gz |
||||
URL_HASH MD5=2637c3fcdcce3ff34b36437c1d3b99d1 |
||||
) |
||||
FetchContent_MakeAvailableExcludeFromAll(sol2) |
||||
|
||||
target_include_directories(sol2 SYSTEM BEFORE INTERFACE ${CMAKE_CURRENT_LIST_DIR}/sol_config) |
||||
target_compile_definitions(sol2 INTERFACE SOL_NO_EXCEPTIONS=1) |
||||
@ -0,0 +1,8 @@
|
||||
#pragma once |
||||
|
||||
#define SOL_SAFE_USERTYPE 1 |
||||
#define SOL_SAFE_REFERENCES 1 |
||||
#define SOL_SAFE_FUNCTION_CALLS 1 |
||||
#define SOL_SAFE_FUNCTION 1 |
||||
#define SOL_SAFE_NUMERICS 1 |
||||
#define SOL_IN_DEBUG_DETECTED 0 |
||||
@ -0,0 +1,36 @@
|
||||
#pragma once |
||||
|
||||
// sol2 uses std::cout for debug logging by default.
|
||||
// We want to use SDL logging instead for better compatibility.
|
||||
|
||||
#include <cstddef> |
||||
#include <string> |
||||
|
||||
#include <sol/stack.hpp> |
||||
|
||||
namespace devilutionx { |
||||
void Sol2DebugPrintStack(lua_State *L); |
||||
void Sol2DebugPrintSection(const std::string &message, lua_State *L); |
||||
} // namespace devilutionx
|
||||
|
||||
namespace sol::detail::debug { |
||||
|
||||
inline std::string dump_types(lua_State *L) { |
||||
std::string visual; |
||||
std::size_t size = lua_gettop(L) + 1; |
||||
for (std::size_t i = 1; i < size; ++i) { |
||||
if (i != 1) { |
||||
visual += " | "; |
||||
} |
||||
visual += type_name(L, stack::get<type>(L, static_cast<int>(i))); |
||||
} |
||||
return visual; |
||||
} |
||||
|
||||
inline void print_stack(lua_State *L) { ::devilutionx::Sol2DebugPrintStack(L); } |
||||
|
||||
inline void print_section(const std::string &message, lua_State *L) { |
||||
::devilutionx::Sol2DebugPrintSection(message, L); |
||||
} |
||||
|
||||
} // namespace sol::detail::debug
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
include(functions/FetchContent_MakeAvailableExcludeFromAll) |
||||
|
||||
include(FetchContent) |
||||
FetchContent_Declare(Tolk |
||||
URL https://github.com/sig-a11y/tolk/archive/89de98779e3b6365dc1688538d5de4ecba3fdbab.tar.gz |
||||
URL_HASH MD5=724f6022186573dd9c5c2c92ed9e21e6 |
||||
) |
||||
FetchContent_MakeAvailableExcludeFromAll(Tolk) |
||||
|
||||
target_include_directories(Tolk PUBLIC ${libTolk_SOURCE_DIR}/src) |
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4) |
||||
set(TOLK_LIB_DIR "${Tolk_SOURCE_DIR}/libs/x86") |
||||
else() |
||||
set(TOLK_LIB_DIR "${Tolk_SOURCE_DIR}/libs/x64") |
||||
endif() |
||||
file(GLOB TOLK_DLLS |
||||
LIST_DIRECTORIES false |
||||
"${TOLK_LIB_DIR}/*.dll" |
||||
"${TOLK_LIB_DIR}/*.ini") |
||||
foreach(_TOLK_DLL_PATH ${TOLK_DLLS}) |
||||
install(FILES "${_TOLK_DLL_PATH}" |
||||
DESTINATION "." |
||||
) |
||||
endforeach() |
||||
@ -0,0 +1,17 @@
|
||||
# find speech-dispatcher library and header if available |
||||
# Copyright (c) 2009, Jeremy Whiting <jpwhiting@kde.org> |
||||
# Copyright (c) 2011, Raphael Kubo da Costa <kubito@gmail.com> |
||||
# This module defines |
||||
# SPEECHD_INCLUDE_DIR, where to find libspeechd.h |
||||
# SPEECHD_LIBRARIES, the libraries needed to link against speechd |
||||
# SPEECHD_FOUND, If false, speechd was not found |
||||
# |
||||
# Redistribution and use is allowed according to the terms of the BSD license. |
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
||||
|
||||
find_path(SPEECHD_INCLUDE_DIR libspeechd.h PATH_SUFFIXES speech-dispatcher) |
||||
|
||||
find_library(SPEECHD_LIBRARIES NAMES speechd) |
||||
|
||||
include(FindPackageHandleStandardArgs) |
||||
find_package_handle_standard_args(Speechd REQUIRED_VARS SPEECHD_INCLUDE_DIR SPEECHD_LIBRARIES) |
||||
@ -0,0 +1,27 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux) |
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64) |
||||
|
||||
set(triple aarch64-linux-gnu) |
||||
|
||||
set(CMAKE_C_COMPILER "/usr/bin/clang") |
||||
set(CMAKE_C_COMPILER_TARGET "${triple}") |
||||
set(CMAKE_CXX_COMPILER "/usr/bin/clang++") |
||||
set(CMAKE_CXX_FLAGS_INIT "-stdlib=libc++") |
||||
set(CMAKE_CXX_COMPILER_TARGET "${triple}") |
||||
set(CMAKE_ASM_COMPILER "/usr/bin/clang") |
||||
set(CMAKE_ASM_COMPILER_TARGET "${triple}") |
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=/usr/bin/ld.lld -static-libstdc++ -static-libgcc") |
||||
|
||||
set(CMAKE_FIND_ROOT_PATH "/usr/aarch64-linux-gnu;/usr") |
||||
set(CMAKE_LIBRARY_ARCHITECTURE "${triple}") |
||||
|
||||
set(CMAKE_STRIP "/usr/bin/aarch64-linux-gnu-strip") |
||||
set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_LIST_DIR}/aarch64-linux-gnu-pkg-config" CACHE STRING "Path to pkg-config") |
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE arm64) |
||||
@ -0,0 +1,29 @@
|
||||
SET(MINGW_CROSS TRUE) |
||||
|
||||
SET(CROSS_PREFIX "/usr" CACHE STRING "crosstool-NG prefix") |
||||
|
||||
SET(CMAKE_SYSTEM_NAME Windows) |
||||
|
||||
# workaround |
||||
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "${CROSS_PREFIX}/i686-w64-mingw32/include") |
||||
|
||||
list(PREPEND CMAKE_C_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/mingw9x/include") |
||||
list(PREPEND CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/mingw9x/include") |
||||
|
||||
# work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106103 |
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -fno-declone-ctor-dtor") |
||||
|
||||
SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") |
||||
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") |
||||
set(CMAKE_RC_COMPILER "i686-w64-mingw32-windres") |
||||
set(CMAKE_STRIP "${CROSS_PREFIX}/i686-w64-mingw32/bin/strip") |
||||
set(PKG_CONFIG_EXECUTABLE "${CROSS_PREFIX}/bin/i686-w64-mingw32-pkg-config" CACHE STRING "Path to pkg-config") |
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH "${CROSS_PREFIX}/i686-w64-mingw32" "${CROSS_PREFIX}/i686-w64-mingw32/i686-w64-mingw32") |
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
||||
|
||||
set(WIN32_INSTALL_DLLS "${CROSS_PREFIX}/i686-w64-mingw32/bin/SDL.dll") |
||||
@ -0,0 +1,22 @@
|
||||
#ifndef _WINDEF_OVERRIDE_ |
||||
#define _WINDEF_OVERRIDE_ |
||||
|
||||
#include_next <windef.h> |
||||
|
||||
// MinGW does not define these when _WIN32_WINNT < 0x0400
|
||||
// but it declares functions that use it unconditionally.
|
||||
typedef enum _FINDEX_INFO_LEVELS { |
||||
FindExInfoStandard, |
||||
FindExInfoBasic, |
||||
FindExInfoMaxInfoLevel |
||||
} FINDEX_INFO_LEVELS; |
||||
typedef enum _FINDEX_SEARCH_OPS { |
||||
FindExSearchNameMatch, |
||||
FindExSearchLimitToDirectories, |
||||
FindExSearchLimitToDevices, |
||||
FindExSearchMaxSearchOp |
||||
} FINDEX_SEARCH_OPS; |
||||
|
||||
typedef void* SOLE_AUTHENTICATION_SERVICE; |
||||
|
||||
#endif /* _WINDEF_ */ |
||||
@ -0,0 +1,38 @@
|
||||
set(ASAN OFF) |
||||
set(UBSAN OFF) |
||||
set(DIST ON) |
||||
|
||||
set(NONET ON) |
||||
set(DISABLE_ZERO_TIER ON) |
||||
set(USE_SDL1 ON) |
||||
set(DEVILUTIONX_SYSTEM_BZIP2 OFF) |
||||
set(DEVILUTIONX_SYSTEM_LIBFMT OFF) |
||||
set(DEVILUTIONX_STATIC_LIBSODIUM OFF) |
||||
|
||||
# Compatibility with Windows 9x 8-bit mode and improved performance |
||||
set(SDL1_VIDEO_MODE_BPP 8) |
||||
set(SDL1_FORCE_DIRECT_RENDER ON) |
||||
|
||||
set(DEVILUTIONX_WINDOWS_NO_WCHAR ON) |
||||
|
||||
# `WINVER=0x0500` without `_WIN32_WINNT` is Windows 98. |
||||
# MinGW force-defines `_WIN32_WINNT=0xa00` if it isn't defined, so define it as 0. |
||||
add_definitions(-DWINVER=0x0500 -D_WIN32_WINDOWS=0x0500 -D_WIN32_WINNT=0) |
||||
|
||||
list(APPEND DEVILUTIONX_PLATFORM_LINK_LIBRARIES |
||||
shlwapi |
||||
wsock32 |
||||
ws2_32 |
||||
wininet |
||||
) |
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") |
||||
list(APPEND DEVILUTIONX_PLATFORM_COMPILE_OPTIONS "/W3" "/Zc:__cplusplus" "/utf-8") |
||||
list(APPEND DEVILUTIONX_PLATFORM_COMPILE_DEFINITIONS _CRT_SECURE_NO_WARNINGS) |
||||
else() |
||||
list(APPEND DEVILUTIONX_PLATFORM_COMPILE_OPTIONS $<$<CONFIG:Debug>:-gstabs>) |
||||
endif() |
||||
|
||||
if(MINGW_CROSS) |
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/mingw") |
||||
endif() |
||||
@ -0,0 +1,28 @@
|
||||
#!/bin/sh |
||||
|
||||
# Unpacks the mounted OPK to disk before running it |
||||
# in order to avoid the memory overhead of squashfs. |
||||
|
||||
OPK_DIR="${PWD}" |
||||
STORAGE="$(grep mmcblk /proc/mounts | cut -d' ' -f2 || echo /media/data/local/home)" |
||||
UNPACK_DIR="${STORAGE}/devilutionx-opk-on-disk" |
||||
|
||||
set -e |
||||
set -x |
||||
|
||||
DO_COPY=1 |
||||
if [ -f "${UNPACK_DIR}/devilutionx" ]; then |
||||
INSTALLED_MD5="$(md5sum "${UNPACK_DIR}/devilutionx" | cut -d' ' -f1)" |
||||
OPK_MD5="$(md5sum "${PWD}/devilutionx" | cut -d' ' -f1)" |
||||
if [ "$INSTALLED_MD5" = "$OPK_MD5" ]; then |
||||
DO_COPY=0 |
||||
fi |
||||
fi |
||||
|
||||
if [ "$DO_COPY" = "1" ]; then |
||||
rm -rf "$UNPACK_DIR" |
||||
mkdir -p "$UNPACK_DIR" |
||||
cp -rf "$OPK_DIR"/* "$UNPACK_DIR" |
||||
fi |
||||
|
||||
exec "${UNPACK_DIR}/devilutionx-umount-opk-and-run.sh" "${UNPACK_DIR}/devilutionx" "$@" |
||||
@ -0,0 +1,5 @@
|
||||
#!/bin/sh |
||||
|
||||
set -x |
||||
echo | sudo -S umount -l "$PWD" |
||||
exec "$@" |
||||
@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash |
||||
|
||||
SDLDEV_VERS=1.2.15 |
||||
SODIUM_VERS=1.0.18 |
||||
|
||||
# exit when any command fails |
||||
set -euo pipefail |
||||
|
||||
MINGW_ARCH=i686-w64-mingw32 |
||||
SODIUM_ARCH=win32 |
||||
|
||||
# set MINGW_PREFIX |
||||
MINGW_PREFIX=/usr/${MINGW_ARCH} |
||||
if [ ! -d "${MINGW_PREFIX}" ]; then |
||||
echo "MinGW prefix not found (${MINGW_PREFIX})" |
||||
exit 1 |
||||
else |
||||
echo "Installing to ${MINGW_PREFIX}" |
||||
fi |
||||
|
||||
# only use sudo when necessary |
||||
if [ `id -u` -ne 0 ]; then |
||||
SUDO=sudo |
||||
else |
||||
SUDO="" |
||||
fi |
||||
|
||||
rm -rf tmp-mingw9x-prep |
||||
mkdir -p tmp-mingw9x-prep |
||||
cd tmp-mingw9x-prep |
||||
|
||||
curl --no-progress-meter -OL https://www.libsdl.org/release/SDL-devel-${SDLDEV_VERS}-mingw32.tar.gz |
||||
tar -xzf SDL-devel-${SDLDEV_VERS}-mingw32.tar.gz |
||||
$SUDO cp -r SDL-*/include/* ${MINGW_PREFIX}/include |
||||
$SUDO cp -r SDL-*/lib/* ${MINGW_PREFIX}/lib |
||||
$SUDO cp -r SDL-*/bin/* ${MINGW_PREFIX}/bin |
||||
|
||||
wget -q https://github.com/jedisct1/libsodium/releases/download/${SODIUM_VERS}-RELEASE/libsodium-${SODIUM_VERS}-mingw.tar.gz -Olibsodium-${SODIUM_VERS}-mingw.tar.gz |
||||
tar -xzf libsodium-${SODIUM_VERS}-mingw.tar.gz --no-same-owner |
||||
$SUDO cp -r libsodium-${SODIUM_ARCH}/* ${MINGW_PREFIX} |
||||
|
||||
# Fixup pkgconfig prefix: |
||||
find "${MINGW_PREFIX}/lib/pkgconfig/" -name '*.pc' -exec \ |
||||
$SUDO sed -i "s|^prefix=.*|prefix=${MINGW_PREFIX}|" '{}' \; |
||||
|
||||
# Fixup CMake prefix: |
||||
find "${MINGW_PREFIX}" -name '*.cmake' -exec \ |
||||
$SUDO sed -i "s|/opt/local/${MINGW_ARCH}|${MINGW_PREFIX}|" '{}' \; |
||||
@ -1,13 +1,13 @@
|
||||
#pragma once |
||||
|
||||
#include <cstddef> |
||||
#include <string_view> |
||||
|
||||
#include "DiabloUI/ui_item.h" |
||||
#include "utils/stdcompat/string_view.hpp" |
||||
|
||||
namespace devilution { |
||||
|
||||
void UiErrorOkDialog(string_view text, const std::vector<std::unique_ptr<UiItemBase>> &renderBehind); |
||||
void UiErrorOkDialog(string_view caption, string_view text, const std::vector<std::unique_ptr<UiItemBase>> &renderBehind); |
||||
void UiErrorOkDialog(std::string_view text, const std::vector<std::unique_ptr<UiItemBase>> &renderBehind); |
||||
void UiErrorOkDialog(std::string_view caption, std::string_view text, const std::vector<std::unique_ptr<UiItemBase>> &renderBehind); |
||||
|
||||
} // namespace devilution
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue