This commit is contained in:
parent
a8bc400371
commit
ed61fb5ca5
12 changed files with 254 additions and 38 deletions
17
project.cpp
17
project.cpp
|
|
@ -162,7 +162,7 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
std::vector<std::string> netArgs(args.begin(), args.end());
|
||||
bool useLocalNet = false;
|
||||
for (std::string_view a : args) {
|
||||
if (a == "--local") { useLocalNet = true; break; }
|
||||
if (a == "") { useLocalNet = true; break; }
|
||||
}
|
||||
Configuration* network = useLocalNet
|
||||
? LocalProject({
|
||||
|
|
@ -275,16 +275,16 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
std::vector<std::string> depArgs(args.begin(), args.end());
|
||||
depArgs.push_back("--target=wasm32-wasip1");
|
||||
|
||||
// --local resolves the Crafter.Graphics dep from a sibling working tree
|
||||
// resolves the Crafter.Graphics dep from a sibling working tree
|
||||
// instead of fetching it from forgejo. Mirrors Crafter.Graphics's own
|
||||
// project.cpp convention so edits across the two repos pick up without
|
||||
// commit-and-pull.
|
||||
bool useLocal = false;
|
||||
for (std::string_view a : args) {
|
||||
if (a == "--local") { useLocal = true; break; }
|
||||
if (a == "") { useLocal = true; break; }
|
||||
}
|
||||
if (useLocal && std::find(depArgs.begin(), depArgs.end(), std::string("--local")) == depArgs.end()) {
|
||||
depArgs.push_back("--local");
|
||||
if (useLocal && std::find(depArgs.begin(), depArgs.end(), std::string("")) == depArgs.end()) {
|
||||
depArgs.push_back("");
|
||||
}
|
||||
|
||||
Configuration* graphics = useLocal
|
||||
|
|
@ -355,10 +355,13 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
// EnableWasiBrowserRuntime — sets <title>/<link> tags since the
|
||||
// Dom partition has no head-element access.
|
||||
cfg.files.emplace_back(fs::path("catcrafts-head.js"));
|
||||
// Product photography. CC BY-SA 4.0, © Fairphone (official render via
|
||||
// Wikimedia Commons) — the attribution lives on /legal/imprint. NOT in
|
||||
// Product photography. Both renders are © Fairphone under CC BY-SA 4.0 and
|
||||
// are cropped and recompressed here — the Gen. 6 one came via Wikimedia
|
||||
// Commons, the Gen. 6+ one from Fairphone's own Flickr. The attribution and
|
||||
// the adaptation notice the licence requires live on /legal/imprint. NOT in
|
||||
// cfg.assets: that pipeline transcodes to .ctex, which <img> cannot decode.
|
||||
cfg.files.emplace_back(fs::path("images/fp6-pmos.jpg"));
|
||||
cfg.files.emplace_back(fs::path("images/fp6plus-pmos.jpg"));
|
||||
// ECB rates ride with the content so the wasm-rendered shop (backend-down
|
||||
// fallback) can emit the same indicative prices the server does.
|
||||
cfg.files.emplace_back(fs::path("content/rates.json"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue