Skip to content

Commit

Permalink
Fixed building on Windows and CMD scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mwydmuch committed Dec 29, 2018
1 parent 72b18b5 commit cc79517
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions scripts/assemble_pip_package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set PACAKGE_INIT_FILE_SRC=.\src\lib_python\__init__.py

set VIZDOOM_EXEC_PATH=%BIN_PATH%\vizdoom.exe
set VIZDOOM_PK3_PATH=%BIN_PATH%\vizdoom.pk3
dir dir .\bin\python3.6\vizdoom*.pyd /b /s > %PACKAGE_DEST_DIRECTORY%\tmp.txt
dir dir .\bin\python%PYTHON_VERSION%\vizdoom*.pyd /b /s > %PACKAGE_DEST_DIRECTORY%\tmp.txt
set /p PYTHON_BIN_PATH=<%PACKAGE_DEST_DIRECTORY%\tmp.txt
del %PACKAGE_DEST_DIRECTORY%\tmp.txt
set PYTHON_BIN_DEST_PATH=%PACKAGE_DEST_PATH%\vizdoom.pyd
Expand Down Expand Up @@ -43,7 +43,7 @@ copy "%PACAKGE_INIT_FILE_SRC%" "%PACKAGE_DEST_PATH%"
copy "%PYTHON_BIN_PATH%" "%PYTHON_BIN_DEST_PATH%"
copy "%VIZDOOM_EXEC_PATH%" "%PACKAGE_DEST_PATH%"
copy "%VIZDOOM_PK3_PATH%" "%PACKAGE_DEST_PATH%"
copy "%BIN_PATH%\*.dll" "%PACKAGE_DEST_PATH%"
copy "%BIN_PATH%\*.pyd" "%PACKAGE_DEST_PATH%"
copy "%FREEDOOM_PATH%" "%PACKAGE_DEST_PATH%"
copy "%FREEDOOM_PATH%" "%PACKAGE_DEST_PATH%"
md "%SCENARIOS_DEST_DIR%
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_freedoom.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set FREEDOOM_DESTINATION_FILE="%FREEDOOM_DESTINATION_PATH%\freedoom2.wad"
if not exist "%FREEDOOM_DESTINATION_FILE%" (
if not exist "%FREEDOOM_DESTINATION_PATH%" md "%FREEDOOM_DESTINATION_PATH%"
if not exist "%FREEDOOM_OUTFILE%" (
powershell -command "Invoke-WebRequest '%FREEDOOM_LINK%' -OutFile '%FREEDOOM_OUTFILE%'"
powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest '%FREEDOOM_LINK%' -OutFile '%FREEDOOM_OUTFILE%'"
)
powershell -command "Expand-Archive '%FREEDOOM_OUTFILE%' -DestinationPath '%FREEDOOM_DESTINATION_PATH%'"
copy "%FREEDOOM_DESTINATION_PATH%\%FREEDOOM_ARCHIVE:~0,-4%\freedoom2.wad" "%FREEDOOM_DESTINATION_FILE%"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ViZDoomController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ namespace vizdoom {

int ticsMade = 0;

for (int i = 0; i < tics; ++i) {
for (unsigned int i = 0; i < tics; ++i) {
if (i == tics - 1) this->tic(update);
else this->tic(false);

Expand Down
4 changes: 4 additions & 0 deletions src/lib/ViZDoomController.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#ifndef __VIZDOOM_CONTROLLER_H__
#define __VIZDOOM_CONTROLLER_H__

#if _WIN32
#include <winsock2.h>
#endif

#include "ViZDoomTypes.h"
#include "ViZDoomMessageQueue.h"
#include "ViZDoomSharedMemory.h"
Expand Down
4 changes: 2 additions & 2 deletions src/vizdoom/src/viz_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ EXTERN_CVAR(Int, am_cheat)
EXTERN_CVAR(Int, am_rotate)
EXTERN_CVAR(Bool, am_textured)
EXTERN_CVAR(Bool, am_followplayer)
EXTERN_CVAR(Bool, am_drawmapback)
EXTERN_CVAR(Int, am_showtriggerlines)
EXTERN_CVAR(Int, am_drawmapback)
EXTERN_CVAR(Bool, am_showtriggerlines)

EXTERN_CVAR(Bool, am_showitems)
EXTERN_CVAR(Bool, am_showmonsters)
Expand Down

0 comments on commit cc79517

Please sign in to comment.