feat: added comments to justfile for clarity and debugging ease
This commit is contained in:
		
							parent
							
								
									684fcbf3c9
								
							
						
					
					
						commit
						79048bc28e
					
				
							
								
								
									
										14
									
								
								justfile
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								justfile
									
									
									
									
									
								
							| 
						 | 
					@ -3,31 +3,43 @@ set export
 | 
				
			||||||
BUILD_NAME := "change_me"
 | 
					BUILD_NAME := "change_me"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
build: format
 | 
					build: format
 | 
				
			||||||
 | 
					    # Compiling Editor
 | 
				
			||||||
    cd engine/ && scons target=editor symbols=yes optimization=debug dev_build=yes linker=mold use_llvm=yes compiledb=yes custom_modules="../modules"
 | 
					    cd engine/ && scons target=editor symbols=yes optimization=debug dev_build=yes linker=mold use_llvm=yes compiledb=yes custom_modules="../modules"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
run: build
 | 
					run: build
 | 
				
			||||||
 | 
					    # Running Editor
 | 
				
			||||||
    engine/bin/godot.linuxbsd.editor.dev.x86_64.llvm --editor --path project
 | 
					    engine/bin/godot.linuxbsd.editor.dev.x86_64.llvm --editor --path project
 | 
				
			||||||
 | 
					
 | 
				
			||||||
release-linux: build
 | 
					release-linux: build
 | 
				
			||||||
 | 
					    # Compiling Linux Release
 | 
				
			||||||
    cd engine/ && scons platform=linuxbsd target=template_release arch=x86_64 linker=mold use_llvm=yes compiledb=yes custom_modules="../modules"
 | 
					    cd engine/ && scons platform=linuxbsd target=template_release arch=x86_64 linker=mold use_llvm=yes compiledb=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
 | 
					    sed -i "s!templatepath!{{`realpath engine/bin/godot.linuxbsd.template_release.x86_64.llvm`}}!" project/export_presets.cfg
 | 
				
			||||||
    rm -rf build && mkdir build
 | 
					    rm -rf build && mkdir build
 | 
				
			||||||
    engine/bin/godot.*.editor.dev.*.llvm --headless --export-release "Linux" project/project.godot && zip build.zip build/*
 | 
					    engine/bin/godot.*.editor.dev.*.llvm --headless --export-release "Linux" project/project.godot && zip build.zip build/*
 | 
				
			||||||
 | 
					    # Resetting Build Environment
 | 
				
			||||||
    touch build/.gitkeep    
 | 
					    touch build/.gitkeep    
 | 
				
			||||||
    sed -i "s!{{`realpath engine/bin/godot.linuxbsd.template_release.x86_64.llvm`}}!templatepath!" project/export_presets.cfg
 | 
					    sed -i "s!{{`realpath engine/bin/godot.linuxbsd.template_release.x86_64.llvm`}}!templatepath!" project/export_presets.cfg
 | 
				
			||||||
 | 
					    # Completed Linux Release Build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
release-windows: build
 | 
					release-windows: build
 | 
				
			||||||
 | 
					    # Compiling Windows Release
 | 
				
			||||||
    cd engine/ && scons platform=windows target=template_release arch=x86_64 linker=mold use_llvm=yes compiledb=yes custom_modules="../modules"
 | 
					    cd engine/ && scons platform=windows target=template_release arch=x86_64 linker=mold use_llvm=yes compiledb=yes custom_modules="../modules"
 | 
				
			||||||
 | 
					    # Preparing Build Environment
 | 
				
			||||||
    sed -i "s!templatepath!{{`realpath engine/bin/godot.windows.template_release.x86_64.llvm`}}!" project/export_presets.cfg
 | 
					    sed -i "s!templatepath!{{`realpath engine/bin/godot.windows.template_release.x86_64.llvm`}}!" project/export_presets.cfg
 | 
				
			||||||
    rm -rf build && mkdir build
 | 
					    rm -rf build && mkdir build
 | 
				
			||||||
    engine/bin/godot.*.editor.dev.*.llvm --headless --export-release "Windows" project/project.godot && zip build.zip build/*
 | 
					    engine/bin/godot.*.editor.dev.*.llvm --headless --export-release "Windows" project/project.godot && zip build.zip build/*
 | 
				
			||||||
    touch build/.gitkeep    
 | 
					    # Resetting Build Environment
 | 
				
			||||||
 | 
					    touch build/.gitkeep
 | 
				
			||||||
    sed -i "s!{{`realpath engine/bin/godot.windows.template_release.x86_64.llvm`}}!templatepath!" project/export_presets.cfg
 | 
					    sed -i "s!{{`realpath engine/bin/godot.windows.template_release.x86_64.llvm`}}!templatepath!" project/export_presets.cfg
 | 
				
			||||||
 | 
					    # Completed Windows Release Build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
initialize-template projectname:
 | 
					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/PROJECT/{{projectname}}/g" ./modules/PROJECT/register_types.h ./modules/PROJECT/register_types.cpp ./project/project.godot ./project/export_presets.cfg .gitignore
 | 
				
			||||||
    sed "s/change_me/{{projectname}}/" ./justfile
 | 
					    sed "s/change_me/{{projectname}}/" ./justfile
 | 
				
			||||||
    mv ./modules/PROJECT ./modules/{{projectname}}
 | 
					    mv ./modules/PROJECT ./modules/{{projectname}}
 | 
				
			||||||
 | 
					    # Done Initializing, you will still have to update BUILD_NAME in your justfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
format:
 | 
					format:
 | 
				
			||||||
    # Formatting Custom Modules
 | 
					    # Formatting Custom Modules
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue