Skip to content

Commit a61d38c

Browse files
authored
Merge pull request #34 from OpenDriver2/develop-SoapyMan
Refactor MOTION_C, fix bugs, add linux Appveyor build by Rosalie
2 parents 3a93704 + d0d21ee commit a61d38c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1319
-1307
lines changed

.appveyor/AfterBuild.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@echo off
2+
3+
set config=Debug:Release:Release_dev
4+
for %%c in (%config::= %) do (
5+
cd %project_folder%\bin\%%c
6+
7+
copy %windows_sdl2_dir%\lib\x86\SDL2.dll SDL2.dll /Y
8+
copy %windows_openal_dir%\bin\Win32\soft_oal.dll OpenAL32.dll /Y
9+
10+
xcopy /e /v %data_folder% .\ /Y
11+
7z a "REDRIVER2_%%c.zip" ".\*"
12+
)

.appveyor/AfterBuild.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
for config in debug release release_dev
5+
do
6+
cd "${APPVEYOR_BUILD_FOLDER}/src_rebuild/bin/${config^}"
7+
tar -czf "REDRIVER2_${config^}.tar.gz" *
8+
done

.appveyor/Build.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@echo off
2+
3+
cd %project_folder%
4+
5+
ren "%windows_jpeg_dir%\jconfig.vc" "jconfig.h"
6+
7+
set JPEG_DIR=%windows_jpeg_dir%
8+
set OPENAL_DIR=%windows_openal_dir%
9+
set SDL2_DIR=%windows_sdl2_dir%
10+
11+
premake5 vs2019
12+
13+
set config=Debug:Release:Release_dev
14+
for %%c in (%config::= %) do (
15+
msbuild .\REDRIVER2.sln /p:Configuration="%%c" /p:Platform=Win32 /m ^
16+
/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ^
17+
/nologo /ConsoleLoggerParameters:NoSummary;Verbosity=quiet
18+
)

.appveyor/Build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
cd "$APPVEYOR_BUILD_FOLDER/src_rebuild"
5+
6+
./premake5 gmake2
7+
8+
for config in debug release release_dev
9+
do
10+
make config=$config -j$(nproc)
11+
done

.appveyor/Install.bat

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@echo off
2+
3+
appveyor DownloadFile %windows_premake_url% -FileName premake5.zip
4+
7z x premake5.zip -o%project_folder%
5+
6+
appveyor DownloadFile %windows_jpeg_url% -FileName JPEG.zip
7+
7z x JPEG.zip -o%dependency_folder%
8+
9+
appveyor DownloadFile %windows_openal_url% -FileName OPENAL.zip
10+
7z x OPENAL.zip -o%dependency_folder%
11+
12+
appveyor DownloadFile %windows_sdl2_url% -FileName SDL2.zip
13+
7z x SDL2.zip -o%dependency_folder%

.appveyor/Install.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
cd "$APPVEYOR_BUILD_FOLDER/src_rebuild"
5+
6+
# Download premake5
7+
# because it isn't in the repos (yet?)
8+
curl "$linux_premake_url" -Lo premake5.tar.gz
9+
tar xvf premake5.tar.gz
10+
11+
sudo apt-get update -qq -y
12+
sudo apt-get install -qq aptitude -y
13+
14+
# fix Ubuntu's broken mess of packages using aptitude
15+
sudo aptitude install --quiet=2 \
16+
g++-multilib libsdl2-2.0-0:i386 libsdl2-dev:i386 \
17+
libopenal1:i386 libopenal-dev:i386 libjpeg-turbo8:i386 \
18+
libjpeg-turbo8-dev:i386 -y
19+

appveyor.yml

Lines changed: 33 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 5.0.{build}
1+
version: 5.3.{build}
22

33
branches:
44
only:
@@ -7,64 +7,44 @@ branches:
77

88
skip_tags: true
99

10-
image: Visual Studio 2019
10+
image:
11+
- Visual Studio 2019
12+
- Ubuntu
1113

12-
configuration:
13-
- Debug
14-
- Release
15-
- 'Release Dev'
14+
environment:
15+
data_folder: '%APPVEYOR_BUILD_FOLDER%\data'
16+
project_folder: '%APPVEYOR_BUILD_FOLDER%\\src_rebuild'
17+
dependency_folder: '%APPVEYOR_BUILD_FOLDER%\dependencies'
18+
# Dependency URLs
19+
windows_premake_url: 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-windows.zip'
20+
windows_jpeg_url: 'http://www.ijg.org/files/jpegsr9d.zip'
21+
windows_openal_url: 'https://openal-soft.org/openal-binaries/openal-soft-1.20.1-bin.zip'
22+
windows_sdl2_url: 'https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip'
23+
linux_premake_url: 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz'
24+
# Dependency Directories
25+
windows_jpeg_dir: '%dependency_folder%\jpeg-9d'
26+
windows_openal_dir: '%dependency_folder%\openal-soft-1.20.1-bin'
27+
windows_sdl2_dir: '%dependency_folder%\SDL2-2.0.12'
1628

17-
clone_folder: 'c:\projects\REDRIVER2'
18-
#lib_folder: %clone_folder%\EXTERNAL
1929

20-
environment:
21-
data_folder: 'c:\projects\REDRIVER2\data'
22-
project_folder: 'c:\projects\REDRIVER2\src_rebuild'
23-
dependency_folder: '%project_folder%\dependencies'
30+
install:
31+
- cmd: '%APPVEYOR_BUILD_FOLDER%\.appveyor\Install.bat'
32+
- sh: '${APPVEYOR_BUILD_FOLDER}/.appveyor/Install.sh'
2433

34+
build_script:
35+
- cmd: '%APPVEYOR_BUILD_FOLDER%\.appveyor\Build.bat'
36+
- sh: '${APPVEYOR_BUILD_FOLDER}/.appveyor/Build.sh'
2537

26-
build:
27-
project: c:\projects\REDRIVER2\src_rebuild\REDRIVER2.sln
28-
verbosity: minimal
38+
after_build:
39+
- cmd: '%APPVEYOR_BUILD_FOLDER%\.appveyor\AfterBuild.bat'
40+
- sh: '${APPVEYOR_BUILD_FOLDER}/.appveyor/AfterBuild.sh'
2941

3042
cache:
31-
- '%project_folder%\obj\%configuration%\'
32-
33-
platform:
34-
- Win32
35-
#- x64
36-
37-
install:
38-
- set SDL2_URL="https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip"
39-
- appveyor DownloadFile %SDL2_URL% -FileName SDL2.zip
40-
- 7z x SDL2.zip -o%dependency_folder%
41-
- set OPENAL_URL="https://openal-soft.org/openal-binaries/openal-soft-1.20.1-bin.zip"
42-
- appveyor DownloadFile %OPENAL_URL% -FileName OPENAL.zip
43-
- 7z x OPENAL.zip -o%dependency_folder%
44-
- set JPEG_URL="http://www.ijg.org/files/jpegsr9d.zip"
45-
- appveyor DownloadFile %JPEG_URL% -FileName JPEG.zip
46-
- 7z x JPEG.zip -o%dependency_folder%
47-
- set PREMAKE_URL="https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-windows.zip"
48-
- appveyor DownloadFile %PREMAKE_URL% -FileName premake5.zip
49-
- 7z x premake5.zip -o%project_folder%
50-
- set SDL2_DIR=%dependency_folder%\SDL2-2.0.12
51-
- set OPENAL_DIR=%dependency_folder%\openal-soft-1.20.1-bin
52-
- set JPEG_DIR=%dependency_folder%\jpeg-9d
53-
54-
before_build:
55-
- cmd: cd %project_folder%
56-
- cmd: premake5 vs2019
57-
- cmd: ren "%JPEG_DIR%\jconfig.vc" "jconfig.h"
43+
- 'src_rebuild\obj\'
5844

5945
artifacts:
60-
- path: src_rebuild\bin\%configuration%\*.zip
61-
name: Binaries
62-
63-
after_build:
64-
- cmd: cd %project_folder%\bin\%configuration%
65-
- cmd: copy %SDL2_DIR%\lib\x86\SDL2.dll SDL2.dll /Y
66-
- cmd: copy %OPENAL_DIR%\bin\Win32\soft_oal.dll OpenAL32.dll /Y
67-
- cmd: xcopy /e /v %data_folder% .\ /Y
68-
- 7z a "REDRIVER2_%configuration%.zip" ".\*"
69-
70-
#build: off
46+
- path: src_rebuild\bin\*\*.zip
47+
name: Windows Binaries
48+
49+
- path: src_rebuild\bin\*\*.tar.gz
50+
name: Linux Binaries

src_rebuild/GAME/C/CAMERA.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void ModifyCamera(void)
309309

310310
int i;
311311

312-
if (NoPlayerControl == 0 && cameraview != 6 && events.cameraEvent == NULL);// && NumPlayers == 1) // [A] allow switching cameras in multiplayer
312+
if (NoPlayerControl == 0 && cameraview != 6 && events.cameraEvent == NULL) // && NumPlayers == 1) // [A] allow switching cameras in multiplayer
313313
{
314314
for(i = 0; i < NumPlayers; i++)
315315
{

0 commit comments

Comments
 (0)