Add more iced examples

This commit is contained in:
Jeremy Soller 2022-12-06 15:49:07 -07:00
parent 3a8bfb9735
commit 7aa519b04c
No known key found for this signature in database
GPG Key ID: 87F211AF2BE4C2FE

View File

@ -10,17 +10,23 @@ dependencies = [
"zlib"
]
script = """
set -x
for example in styling tour
do
${COOKBOOK_CARGO} rustc \
--release \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--package "${example}" \
-- \
-L "${COOKBOOK_SYSROOT}/lib" \
-C link-args="-Wl,-Bstatic $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v "target/${TARGET}/release/${example}" "${COOKBOOK_STAGE}/bin/iced-${example}"
done
EXAMPLES=(
game_of_life
solar_system
styling
tour
)
set -x
for example in "${EXAMPLES[@]}"
do
${COOKBOOK_CARGO} rustc \
--release \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
--package "${example}" \
-- \
-L "${COOKBOOK_SYSROOT}/lib" \
-C link-args="-Wl,-Bstatic $("${TARGET}-pkg-config" --libs osmesa) -lz -lstdc++ -lc -lgcc"
mkdir -pv "${COOKBOOK_STAGE}/bin"
cp -v "target/${TARGET}/release/${example}" "${COOKBOOK_STAGE}/bin/iced_${example}"
done
"""