|
@@ -380,8 +380,9 @@ dist_env.Alias("vscode_dist", vscode_dist)
|
|
|
# Creating app from base template
|
|
# Creating app from base template
|
|
|
|
|
|
|
|
dist_env.SetDefault(FBT_APPID=appenv.subst("$APPID") or "template")
|
|
dist_env.SetDefault(FBT_APPID=appenv.subst("$APPID") or "template")
|
|
|
|
|
+app_template_dir = project_template_dir.Dir("app_template")
|
|
|
app_template_dist = []
|
|
app_template_dist = []
|
|
|
-for template_file in project_template_dir.Dir("app_template").glob("*"):
|
|
|
|
|
|
|
+for template_file in app_template_dir.glob("*"):
|
|
|
dist_file_name = dist_env.subst(template_file.name)
|
|
dist_file_name = dist_env.subst(template_file.name)
|
|
|
if template_file.name.endswith(".png"):
|
|
if template_file.name.endswith(".png"):
|
|
|
app_template_dist.append(
|
|
app_template_dist.append(
|
|
@@ -397,12 +398,13 @@ for template_file in project_template_dir.Dir("app_template").glob("*"):
|
|
|
},
|
|
},
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
AddPostAction(
|
|
AddPostAction(
|
|
|
app_template_dist[-1],
|
|
app_template_dist[-1],
|
|
|
[
|
|
[
|
|
|
Mkdir(original_app_dir.Dir("images")),
|
|
Mkdir(original_app_dir.Dir("images")),
|
|
|
Touch(original_app_dir.Dir("images").File(".gitkeep")),
|
|
Touch(original_app_dir.Dir("images").File(".gitkeep")),
|
|
|
|
|
+ # scons' glob ignores .dot directories, so we need to copy .github manually
|
|
|
|
|
+ Copy(original_app_dir.Dir(".github"), app_template_dir.Dir(".github")),
|
|
|
],
|
|
],
|
|
|
)
|
|
)
|
|
|
dist_env.Precious(app_template_dist)
|
|
dist_env.Precious(app_template_dist)
|
|
@@ -440,3 +442,8 @@ else:
|
|
|
raise UserError(f"Dolphin folder not found: {dolphin_src_dir}")
|
|
raise UserError(f"Dolphin folder not found: {dolphin_src_dir}")
|
|
|
|
|
|
|
|
dist_env.PhonyTarget("dolphin_ext", Action(missing_dolphin_folder, None))
|
|
dist_env.PhonyTarget("dolphin_ext", Action(missing_dolphin_folder, None))
|
|
|
|
|
+
|
|
|
|
|
+dist_env.PhonyTarget(
|
|
|
|
|
+ "env",
|
|
|
|
|
+ "@echo $( ${FBT_SCRIPT_DIR}/toolchain/fbtenv.sh $)",
|
|
|
|
|
+)
|