diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 9bd548be6..71eca72e0 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -70,6 +70,7 @@ jobs: path: dist/*.tar.gz upload_pypi: + name: Upload to PyPI needs: [build_wheels, build_sdist] runs-on: ubuntu-latest environment: pypi diff --git a/src/lib/ViZDoomController.cpp b/src/lib/ViZDoomController.cpp index bb2a09bff..e5f2f0238 100644 --- a/src/lib/ViZDoomController.cpp +++ b/src/lib/ViZDoomController.cpp @@ -212,7 +212,7 @@ namespace vizdoom { this->MQDoom->send(MSG_CODE_CLOSE); - #ifdef OS_LINUX + #ifdef OS_POSIX if(0 == kill(this->doomProcessPid, 0)){ bpr::child doomProcess(this->doomProcessPid); bpr::terminate(doomProcess); @@ -1415,7 +1415,7 @@ namespace vizdoom { this->doomArgs.push_back("+viz_window_hidden"); this->doomArgs.push_back("1"); - #ifdef OS_LINUX + #ifdef OS_POSIX if (this->noXServer){ this->doomArgs.push_back("+viz_noxserver"); this->doomArgs.push_back("1"); @@ -1464,7 +1464,7 @@ namespace vizdoom { void DoomController::launchDoom() { try { bpr::child doomProcess = bpr::execute(bpri::set_args(this->doomArgs), bpri::inherit_env()); - #ifdef OS_LINUX + #ifdef OS_POSIX this->doomProcessPid = doomProcess.pid; #endif bpr::wait_for_exit(doomProcess); diff --git a/src/lib/ViZDoomController.h b/src/lib/ViZDoomController.h index 367dd9ae0..070e8912e 100644 --- a/src/lib/ViZDoomController.h +++ b/src/lib/ViZDoomController.h @@ -83,12 +83,16 @@ namespace vizdoom { /* OSes */ #ifdef __linux__ #define OS_LINUX + #define OS_POSIX #include #include #elif _WIN32 #define OS_WIN #elif __APPLE__ #define OS_OSX + #define OS_POSIX + #include + #include #endif class DoomController { @@ -329,7 +333,7 @@ namespace vizdoom { b::thread *doomThread; - #ifdef OS_LINUX + #ifdef OS_POSIX pid_t doomProcessPid; #endif