Add dist.sh script to automatically build and create project template, Update README

This commit is contained in:
ChaoticByte 2025-02-03 20:29:47 +01:00
parent 5a8a6e4c61
commit 6bb6b8b768
No known key found for this signature in database
7 changed files with 64 additions and 6 deletions

View file

@ -21,12 +21,16 @@ You can find the latest releases [here](https://github.com/ChaoticByte/Fragmente
## Usage
With Fragemented, you are editing images by writing GDShaders. This brings almost endless opportunities to create unique art.
With Fragemented, you are processing images with GDShaders. This brings almost endless opportunities to create unique art.
If you want to learn GDShader, take a look at the [Godot docs](https://docs.godotengine.org/en/stable/tutorials/shaders/).
The repo also includes examples. You can use them as a starting-point to write your own filters.
**The builtin editor got removed** from Fragmented with version **v9.0**. I advise you to write your shaders directly in the Godot Editor.
Besides the regular GDShader stuff, Fragmented also has so-called directives. Those allow to further control the behaviour of the application. The most important directive is `//!load` to load an image.
**To get started, use the project template (see the Releases section of this repo) and open it in Godot.**
The template includes many examples. You can use them as a starting-point to write your own stuff.
Besides the regular GDShader stuff, Fragmented has so-called directives. Those allow to further control the behaviour of the application. **The most important directive is `//!load` to load an image.**
### Load TEXTURE using the `//!load` directive
@ -129,7 +133,6 @@ Commands:
| Dumps the shaderlib into the current directory.
```
### Batch Mode

View file

@ -3,7 +3,7 @@
set -e
function log {
echo -e "\033[1;36m* $@\033[0m"
echo -e "\033[1;36m***** $@ *****\033[0m"
}
log

22
dist.sh Executable file
View file

@ -0,0 +1,22 @@
set -e
function log {
echo -e "\033[1;36m***** $@ *****\033[0m"
}
log Building application
VERSION="$(godot --headless --no-header -s tools/get_version.gd)"
godot --headless --export-release "Linux/X11" "dist/Fragmented-${VERSION}.x86_64"
log Packing project template
ZIP_PATH=$(realpath "dist/Fragmented-${VERSION}_project_template.zip")
rm -f "${ZIP_PATH}"
zip -r "${ZIP_PATH}" shaderlib/
(
cd examples/
zip -r "${ZIP_PATH}" *
)

16
examples/project.godot Normal file
View file

@ -0,0 +1,16 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="Fragmented Project"
config/features=PackedStringArray("4.3", "Forward Plus")
config/icon=""

View file

@ -8,7 +8,7 @@ dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="screenshot.png, examples/*"
exclude_filter="screenshot.png, examples/*, tools/*, build-template/*"
export_path="dist/Fragmented.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""

View file

@ -0,0 +1,10 @@
If you find this inside the project template, editing these gdshaderinc files
does nothing. They are already packed with the application and are only here
for you and the Godot Editor to read (auto complete and so on).
If you want to change one of the files, copy it to another location,
edit it and #include it in your shader file.
If you have questions, don't be shy, open a issue :)
Have fun experimenting!

7
tools/get_version.gd Normal file
View file

@ -0,0 +1,7 @@
extends SceneTree
# godot --headless --no-header -s tools/get_version.gd
func _init() -> void:
print(ProjectSettings.get_setting("application/config/version"))
quit(0)