Compare commits

...

6 commits

4 changed files with 36 additions and 32 deletions

5
.dir-locals.el Normal file
View file

@ -0,0 +1,5 @@
((c-mode . ((mode . c++)))
(c++-mode . ((mode . clang-format-on-save)))
(nil . ((projectile-project-compilation-cmd . "just build")
(projectile-project-run-cmd . "engine/bin/godot.linuxbsd.editor.dev.x86_64.llvm --path project")
(projectile-project-configure-cmd . "engine/bin/godot.linuxbsd.editor.dev.x86_64.llvm --path project -e"))))

18
.gitignore vendored
View file

@ -6,17 +6,13 @@
config.log
.sconf_temp
engine/.github
project/.godot
build/PROJECT.pck
build/PROJECT.x86_64
build/PROJECT.exe
build.zip
# build artifacts
*.o
compile_commands.json
.tree.hash
engine/.github
project/.godot
build/
__pycache__
# general-purpose cache folder (used by e.g clangd)
.cache
.kdev4
*.kdev4
*__pycache__

View file

View file

@ -12,36 +12,39 @@ run: build
# Running Editor
engine/bin/godot.linuxbsd.editor.dev.x86_64.llvm --editor --path project
release-linux: build
# Compiling Linux Release
cd engine/ && scons platform=linuxbsd target=template_release arch=x86_64 linker=mold use_llvm=yes custom_modules="../modules"
# Preparing Build Environment
sed -i "s!templatepath!{{`realpath engine/bin/godot.linuxbsd.template_release.x86_64.llvm`}}!" project/export_presets.cfg
rm -rf build && mkdir build
engine/bin/godot.*.editor.dev.*.llvm --headless --export-release "Linux" project/project.godot && zip build.zip build/*
# Resetting Build Environment
touch build/.gitkeep
sed -i "s!{{`realpath engine/bin/godot.linuxbsd.template_release.x86_64.llvm`}}!templatepath!" project/export_presets.cfg
package-project:
mkdir -p build/
engine/bin/godot.linuxbsd.editor.dev.x86_64.llvm --editor --path project --headless --export-pack "Linux" ../build/{{BUILD_NAME}}.pck
compile-release platform: build
# Compiling {{platform}} Release
cd engine/ && scons platform={{platform}} target=template_release arch=x86_64 linker=mold use_llvm=yes compiledb=yes custom_modules="../modules"
package-release-linuxbsd: (compile-release "linuxbsd") package-project
# Prepare build output
mkdir -p build/linuxbsd
# Copy required files
cp engine/bin/godot.linuxbsd.template_release.x86_64.llvm build/linuxbsd/{{BUILD_NAME}}.x86_64
cp build/{{BUILD_NAME}}.pck build/linuxbsd/
cd build/ && zip -r {{BUILD_NAME}}-linuxbsd-x86_64.zip linuxbsd
# Completed Linux Release Build
release-windows: build
# Compiling Windows Release
cd engine/ && scons platform=windows target=template_release arch=x86_64 linker=mold custom_modules="../modules"
# Preparing Build Environment
sed -i "s!templatepath!{{`realpath engine/bin/godot.windows.template_release.x86_64`}}!" project/export_presets.cfg
rm -rf build && mkdir build
engine/bin/godot.*.editor.dev.*.llvm --headless --export-release "Windows" project/project.godot && zip build.zip build/*
# Resetting Build Environment
touch build/.gitkeep
sed -i "s!{{`realpath engine/bin/godot.windows.template_release.x86_64`}}!templatepath!" project/export_presets.cfg
package-release-windows: (compile-release "windows") package-project
# Prepare build output
mkdir -p build/windows
# Copy required files
cp engine/bin/godot.windows.template_release.x86_64.exe build/windows/{{BUILD_NAME}}.exe
cp build/{{BUILD_NAME}}.pck build/windows/
cd build/ && zip -r {{BUILD_NAME}}-windows-x86_64.zip windows
# Completed Windows Release Build
package-release-all: package-release-windows package-release-linuxbsd
initialize-template projectname:
# Initializing Template {{projectname}}
sed -i -e "s/PROJECT/{{projectname}}/g" ./modules/PROJECT/register_types.h ./modules/PROJECT/register_types.cpp ./project/project.godot ./project/export_presets.cfg .gitignore
sed -i -e "s/change_me/{{projectname}}/" ./justfile
mv ./modules/PROJECT ./modules/{{projectname}}
# Done Initializing, you will still have to update BUILD_NAME in your justfile
format:
# Formatting Custom Modules