Skip to content

Commit

Permalink
add command to switch gdnlib entry between msvc and gnu
Browse files Browse the repository at this point in the history
  • Loading branch information
macalimlim committed Nov 5, 2023
1 parent b52c2da commit 1e9f8ce
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,24 @@ mv -b *.keystore ..
sed -i "s|keystore/release_password=\".*\"|keystore/release_password=\"${@}\"|g" ../godot/export_presets.cfg
'''

[tasks.switch-gdnlib-msvc-to-gnu-entry]
script_runner = "@shell"
script = '''
sed -i "s|Windows.64=\"res://../lib/x86_64-pc-windows-msvc/{{project-name}}.dll\"|# Windows.64=\"res://../lib/x86_64-pc-windows-msvc/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
sed -i "s|# Windows.64=\"res://../lib/x86_64-pc-windows-gnu/{{project-name}}.dll\"|Windows.64=\"res://../lib/x86_64-pc-windows-gnu/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
sed -i "s|Windows.32=\"res://../lib/i686-pc-windows-msvc/{{project-name}}.dll\"|# Windows.32=\"res://../lib/i686-pc-windows-msvc/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
sed -i "s|# Windows.32=\"res://../lib/i686-pc-windows-gnu/{{project-name}}.dll\"|Windows.32=\"res://../lib/i686-pc-windows-gnu/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
'''

[tasks.switch-gdnlib-gnu-to-msvc-entry]
script_runner = "@shell"
script = '''
sed -i "s|Windows.64=\"res://../lib/x86_64-pc-windows-gnu/{{project-name}}.dll\"|# Windows.64=\"res://../lib/x86_64-pc-windows-gnu/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
sed -i "s|# Windows.64=\"res://../lib/x86_64-pc-windows-msvc/{{project-name}}.dll\"|Windows.64=\"res://../lib/x86_64-pc-windows-msvc/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
sed -i "s|Windows.32=\"res://../lib/i686-pc-windows-gnu/{{project-name}}.dll\"|# Windows.32=\"res://../lib/i686-pc-windows-gnu/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
sed -i "s|# Windows.32=\"res://../lib/i686-pc-windows-msvc/{{project-name}}.dll\"|Windows.32=\"res://../lib/i686-pc-windows-msvc/{{project-name}}.dll\"|g" ../godot/native/game.gdnlib
'''

[tasks.doc]
command = "cargo"
args = ["doc", "--no-deps", "--open", "-v"]
Expand Down

0 comments on commit 1e9f8ce

Please sign in to comment.