diff --git a/recipes/wip/demos/firework-rs/recipe.toml b/recipes/wip/demos/firework-rs/recipe.toml index 605134a92..b329e6a3f 100644 --- a/recipes/wip/demos/firework-rs/recipe.toml +++ b/recipes/wip/demos/firework-rs/recipe.toml @@ -3,9 +3,10 @@ git = "https://github.com/Wayoung7/firework-rs" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages firework-rs -cookbook_cargo_examples fountain heart vortex -""" +template = "cargo" +cargopackages = ["firework-rs"] +cargoexamples = [ + "fountain", + "heart", + "vortex", +] diff --git a/recipes/wip/demos/fonterator/recipe.toml b/recipes/wip/demos/fonterator/recipe.toml index f9b931a13..d9de36d5f 100644 --- a/recipes/wip/demos/fonterator/recipe.toml +++ b/recipes/wip/demos/fonterator/recipe.toml @@ -3,21 +3,11 @@ git = "https://github.com/ardaku/fonterator" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -recipe="$(basename "${COOKBOOK_RECIPE}")" -examples="main directions image raster" -for example in "${examples}" - do - "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \ - --example "${example}" \ - --release \ - --features "monospace-font" - mkdir -pv "${COOKBOOK_STAGE}/usr/bin" - cp -v \ - "target/${TARGET}/${build_type}/examples/${example}" \ - "${COOKBOOK_STAGE}/usr/bin/${recipe}_${example}" - done -""" +template = "cargo" +cargoflags = ["--features monospace-font"] +cargoexamples = [ + "main", + "directions", + "image", + "raster", +] diff --git a/recipes/wip/demos/fractal-rs/recipe.toml b/recipes/wip/demos/fractal-rs/recipe.toml index 8d829247f..8599ab3c4 100644 --- a/recipes/wip/demos/fractal-rs/recipe.toml +++ b/recipes/wip/demos/fractal-rs/recipe.toml @@ -3,8 +3,7 @@ git = "https://github.com/aetherknight/fractal-rs" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages fractal-piston -""" +template = "cargo" +cargopackages = [ + "fractal-piston", +] diff --git a/recipes/wip/demos/freya/recipe.toml b/recipes/wip/demos/freya/recipe.toml index 43bc47694..3e90bf436 100644 --- a/recipes/wip/demos/freya/recipe.toml +++ b/recipes/wip/demos/freya/recipe.toml @@ -3,18 +3,64 @@ git = "https://github.com/marc2332/freya" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargoexamples = [ + "animated_position", + "animated_tabs", + "animation", + "button", + "camera", + "checkbox", + "clock", + "counter", + "drag", + "drag_drop", + "dynamic_theme", + "file_explorer", + "frameless_window", + "gradient", + "graph", + "highlight", + "image", + "image_viewer", + "images_slideshow", + "infinite_list", + "input", + "keyboard_navigation", + "menu", + "mouse_trace", + "opacity", + "pointer", + "popup", + "position", + "progress_bar", + "radio", + "render_canvas", + "rotate", + "scroll", + "selectable_text", + "sequential_animation", + "shader", + "shader_editor", + "shadow", + "simple_editor", + "speedometer", + "svg", + "tab", + "table", + "text", + "text_editors", + "tic_tac_toe", + "touch", + "ui", + "website", + "window_size", +] dependencies = [ "openssl3", "gtk3", ] script = """ DYNAMIC_INIT -cookbook_cargo_examples animated_position animated_tabs animation \ -button camera checkbox clock counter drag drag_drop dynamic_theme \ -file_explorer frameless_window gradient graph highlight image image_viewer \ -images_slideshow infinite_list input keyboard_navigation menu mouse_trace \ -opacity pointer popup position progress_bar radio render_canvas rotate scroll \ -selectable_text sequential_animation shader shader_editor shadow simple_editor \ -speedometer svg tab table text text_editors tic_tac_toe touch ui website window_size +cookbook_cargo_examples """ diff --git a/recipes/wip/demos/fundsp/recipe.toml b/recipes/wip/demos/fundsp/recipe.toml index d6deeecb0..204306b89 100644 --- a/recipes/wip/demos/fundsp/recipe.toml +++ b/recipes/wip/demos/fundsp/recipe.toml @@ -3,12 +3,20 @@ git = "https://github.com/SamiPerttu/fundsp" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargoexamples = [ + "beep", + "file", + "grain", + "grain2", + "keys", + "network", + "optimize", + "peek", + "plot", + "sequence", + "type", +] dependencies = [ "fontconfig", ] -script = """ -DYNAMIC_INIT -cookbook_cargo_examples beep file grain grain2 keys network \ -optimize peek plot sequence type -""" diff --git a/recipes/wip/demos/funutd/recipe.toml b/recipes/wip/demos/funutd/recipe.toml index af17040ba..e548f27a3 100644 --- a/recipes/wip/demos/funutd/recipe.toml +++ b/recipes/wip/demos/funutd/recipe.toml @@ -3,8 +3,7 @@ git = "https://github.com/SamiPerttu/funutd" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples editor -""" +template = "cargo" +cargoexamples = [ + "editor", +] diff --git a/recipes/wip/demos/fyrox/recipe.toml b/recipes/wip/demos/fyrox/recipe.toml index 11c643f4c..229249a46 100644 --- a/recipes/wip/demos/fyrox/recipe.toml +++ b/recipes/wip/demos/fyrox/recipe.toml @@ -3,9 +3,6 @@ git = "https://github.com/FyroxEngine/Fyrox-demo-projects" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -COOKBOOK_SOURCE="${COOKBOOK_SOURCE}/ui" -cookbook_cargo_packages executor -""" +template = "cargo" +cargopath = "ui" +cargopackages = ["executor"] diff --git a/recipes/wip/demos/genpdf-rs/recipe.toml b/recipes/wip/demos/genpdf-rs/recipe.toml index 4032da865..aef0c3094 100644 --- a/recipes/wip/demos/genpdf-rs/recipe.toml +++ b/recipes/wip/demos/genpdf-rs/recipe.toml @@ -3,8 +3,5 @@ git = "https://git.sr.ht/~ireas/genpdf-rs" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples demo -""" +template = "cargo" +cargoexamples = ["demo"] diff --git a/recipes/wip/demos/gfx-shader-watch/recipe.toml b/recipes/wip/demos/gfx-shader-watch/recipe.toml index f6bb1f474..84c352366 100644 --- a/recipes/wip/demos/gfx-shader-watch/recipe.toml +++ b/recipes/wip/demos/gfx-shader-watch/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/alexheretic/gfx-shader-watch" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples watch-shaders -""" +template = "cargo" +cargoexamples = ["watch-shaders"] diff --git a/recipes/wip/demos/ggez/recipe.toml b/recipes/wip/demos/ggez/recipe.toml index 546e1b329..ca19390bc 100644 --- a/recipes/wip/demos/ggez/recipe.toml +++ b/recipes/wip/demos/ggez/recipe.toml @@ -3,9 +3,16 @@ git = "https://github.com/ggez/ggez" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples 02_hello_world 04_snake cube \ -hello_canvas input_test shader shadows sounds text vertex_shader -""" +template = "cargo" +cargoexamples = [ + "02_hello_world", + "04_snake", + "cube", + "hello_canvas", + "input_test", + "shader", + "shadows", + "sounds", + "text", + "vertex_shader", +] diff --git a/recipes/wip/demos/hotline/recipe.toml b/recipes/wip/demos/hotline/recipe.toml index 6b2ca40e4..a6cfa0291 100644 --- a/recipes/wip/demos/hotline/recipe.toml +++ b/recipes/wip/demos/hotline/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/polymonster/hotline" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples triangle -""" +template = "cargo" +cargoexamples = ["triangle"] diff --git a/recipes/wip/demos/if-watch/recipe.toml b/recipes/wip/demos/if-watch/recipe.toml index 3e507a6a6..cd29208d3 100644 --- a/recipes/wip/demos/if-watch/recipe.toml +++ b/recipes/wip/demos/if-watch/recipe.toml @@ -1,10 +1,8 @@ -#TODO require the "smol" feature flag +#TODO not compiled or tested [source] git = "https://github.com/mxinden/if-watch" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo --example if_watch -F smol -""" +template = "cargo" +cargoflags = ["--features smol"] +cargoexamples = ["if_watch"] diff --git a/recipes/wip/demos/iocraft/recipe.toml b/recipes/wip/demos/iocraft/recipe.toml index e60170b92..4b5f25665 100644 --- a/recipes/wip/demos/iocraft/recipe.toml +++ b/recipes/wip/demos/iocraft/recipe.toml @@ -3,10 +3,18 @@ git = "https://github.com/ccbrown/iocraft" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples borders calculator counter \ -fullscreen hello_world overlap progress_bar scrolling \ -table use_input use_output weather -""" +template = "cargo" +cargoexamples = [ + "borders", + "calculator", + "counter", + "fullscreen", + "hello_world", + "overlap", + "progress_bar", + "scrolling", + "table", + "use_input", + "use_output", + "weather", +] diff --git a/recipes/wip/demos/kira/recipe.toml b/recipes/wip/demos/kira/recipe.toml index cf0c4f756..0f65eb468 100644 --- a/recipes/wip/demos/kira/recipe.toml +++ b/recipes/wip/demos/kira/recipe.toml @@ -3,9 +3,12 @@ git = "https://github.com/tesselode/kira-examples" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages dynamic-music ghost-noise metronome \ -score-counter spatial-audio simple-sound-playback -""" +template = "cargo" +cargopackages = [ + "dynamic-music", + "ghost-noise", + "metronome", + "score-counter", + "spatial-audio", + "simple-sound-playback", +] diff --git a/recipes/wip/demos/kiss3d/recipe.toml b/recipes/wip/demos/kiss3d/recipe.toml index f38e21921..8f71bb99b 100644 --- a/recipes/wip/demos/kiss3d/recipe.toml +++ b/recipes/wip/demos/kiss3d/recipe.toml @@ -3,10 +3,23 @@ git = "https://github.com/sebcrozet/kiss3d" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples camera cube lines multi_windows planar_lines \ -points post_processing primitives primitives2d procedural rectangle \ -screenshot stereo text texturing ui window -""" +template = "cargo" +cargoexamples = [ + "camera", + "cube", + "lines", + "multi_windows", + "planar_lines", + "points", + "post_processing", + "primitives", + "primitives2d", + "procedural", + "rectangle", + "screenshot", + "stereo", + "text", + "texturing", + "ui", + "window", +] diff --git a/recipes/wip/demos/macroquad/recipe.toml b/recipes/wip/demos/macroquad/recipe.toml index 1459f6c2b..982756348 100644 --- a/recipes/wip/demos/macroquad/recipe.toml +++ b/recipes/wip/demos/macroquad/recipe.toml @@ -3,9 +3,16 @@ git = "https://github.com/not-fl3/macroquad" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples 3d basic_shapes camera first_person \ -particles_example platformer shadertoy snake text ui -""" +template = "cargo" +cargoexamples = [ + "3d", + "basic_shapes", + "camera", + "first_person", + "particles_example", + "platformer", + "shadertoy", + "snake", + "text", + "ui", +] diff --git a/recipes/wip/demos/mage/recipe.toml b/recipes/wip/demos/mage/recipe.toml index 412bbc6a1..abe4cbbfb 100644 --- a/recipes/wip/demos/mage/recipe.toml +++ b/recipes/wip/demos/mage/recipe.toml @@ -3,8 +3,8 @@ git = "https://github.com/baad-c0de/mage-core" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples basic hello -""" +template = "cargo" +cargoexamples = [ + "basic", + "hello", +] diff --git a/recipes/wip/demos/mousefood/recipe.toml b/recipes/wip/demos/mousefood/recipe.toml index 761707ad5..b132a298c 100644 --- a/recipes/wip/demos/mousefood/recipe.toml +++ b/recipes/wip/demos/mousefood/recipe.toml @@ -1,26 +1,10 @@ #TODO not compiled or tested -#TODO maybe need a patch to use the sdl2 dependency from redox [source] git = "https://github.com/j-g00da/mousefood" shallow_clone = true [build] -template = "custom" +template = "cargo" +cargopackages = ["simulator"] dependencies = [ "sdl2", ] -script = """ -DYNAMIC_INIT -recipe="$(basename "${COOKBOOK_RECIPE}")" - for example in simulator - do - "${COOKBOOK_CARGO}" build \ - --manifest-path "${COOKBOOK_SOURCE}/${COOKBOOK_CARGO_PATH}/Cargo.toml" \ - --example "${example}" \ - --release \ - --features=simulator - mkdir -pv "${COOKBOOK_STAGE}/usr/bin" - cp -v \ - "target/${TARGET}/${build_type}/examples/${example}" \ - "${COOKBOOK_STAGE}/usr/bin/${recipe}_${example}" - done -""" diff --git a/recipes/wip/demos/notan/recipe.toml b/recipes/wip/demos/notan/recipe.toml index 9c0fbeaa8..88e4e00a7 100644 --- a/recipes/wip/demos/notan/recipe.toml +++ b/recipes/wip/demos/notan/recipe.toml @@ -3,9 +3,10 @@ git = "https://github.com/Nazariglez/notan" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples renderer_cube draw_path_flower \ -game_pong game_of_life -""" +template = "cargo" +cargoexamples = [ + "renderer_cube", + "draw_path_flower", + "game_pong", + "game_of_life", +] diff --git a/recipes/wip/demos/pingora/recipe.toml b/recipes/wip/demos/pingora/recipe.toml index 11672a217..fcbf59b09 100644 --- a/recipes/wip/demos/pingora/recipe.toml +++ b/recipes/wip/demos/pingora/recipe.toml @@ -3,8 +3,8 @@ git = "https://github.com/cloudflare/pingora" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples server client -""" +template = "cargo" +cargoexamples = [ + "server", + "client", +] diff --git a/recipes/wip/demos/pipes-rs/recipe.toml b/recipes/wip/demos/pipes-rs/recipe.toml index 8611a49cc..7e11f62ed 100644 --- a/recipes/wip/demos/pipes-rs/recipe.toml +++ b/recipes/wip/demos/pipes-rs/recipe.toml @@ -3,8 +3,5 @@ git = "https://github.com/lhvy/pipes-rs" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_packages pipes-rs -""" +template = "cargo" +cargopackages = ["pipes-rs"] diff --git a/recipes/wip/demos/piston/recipe.toml b/recipes/wip/demos/piston/recipe.toml index d17e3c807..b54087195 100644 --- a/recipes/wip/demos/piston/recipe.toml +++ b/recipes/wip/demos/piston/recipe.toml @@ -3,9 +3,13 @@ git = "https://github.com/pistondevelopers/piston-examples" shallow_clone = true [build] -template = "custom" -script = """ -DYNAMIC_INIT -cookbook_cargo_examples cube hello_world image multi_window \ -shapes snake sprite -""" +template = "cargo" +cargoexamples = [ + "cube", + "hello_world", + "image", + "multi_window", + "shapes", + "snake", + "sprite", +]