Skip to content

Commit be07090

Browse files
authored
Merge branch 'main' into advanced-settings
2 parents 3ca45a8 + 191a86e commit be07090

File tree

4 files changed

+22
-104
lines changed

4 files changed

+22
-104
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -6,119 +6,39 @@ on:
66
branches:
77
- '**'
88

9-
env:
10-
GEODE_SDK: ${{ github.workspace }}/sdk
11-
GEODE_VERSION: nightly
12-
CLI_VERSION: v2.2.2
13-
MOD_NAME: DevTools
14-
MOD_ID: geode.devtools
15-
169
jobs:
1710
build:
1811
strategy:
1912
fail-fast: false
2013
matrix:
2114
config:
22-
- name: "Windows"
23-
bin_folder: "windows"
24-
os: windows-2019
25-
extra_flags: '-T host=x64 -A win32'
26-
out_paths: './build/Release/*.dll'
27-
platform_suffix: 'win'
15+
- name: Windows
16+
os: windows-latest
2817

29-
- name: "macOS"
30-
bin_folder: "macos"
18+
- name: macOS
3119
os: macos-latest
32-
extra_flags: ""
33-
out_paths: './build/*.dylib'
34-
platform_suffix: 'mac'
35-
20+
3621
name: ${{ matrix.config.name }}
3722
runs-on: ${{ matrix.config.os }}
3823

3924
steps:
40-
- uses: actions/checkout@v3
41-
with:
42-
submodules: recursive
25+
- uses: actions/checkout@v3
4326

44-
- uses: actions/checkout@v3
45-
with:
46-
submodules: recursive
47-
repository: geode-sdk/geode
48-
# ref: v0.4.8
49-
path: ${{ env.GEODE_SDK }}
50-
51-
- uses: ilammy/msvc-dev-cmd@v1
52-
with:
53-
arch: x86
27+
- name: Build the mod
28+
uses: geode-sdk/build-geode-mod@main
29+
with:
30+
combine: true
5431

55-
- name: Download Geode SDK binaries
56-
run: |
57-
cd ${{ github.workspace }}/sdk
58-
mkdir bin
59-
mkdir bin/nightly
60-
cd bin/nightly
61-
curl -L https://github.com/geode-sdk/geode/releases/download/${{ env.GEODE_VERSION }}/geode-${{ env.GEODE_VERSION }}-${{ matrix.config.platform_suffix }}.zip -o geode-sdk.zip
62-
tar -xf geode-sdk.zip
63-
64-
- name: Configure CMake
65-
run: |
66-
cd ${{ github.workspace }}
67-
cmake -B build ${{ matrix.config.extra_flags }} -DGEODE_DISABLE_CLI_CALLS=1
68-
69-
- name: Build
70-
run: |
71-
cd ${{ github.workspace }}/build
72-
cmake --build . --config Release
73-
74-
- uses: actions/upload-artifact@v3
75-
with:
76-
name: "build-${{ matrix.config.bin_folder }}"
77-
path: "${{ matrix.config.out_paths }}"
78-
79-
8032
package:
81-
name: "Package both builds"
82-
# would use linux but theres no cli build for it
83-
runs-on: windows-2019
33+
name: Package builds
34+
runs-on: ubuntu-latest
8435
needs: ['build']
85-
86-
steps:
87-
- uses: actions/checkout@v3
88-
with:
89-
submodules: recursive
90-
91-
- name: Download and Unzip CLI
92-
run: |
93-
curl -L https://github.com/geode-sdk/cli/releases/download/${{ env.CLI_VERSION }}/geode-cli-${{ env.CLI_VERSION }}-win.zip -o geode-cli.zip
94-
tar -xf geode-cli.zip
9536

96-
- uses: actions/download-artifact@v3
97-
with:
98-
name: build-windows
99-
100-
- uses: actions/download-artifact@v3
101-
with:
102-
name: build-macos
103-
104-
- name: Merge
105-
shell: bash
106-
run: |
107-
mv $MOD_NAME.dll $MOD_ID.dll
108-
mv lib$MOD_NAME.dylib $MOD_ID.dylib
109-
./geode.exe package new . --binary $MOD_ID.dll --binary $MOD_ID.dylib --output $MOD_ID.geode
110-
37+
steps:
38+
- uses: geode-sdk/build-geode-mod@combine
39+
id: build
40+
11141
- uses: actions/upload-artifact@v3
11242
with:
11343
name: Build Output
114-
path: "${{ env.MOD_ID }}.geode"
115-
116-
- uses: geekyeggo/delete-artifact@v2
117-
with:
118-
name: build-windows
119-
failOnError: false
120-
121-
- uses: geekyeggo/delete-artifact@v2
122-
with:
123-
name: build-macos
124-
failOnError: false
44+
path: ${{ steps.build.outputs.build-output }}

CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ else()
1818
message(STATUS "Found Geode: $ENV{GEODE_SDK}")
1919
endif()
2020

21-
set(GEODE_LINK_NIGHTLY ON)
22-
add_subdirectory($ENV{GEODE_SDK} $ENV{GEODE_SDK}/build)
23-
24-
include(cmake/CPM.cmake)
21+
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)
2522

2623
CPMAddPackage("gh:ocornut/imgui#c191faf")
2724

@@ -44,7 +41,8 @@ elseif(ANDROID)
4441
target_link_libraries(${PROJECT_NAME} GLESv2)
4542
endif()
4643

44+
# i still dont like this (alk)
4745
target_compile_definitions(geode-sdk INTERFACE GEODE_EXPOSE_SECRET_INTERNALS_IN_HEADERS_DO_NOT_DEFINE_PLEASE)
4846

49-
target_link_libraries(${PROJECT_NAME} geode-sdk)
50-
create_geode_file(${PROJECT_NAME})
47+
# Set up dependencies, resources, link Geode
48+
setup_geode_mod(${PROJECT_NAME})

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"geode": "v1.0.0",
3-
"version": "v1.1.1",
3+
"version": "v1.2.0",
44
"id": "geode.devtools",
55
"name": "DevTools",
66
"developer": "Geode Team",

src/platform/platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ bool GLRenderCtx::begin() {
9090
);
9191
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_depth);
9292

93-
glFramebufferTextureEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, m_texture, 0);
93+
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_texture, 0);
9494
}
9595

9696
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {

0 commit comments

Comments
 (0)