Skip to content

Commit

Permalink
fix workflow builds
Browse files Browse the repository at this point in the history
  • Loading branch information
wootguy committed Apr 23, 2024
1 parent dad644c commit 78085c9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Download and install dependencies
run: |
Invoke-WebRequest https://github.com/ocornut/imgui/archive/refs/tags/v1.81.zip -outfile v1.81.zip
Invoke-WebRequest https://github.com/glfw/glfw/releases/download/3.3.3/glfw-3.3.3.zip -outfile glfw-3.3.3.zip
Invoke-WebRequest https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip -outfile glew-2.2.0-win32.zip
tar -xf v1.81.zip
tar -xf glfw-3.3.3.zip
tar -xf glew-2.2.0-win32.zip
ren imgui-1.81 imgui
ren glfw-3.3.3 glfw
ren glew-2.2.0 glew
- name: Build release
Expand All @@ -42,17 +38,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'true'

- name: Download and install dependencies
run: |
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libglfw3-dev libglew-dev libxxf86vm-dev
wget https://github.com/ocornut/imgui/archive/refs/tags/v1.81.zip
unzip -q v1.81.zip
mv imgui-1.81 imgui
- name: Build release
run: |
mkdir build; cd build
Expand Down
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ target_link_libraries(${PROJECT_NAME} glfw)
add_definitions(-DGLEW_STATIC)

if(MSVC)
# no warnings for release builds
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /W0")

# compile using the static runtime
set_property(TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

add_subdirectory(glfw)

# compile using the static runtime
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /W0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /wd4244 /wd4018")

# Disable C++ exceptions
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT bspguy)

target_link_libraries(${PROJECT_NAME} opengl32 ${CMAKE_CURRENT_SOURCE_DIR}/glew/lib/Release/x64/glew32s.lib)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Run 'bspguy <command> help' to read about a specific command.
* Visual Studio: Make sure to checkmark "Desktop development with C++" if you're installing for the first time.
1. Open a command prompt somewhere and run this command to download the source code (don't click the download zip button!):
```
git clone --recurse-submodules https://github.com/wootguy/bspguy
git clone --recurse-submodules --shallow-submodules https://github.com/wootguy/bspguy
```
1. Download [GLEW](http://glew.sourceforge.net/) (choose the `Binaries Windows 32-bit and 64-bit` link) and extract the `glew-x.y.z` folder into the `bspguy` folder that was created in the previous step. Rename the `glew-x.y.z` folder to `glew`.
1. Open a command prompt in the `bspguy` folder and run these commands:
Expand All @@ -73,7 +73,7 @@ Run 'bspguy <command> help' to read about a specific command.
* Debian: `sudo apt install build-essential git cmake libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev xorg-dev libglfw3-dev libglew-dev libxxf86vm-dev`
1. Open a terminal somewhere and run these commands:
```
git clone --recurse-submodules https://github.com/wootguy/bspguy
git clone --recurse-submodules --shallow-submodules https://github.com/wootguy/bspguy
cd bspguy
mkdir build; cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
Expand Down

0 comments on commit 78085c9

Please sign in to comment.