mirror of
https://github.com/cxong/cdogs-sdl.git
synced 2025-07-23 07:23:01 +02:00
5
.github/workflows/cmake.yml
vendored
5
.github/workflows/cmake.yml
vendored
@@ -119,6 +119,11 @@ jobs:
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C ${{env.BUILD_TYPE}} -VV -S
|
||||
|
||||
- name: Download DLLs on tags (Windows)
|
||||
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest'
|
||||
run: |
|
||||
build/windows/get-sdl2-dlls.bat dll
|
||||
|
||||
- name: Make package on tags
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
|
5
.github/workflows/cmake.yml.cmake
vendored
5
.github/workflows/cmake.yml.cmake
vendored
@@ -119,6 +119,11 @@ jobs:
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest -C ${{env.BUILD_TYPE}} -VV -S
|
||||
|
||||
- name: Download DLLs on tags (Windows)
|
||||
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'windows-latest'
|
||||
run: |
|
||||
build/windows/get-sdl2-dlls.bat dll 64
|
||||
|
||||
- name: Make package on tags
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
|
@@ -16,7 +16,7 @@ environment:
|
||||
# https://www.appveyor.com/docs/windows-images-software/#python
|
||||
PYTHON: "C:\\Python37"
|
||||
SDL2_VERSION: 2.26.4
|
||||
SDL2_IMAGE_VERSION: 2.6.3
|
||||
SDL2_IMAGE_VERSION: 2.8.1
|
||||
SDL2_MIXER_VERSION: 2.6.3
|
||||
SDLDIR: C:\projects\cdogs-sdl
|
||||
VERSION: 2.0.0
|
||||
|
@@ -16,7 +16,7 @@ environment:
|
||||
# https://www.appveyor.com/docs/windows-images-software/#python
|
||||
PYTHON: "C:\\Python37"
|
||||
SDL2_VERSION: 2.26.4
|
||||
SDL2_IMAGE_VERSION: 2.6.3
|
||||
SDL2_IMAGE_VERSION: 2.8.1
|
||||
SDL2_MIXER_VERSION: 2.6.3
|
||||
SDLDIR: C:\projects\cdogs-sdl
|
||||
VERSION: @VERSION@
|
||||
|
@@ -6,24 +6,26 @@ set SDL2_VERSION=2.26.4
|
||||
set SDL2_IMAGE_VERSION=2.8.1
|
||||
set SDL2_MIXER_VERSION=2.6.3
|
||||
|
||||
|
||||
set DESTDIR=%1
|
||||
set BITS=%2
|
||||
set DOWNLOAD_COMMAND=%~3
|
||||
|
||||
rem PLEASE NO SPACES IN SDL2_* VARIABLES
|
||||
|
||||
set SDL2_URL=http://www.libsdl.org/release/SDL2-%SDL2_VERSION%-win32-x86.zip
|
||||
set SDL2_ARCHIVE=SDL2-%SDL2_VERSION%-win32-x86.zip
|
||||
set SDL2_ARCHIVE=SDL2-%SDL2_VERSION%-win32-x%BITS%.zip
|
||||
set SDL2_URL=https://www.libsdl.org/release/%SDL2_ARCHIVE%
|
||||
|
||||
set SDL2_IMAGE_URL=http://www.libsdl.org/projects/SDL_image/release/SDL2_image-%SDL2_IMAGE_VERSION%-win32-x86.zip
|
||||
set SDL2_IMAGE_ARCHIVE=SDL2_image-%SDL2_IMAGE_VERSION%-win32-x86.zip
|
||||
set SDL2_IMAGE_ARCHIVE=SDL2_image-%SDL2_IMAGE_VERSION%-win32-x%BITS%.zip
|
||||
set SDL2_IMAGE_URL=https://www.libsdl.org/projects/SDL_image/release/%SDL2_IMAGE_ARCHIVE%
|
||||
|
||||
set SDL2_MIXER_URL=https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-%SDL2_MIXER_VERSION%-win32-x86.zip
|
||||
set SDL2_MIXER_ARCHIVE=SDL2_mixer-%SDL2_MIXER_VERSION%-win32-x86.zip
|
||||
set SDL2_MIXER_ARCHIVE=SDL2_mixer-%SDL2_MIXER_VERSION%-win32-x%BITS%.zip
|
||||
set SDL2_MIXER_URL=https://www.libsdl.org/projects/SDL_mixer/release/%SDL2_MIXER_ARCHIVE%
|
||||
|
||||
rem ========================================================
|
||||
|
||||
|
||||
set DESTDIR=%1
|
||||
set DOWNLOAD_COMMAND=%~2
|
||||
if "!DESTDIR!" == "" (
|
||||
echo Usage %0 destination_dir [download_command]
|
||||
echo "Usage %0 destination_dir (32|64) [download_command]"
|
||||
echo Assume you have 7z in your PATH
|
||||
exit /b 1
|
||||
)
|
||||
@@ -46,6 +48,9 @@ call :downloadIfNeeded !SDL2_MIXER_URL!
|
||||
%EXTRACT_COMMAND% !SDL2_IMAGE_ARCHIVE!
|
||||
%EXTRACT_COMMAND% !SDL2_MIXER_ARCHIVE!
|
||||
|
||||
rem Copy optional DLLs within the optional folders
|
||||
copy .\optional\*.dll .
|
||||
|
||||
exit /b
|
||||
rem ========================================================
|
||||
|
||||
|
@@ -206,7 +206,7 @@ int main(int argc, char *argv[])
|
||||
err = EXIT_FAILURE;
|
||||
goto bail;
|
||||
}
|
||||
NetClientInit(&gNetClient, ConfigGetInt(&gConfig, "ListenPort"));
|
||||
NetClientInit(&gNetClient, (uint16_t)ConfigGetInt(&gConfig, "ListenPort"));
|
||||
#endif
|
||||
|
||||
LoadingScreenDraw(&gLoadingScreen, "Initializing sound device...", 0.25f);
|
||||
|
@@ -22,7 +22,7 @@
|
||||
This file incorporates work covered by the following copyright and
|
||||
permission notice:
|
||||
|
||||
Copyright (c) 2013-2018, 2020-2023 Cong Xu
|
||||
Copyright (c) 2013-2018, 2020-2024 Cong Xu
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -729,7 +729,8 @@ static GameLoopResult GameOptionsUpdate(GameLoopData *data, LoopRunner *l)
|
||||
// If enabled, start net server
|
||||
if (!gCampaign.IsClient && ConfigGetBool(&gConfig, "StartServer"))
|
||||
{
|
||||
NetServerOpen(&gNetServer, ConfigGetInt(&gConfig, "ListenPort"));
|
||||
NetServerOpen(
|
||||
&gNetServer, (uint16_t)ConfigGetInt(&gConfig, "ListenPort"));
|
||||
}
|
||||
LoopRunnerPush(
|
||||
l, ScreenMissionBriefing(&gCampaign.Setting, &gMission));
|
||||
@@ -797,7 +798,7 @@ bail:
|
||||
}
|
||||
LoopRunnerPush(
|
||||
l, ScreenLoading(
|
||||
"Starting game...", true,
|
||||
RunGame(&gCampaign, &gMission, &gMap), true));
|
||||
"Starting game...", true, RunGame(&gCampaign, &gMission, &gMap),
|
||||
true));
|
||||
return UPDATE_RESULT_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user