Skip to content

Commit

Permalink
Add Windows build to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Dec 7, 2023
1 parent 94db35f commit bf734d2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,20 @@ jobs:
with:
name: "MacOS (X86)"
path: suncli

windows-latest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Build Soup
run: php Sun/vendor/Soup/build_lib.php

- name: Build Sun
run: clang -o Sun.exe Sun/sun.cpp -ISun/vendor/Soup libsoup.a -std=c++17

- name: Upload Sun
uses: actions/upload-artifact@v3
with:
name: Windows
path: Sun.exe
1 change: 1 addition & 0 deletions Sun/vendor/Soup/soup/RenderTargetWindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#if SOUP_WINDOWS
#include <Windows.h>
#pragma comment(lib, "Gdi32.lib")
#else
#include "X11Api.hpp"
#endif
Expand Down
1 change: 1 addition & 0 deletions Sun/vendor/Soup/soup/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <ShlObj.h> // CSIDL_COMMON_APPDATA

#pragma comment(lib, "Shell32.lib") // SHGetFolderPathW
#pragma comment(lib, "User32.lib") // SendInput

#include "Exception.hpp"
#include "Key.hpp"
Expand Down

0 comments on commit bf734d2

Please sign in to comment.