Skip to content

Commit 15a7d8c

Browse files
committed
Merge branch 'dev'
2 parents 7a0fda4 + 7f0c0db commit 15a7d8c

55 files changed

Lines changed: 2326 additions & 840 deletions

Some content is hidden

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

.github/workflows/MSVC-x86_64.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: MSVC-x86_64.yml
2+
on:
3+
push:
4+
branches: [ "*" ]
5+
pull_request:
6+
branches: [ "*" ]
7+
8+
env:
9+
SOLUTION_FILE_PATH: ./Deckadence.sln
10+
11+
BUILD_CONFIGURATION: Release
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
runs-on: windows-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Add MSBuild to PATH
24+
uses: microsoft/setup-msbuild@v1.0.2
25+
26+
- uses: abel0b/setup-premake@v2.4
27+
with:
28+
version: "5.0.0-beta7"
29+
30+
- name: Set up project
31+
run: premake5 vs2022
32+
33+
- name: Build
34+
working-directory: ${{env.GITHUB_WORKSPACE}}
35+
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
36+
37+
- name: Upload a Build Artifact
38+
uses: actions/upload-artifact@v4.6.2
39+
with:
40+
name: Deckadence.exe
41+
path: ./bin/Win64/Release/Deckadence.exe
42+
if-no-files-found: error

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Server/.vs/
2121
.vscode/
2222
*.user
2323
*.aps
24+
*.vcxproj
25+
*.vcxproj.filters
26+
*.sln
27+
obj/
2428

2529
# Misc.
2630
.idea/
@@ -31,4 +35,4 @@ Server/.vs/
3135
**/build/
3236
**/.cache/
3337
**/CMake/
34-
**/bin/
38+
**/bin/

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ file(GLOB_RECURSE NoWarnCpp ${CMAKE_CURRENT_LIST_DIR}/external/*.cpp)
2929

3030
set_source_files_properties(${NoWarnCpp} PROPERTIES COMPILE_FLAGS "-w")
3131

32-
add_executable(Deckadence ${DxSrc} ${ImSrc} ${NFDExSrc})
32+
add_executable(Deckadence ${DxSrc} ${ImSrc} ${NFDExSrc} ${CMAKE_CURRENT_LIST_DIR}/external/stb/stbi.c)
3333
set_property(TARGET Deckadence PROPERTY CXX_STANDARD 17)
3434

3535
# must be ran with -DCMAKE_BUILD_TYPE=Debug
@@ -38,6 +38,8 @@ if (${CMAKE_BUILD_TYPE} MATCHES Debug)
3838
endif()
3939

4040
if (WIN32)
41+
# target_compile_options(Deckadence PRIVATE -Wl,--subsystem,windows)
42+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--subsystem,windows")
4143
target_link_libraries(Deckadence glfw3 opengl32 freetype dwmapi ws2_32 iphlpapi)
4244
elseif (UNIX AND NOT APPLE)
4345
find_package(PkgConfig REQUIRED)

Deckadence.rc

3.19 KB
Binary file not shown.

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@
3131
- Debian-based: `sudo apt update && sudo apt install libfreetype-dev cmake build-essential clang libglfw3-dev libdbus-1-dev libgl1-dev libglu1-dev libx11-dev libxrandr-dev libwayland-dev`
3232
- Fedora-based: `sudo dnf upgrade --refresh && sudo dnf install freetype-dev cmake clang glfw-devel dbus dbus-devel mesa-libGL-devel mesa-libGLU-devel libx11-devel libxrandr-devel wayland-devel && sudo dnf groupinstall "Development Tools" "Development Libraries"`
3333
#### 2.2 Windows
34-
> ⚠ MSVC is not supported because Microsoft C++ is completely and utterly repugnant and should be EOL'd. Even their devs hate using it. It's true. ⚠
35-
>
36-
> During development for Windows, Deckadence is only built using clang++ via MSYS for the aforementioned reasons.
34+
##### MSVC / Visual Studio
35+
1. Download [Premake](https://premake.github.io/)
36+
2. Install [Git](https://git-scm.com/downloads)
37+
3. Run `git clone https://github.com/Tetrapak0/Deckadence`
38+
4. Open the cloned repository and run `premake5 vs2022` (make sure premake is in your PATH)
39+
5. Open `Deckadence.sln` and build
40+
##### MSYS / clang
3741
1. Install MSYS2 from https://www.msys2.org/
3842
2. Open the Clang64 environment and run the following commands to install dependencies:
3943
> Note that you may be asked to quit the session to update packages. In that case, please re-run the last command.

external/GLFW/lib/glfw3.dll

-227 KB
Binary file not shown.

external/GLFW/lib/glfw3dll.lib

-30.6 KB
Binary file not shown.

external/Tetrapak0/NexusSockets.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <poll.h>
2222
#include <fcntl.h>
2323
#include <ifaddrs.h>
24+
#include <net/if.h>
2425

2526
#include <errno.h>
2627
#endif

external/imgui/imgui_impl_glfw.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,9 @@ static void ImGui_ImplGlfw_UpdateMouseCursor()
836836
{
837837
// Show OS mouse cursor
838838
// FIXME-PLATFORM: Unfocused windows seems to fail changing the mouse cursor with GLFW 3.2, but 3.3 works here.
839-
glfwSetCursor(window, bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow]);
840-
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
839+
// commented out by Tetrapak0. Just let me hide my cursor man
840+
// glfwSetCursor(window, bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow]);
841+
// glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
841842
}
842843
}
843844
}

external/stb/stbi.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#define STB_IMAGE_IMPLEMENTATION
2+
#define STB_IMAGE_RESIZE_IMPLEMENTATION
3+
#define STB_IMAGE_RESIZE2_IMPLEMENTATION
4+
#define STB_IMAGE_WRITE_IMPLEMENTATION
5+
#include "stb_image.h"
6+
#include "stb_image_resize2.h"
7+
#include "stb_image_write.h"

0 commit comments

Comments
 (0)