Skip to content

Commit 6ca8797

Browse files
committed
Added windows build support.
1 parent 2841ab0 commit 6ca8797

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

GodotPlugin/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
help:
2+
@fgrep -h "##" $(MAKEFILE_LIST) | sed -e 's/##//' | tail -n +2
3+
4+
build-debug: ## Build debug Godot plugin
5+
scons platform=macos arch=universal target=template_debug
6+
scons platform=windows arch=x86_32 target=template_debug
7+
scons platform=windows arch=x86_64 target=template_debug
8+
9+
build-release: ## Build release Godot plugin
10+
scons platform=macos arch=universal target=template_release
11+
scons platform=windows arch=x86_32 target=template_release
12+
scons platform=windows arch=x86_64 target=template_release
13+
14+
install-dependencies: ## Install Dependencies
15+
brew install scons
16+
brew install mingw-w64

GodotPlugin/RhythmGameUtilities.gdextension

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
entry_symbol = "rhythm_game_utilities_plugin"
44
compatibility_minimum = 4.3
5+
reloadable = true
56

67
[libraries]
78

8-
macos.debug = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.macos.template_debug"
9-
macos.release = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.macos.template_release"
9+
macos.debug = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.macos.template_debug.framework/libRhythmGameUtilities.macos.template_debug"
10+
macos.release = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.macos.template_release.framework/libRhythmGameUtilities.macos.template_release"
11+
windows.debug.x86_32 = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.windows.template_debug.x86_32.dll"
12+
windows.release.x86_32 = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.windows.template_release.x86_32.dll"
13+
windows.debug.x86_64 = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.windows.template_debug.x86_64.dll"
14+
windows.release.x86_64 = "res://addons/RhythmGameUtilities/libRhythmGameUtilities.windows.template_release.x86_64.dll"

GodotPlugin/SConstruct.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@
88
env.Append(CPPPATH=["include/", "../include"])
99
sources = Glob("include/*.cpp")
1010

11-
library = env.SharedLibrary(
12-
"build/addons/RhythmGameUtilities/libRhythmGameUtilities.{}.{}"
13-
.format(env["platform"], env["target"]),
14-
source=sources
15-
)
11+
if env["platform"] == "macos":
12+
file_name = "libRhythmGameUtilities.{}.{}".format(env["platform"], env["target"])
13+
14+
library = env.SharedLibrary(
15+
"build/addons/RhythmGameUtilities/{}.framework/{}".format(file_name, file_name),
16+
source=sources
17+
)
18+
else:
19+
library = env.SharedLibrary(
20+
"build/addons/RhythmGameUtilities/libRhythmGameUtilities{}{}"
21+
.format(env["suffix"], env["SHLIBSUFFIX"]),
22+
source=sources,
23+
)
1624

1725
gdextension_copy = env.Command(
1826
target="build/addons/RhythmGameUtilities/RhythmGameUtilities.gdextension",

0 commit comments

Comments
 (0)