Skip to content

Commit

Permalink
Fix build issues and set 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Apr 24, 2024
1 parent b2ad06f commit 22395fb
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 33 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/macos_build.yml
Expand Up @@ -13,7 +13,7 @@ env:
VULKAN_SDK_VERSION: '1.3.250.1'
VULKAN_LIB_VERSION: '1.3.250'
MACOSX_DEPLOYMENT_TARGET: '10.15'
GH_CACHE_KEY: 9
GH_CACHE_KEY: 10

jobs:
build:
Expand All @@ -32,7 +32,7 @@ jobs:
- name: install libs
run: |
brew install ninja yasm dylibbundler \
libogg libvorbis libvpx boost meson cmake zlib \
libvpx boost meson cmake zlib \
sdl2 sdl2_image sdl2_mixer sdl2_net
- uses: actions/cache@v4
id: cache
Expand All @@ -56,26 +56,24 @@ jobs:
hdiutil detach /Volumes/VulkanSDK
- name: ffmpeg -- download
if: steps.cache.outputs.cache-hit != 'true'
run: git clone --depth 1 --branch n5.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg
run: git clone --depth 1 --branch n6.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg
- name: ffmpeg -- configure
if: steps.cache.outputs.cache-hit != 'true'
run: ./configure
--prefix=/usr/local
--enable-shared --disable-static
--cc="clang"
--arch=${{matrix.env.arch}}
--extra-cflags="-arch x86_64"
--extra-ldflags="-arch x86_64"
--extra-cflags="-arch arm64"
--extra-ldflags="-arch arm64"
--target-os=darwin
--sysroot=$(xcrun --sdk macosx --show-sdk-path)
--disable-everything
--enable-swscale
--enable-swresample
--enable-zlib
--enable-libvpx
--enable-libvorbis
--enable-demuxer=rawvideo,bink,matroska
--enable-decoder=rawvideo,bink,binkaudio_dct,vorbis,opus,vp8,vp9
--enable-decoder=rawvideo,bink,binkaudio_dct,opus,vp8,vp9
--enable-parser=vp9
--enable-filter=aresample,aformat
--enable-protocol=file
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/windows_msys_build.yml
Expand Up @@ -86,9 +86,8 @@ jobs:
--enable-swresample \
--enable-zlib \
--enable-libvpx \
--enable-libvorbis \
--enable-demuxer=rawvideo,bink,matroska \
--enable-decoder=rawvideo,bink,binkaudio_dct,vorbis,opus,vp8,vp9 \
--enable-decoder=rawvideo,bink,binkaudio_dct,opus,vp8,vp9 \
--enable-parser=vp9 \
--enable-filter=aresample,aformat \
--enable-protocol=file \
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
@@ -1,7 +1,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.16.0)

# root
PROJECT(perimeter VERSION 3.1.0)
PROJECT(perimeter VERSION 3.1.1)
message("Version ${PROJECT_VERSION}")

SET(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo")
Expand Down
1 change: 1 addition & 0 deletions Source/Game/CMakeLists.txt
Expand Up @@ -2,6 +2,7 @@
OPTION(OPTION_PROCESS_SCRIPTS "Re-Process game scripts with XPrm" OFF)

target_sources(perimeter PRIVATE
"${PROJECT_SOURCE_DIR}/Source/version.cpp"
CameraManager.cpp
MonkManager.cpp
MusicManager.cpp
Expand Down
2 changes: 1 addition & 1 deletion Source/Network/P2P_interface.h
Expand Up @@ -525,7 +525,7 @@ class PNetCenter {

NETID m_hostNETID;
NETID m_localNETID;
bool flag_connected;
bool flag_connected = false;

void Reset();

Expand Down
3 changes: 1 addition & 2 deletions Source/Network/P2P_interface1Th.cpp
Expand Up @@ -78,8 +78,7 @@ const char* PNetCenter::getStrState() const
PNetCenter::PNetCenter() :
in_ClientBuf(PNETCENTER_BUFFER_SIZE, true), out_ClientBuf(PNETCENTER_BUFFER_SIZE, true),
in_HostBuf(PNETCENTER_BUFFER_SIZE, true), out_HostBuf(PNETCENTER_BUFFER_SIZE, true),
connectionHandler(this),
flag_connected(false)
connectionHandler(this)
{
hostConnection=NetAddress();

Expand Down
4 changes: 2 additions & 2 deletions Source/perimeter.rc
Expand Up @@ -119,11 +119,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "K-D LAB"
VALUE "FileDescription", "Perimeter"
VALUE "FileVersion", "3.1.0"
VALUE "FileVersion", "3.1.1"
VALUE "InternalName", "Perimeter"
VALUE "LegalCopyright", "Copyright (C) K-D LAB"
VALUE "ProductName", "Perimeter"
VALUE "ProductVersion", "3.1.0"
VALUE "ProductVersion", "3.1.1"
END
END
BLOCK "VarFileInfo"
Expand Down
8 changes: 8 additions & 0 deletions Source/version.cpp
@@ -0,0 +1,8 @@
#define VERSION "3.1.1"

//Sanity check to make sure the cmake version matches the code version
#include <string_view>
static_assert(
std::string_view(PERIMETER_VERSION) == VERSION,
"'" PERIMETER_VERSION "' mismatches the expected version '" VERSION "'"
);
3 changes: 0 additions & 3 deletions docker/dockcross/dockcross-cmake.sh
Expand Up @@ -67,9 +67,6 @@ cp ${SDL_DIR}/bin/SDL2.dll output
cp ${SDL_DIR}/bin/SDL2_image.dll output
cp ${SDL_DIR}/bin/SDL2_mixer.dll output
cp ${SDL_DIR}/bin/SDL2_net.dll output
#cp -fv /usr/lib/mxe/usr/${CROSS_TRIPLE}/bin/libogg*.dll output
#cp -fv /usr/lib/mxe/usr/${CROSS_TRIPLE}/bin/libvorbis*.dll output
#cp -fv /usr/lib/mxe/usr/${CROSS_TRIPLE}/bin/libvorbisfile*.dll output
#cp -fv /usr/lib/mxe/usr/${CROSS_TRIPLE}/bin/zlib*.dll output
#cp -fv /usr/lib/mxe/usr/${CROSS_TRIPLE}/bin/libstdc*.dll output
#cp -fv /usr/lib/mxe/usr/${CROSS_TRIPLE}/bin/libgcc*.dll output
Expand Down
4 changes: 1 addition & 3 deletions docker/dockcross/dockcross-x64.Dockerfile
@@ -1,6 +1,4 @@
FROM dockcross/windows-shared-x64:latest

RUN echo "v2"
FROM dockcross/windows-shared-x64:20231208-4e4d3ad

ENV DEFAULT_DOCKCROSS_IMAGE dockcross-x64-perimeter

Expand Down
5 changes: 2 additions & 3 deletions docker/linux/prepare_ffmpeg
Expand Up @@ -2,7 +2,7 @@
set -e

# Compile smaller version of FFMPEG with only what project needs
git clone --depth 1 --branch n5.1 https://git.ffmpeg.org/ffmpeg.git /opt/src/ffmpeg
git clone --depth 1 --branch n6.1 https://git.ffmpeg.org/ffmpeg.git /opt/src/ffmpeg

cd /opt/src/ffmpeg

Expand All @@ -14,9 +14,8 @@ cd /opt/src/ffmpeg
--enable-swresample \
--enable-zlib \
--enable-libvpx \
--enable-libvorbis \
--enable-demuxer=rawvideo,bink,matroska \
--enable-decoder=rawvideo,bink,binkaudio_dct,vorbis,opus,vp8,vp9 \
--enable-decoder=rawvideo,bink,binkaudio_dct,opus,vp8,vp9 \
--enable-parser=vp9 \
--enable-filter=aresample,aformat \
--enable-protocol=file \
Expand Down
1 change: 0 additions & 1 deletion docker/linux/prepare_pkgs
Expand Up @@ -19,7 +19,6 @@ apt-get install -t buster-backports -y \
libsdl2-net-dev \
libsdl2-mixer-dev \
zlib1g-dev \
libvorbis-dev \
libvulkan-dev glslang-tools \
build-essential \
cmake meson ninja-build
5 changes: 2 additions & 3 deletions flake.nix
Expand Up @@ -154,8 +154,7 @@
ffmpegVariant = "headless";

withHeadlessDeps = false;
withOgg = true;
withVorbis = true;
withOpus = true;
withZlib = true;
withVpx = !super.stdenv.hostPlatform.isMinGW
&& !super.stdenv.hostPlatform.isDarwin;
Expand All @@ -176,7 +175,7 @@
configureFlags = attrs.configureFlags ++ [
"--disable-everything"
"--enable-demuxer=rawvideo,bink,matroska"
"--enable-decoder=rawvideo,bink,binkaudio_dct,vorbis,opus,vp9"
"--enable-decoder=rawvideo,bink,binkaudio_dct,opus,vp9"
"--enable-parser=vp9"
"--enable-filter=aresample,aformat"
"--enable-protocol=file"
Expand Down
2 changes: 1 addition & 1 deletion macos/Perimeter.app.template/Contents/Info.plist
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleIconFile</key>
<string>iconfile</string>
<key>CFBundleShortVersionString</key>
<string>3.1.0</string>
<string>3.1.1</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
2 changes: 1 addition & 1 deletion perimeter.nix
Expand Up @@ -51,7 +51,7 @@
};
in pkgs.stdenv.mkDerivation {
pname = "perimeter";
version = "3.1.0";
version = "3.1.1";
meta = with lib; {
homepage = "https://github.com/KD-lab-Open-Source/Perimeter/";
description = "Perimeter - A open-source RTS game from 2004 by K-D LAB";
Expand Down
3 changes: 1 addition & 2 deletions vcpkg.json
@@ -1,10 +1,9 @@
{
"name": "perimeter",
"version": "3.1.0",
"version": "3.1.1",
"dependencies": [
"zlib",
"boost-stacktrace",
"libvorbis",
"libvpx",
"sdl2",
"sdl2-image",
Expand Down

0 comments on commit 22395fb

Please sign in to comment.