From 5b5e3b2b9375fea3e47c28c2a4d47ef4fe349cd5 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 23 Jan 2026 03:18:53 +0800 Subject: Rename generated files with leading underscore - Rename template files to have .template extension - Rename generated source files to start with underscore - Update .gitignore to ignore all files starting with underscore - Update build.rs and deploy.ps1 to reflect new names --- templates/_renderers.rs.template | 16 ++++++++++++++ templates/compile_info.rs | 24 --------------------- templates/compile_info.rs.template | 24 +++++++++++++++++++++ templates/renderer_list.rs.template | 16 -------------- templates/setup_jv_cli.iss | 42 ------------------------------------- templates/setup_jv_cli.iss.template | 42 +++++++++++++++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 82 deletions(-) create mode 100644 templates/_renderers.rs.template delete mode 100644 templates/compile_info.rs create mode 100644 templates/compile_info.rs.template delete mode 100644 templates/renderer_list.rs.template delete mode 100644 templates/setup_jv_cli.iss create mode 100644 templates/setup_jv_cli.iss.template (limited to 'templates') diff --git a/templates/_renderers.rs.template b/templates/_renderers.rs.template new file mode 100644 index 0000000..37f0f1b --- /dev/null +++ b/templates/_renderers.rs.template @@ -0,0 +1,16 @@ +match renderer_str { +// MATCH +// -- TEMPLATE START -- + "<>" => { + Self::process_with_renderer::< + RendererType + >(args, ctx) + .await + } +// -- TEMPLATE END -- + _ => { + return Err(CmdProcessError::Render(CmdRenderError::RendererNotFound( + renderer_str.to_string(), + ))); + } +} diff --git a/templates/compile_info.rs b/templates/compile_info.rs deleted file mode 100644 index b65055b..0000000 --- a/templates/compile_info.rs +++ /dev/null @@ -1,24 +0,0 @@ -pub struct CompileInfo { - pub date: String, - pub target: String, - pub platform: String, - pub toolchain: String, - - pub cli_version: String, - pub build_branch: String, - pub build_commit: String, -} - -impl Default for CompileInfo { - fn default() -> Self { - Self { - date: "{date}".to_string(), - target: "{target}".to_string(), - platform: "{platform}".to_string(), - toolchain: "{toolchain}".to_string(), - cli_version: "{version}".to_string(), - build_branch: "{branch}".to_string(), - build_commit: "{commit}".to_string(), - } - } -} diff --git a/templates/compile_info.rs.template b/templates/compile_info.rs.template new file mode 100644 index 0000000..b65055b --- /dev/null +++ b/templates/compile_info.rs.template @@ -0,0 +1,24 @@ +pub struct CompileInfo { + pub date: String, + pub target: String, + pub platform: String, + pub toolchain: String, + + pub cli_version: String, + pub build_branch: String, + pub build_commit: String, +} + +impl Default for CompileInfo { + fn default() -> Self { + Self { + date: "{date}".to_string(), + target: "{target}".to_string(), + platform: "{platform}".to_string(), + toolchain: "{toolchain}".to_string(), + cli_version: "{version}".to_string(), + build_branch: "{branch}".to_string(), + build_commit: "{commit}".to_string(), + } + } +} diff --git a/templates/renderer_list.rs.template b/templates/renderer_list.rs.template deleted file mode 100644 index 37f0f1b..0000000 --- a/templates/renderer_list.rs.template +++ /dev/null @@ -1,16 +0,0 @@ -match renderer_str { -// MATCH -// -- TEMPLATE START -- - "<>" => { - Self::process_with_renderer::< - RendererType - >(args, ctx) - .await - } -// -- TEMPLATE END -- - _ => { - return Err(CmdProcessError::Render(CmdRenderError::RendererNotFound( - renderer_str.to_string(), - ))); - } -} diff --git a/templates/setup_jv_cli.iss b/templates/setup_jv_cli.iss deleted file mode 100644 index 15a0fbc..0000000 --- a/templates/setup_jv_cli.iss +++ /dev/null @@ -1,42 +0,0 @@ -#define MyAppName "JustEnoughVCS" -#define MyAppVersion "<<>>" -#define MyAppPublisher "<<>>" -#define MyAppURL "<<>>" - -[Setup] -AppId={{8265DF21-F290-487E-9403-C2730EC31A03} -AppName={#MyAppName} -AppVersion={#MyAppVersion} -AppPublisher={#MyAppPublisher} -AppPublisherURL={#MyAppURL} -AppSupportURL={#MyAppURL} -AppUpdatesURL={#MyAppURL} -DefaultDirName={autopf}\{#MyAppName} -DefaultGroupName={#MyAppName} -AllowNoIcons=yes -LicenseFile=..\..\LICENSE -PrivilegesRequired=lowest -OutputDir=..\..\.temp\ -OutputBaseFilename=JustEnoughVCS For Windows -SetupIconFile=..\..\resources\images\Yizi.ico -SolidCompression=yes -WizardStyle=modern dynamic - -[Languages] -Name: "english"; MessagesFile: "compiler:Default.isl" - -[Files] -Source: "..\..\.temp\deploy\*"; Excludes: "setup"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "inst.ps1"; DestDir: "{app}\scripts\"; Flags: ignoreversion -Source: "uninst.ps1"; DestDir: "{app}\scripts\"; Flags: ignoreversion - -[Run] -Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\scripts\inst.ps1"""; Flags: runhidden; Description: "Running post-installation script..."; StatusMsg: "Running post-installation script..."; AfterInstall: RunPostInstall - -[UninstallRun] -Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\scripts\uninst.ps1"""; Flags: runhidden; RunOnceId: "UninstallScript" - -[Code] -procedure RunPostInstall; -begin -end; diff --git a/templates/setup_jv_cli.iss.template b/templates/setup_jv_cli.iss.template new file mode 100644 index 0000000..15a0fbc --- /dev/null +++ b/templates/setup_jv_cli.iss.template @@ -0,0 +1,42 @@ +#define MyAppName "JustEnoughVCS" +#define MyAppVersion "<<>>" +#define MyAppPublisher "<<>>" +#define MyAppURL "<<>>" + +[Setup] +AppId={{8265DF21-F290-487E-9403-C2730EC31A03} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +DefaultGroupName={#MyAppName} +AllowNoIcons=yes +LicenseFile=..\..\LICENSE +PrivilegesRequired=lowest +OutputDir=..\..\.temp\ +OutputBaseFilename=JustEnoughVCS For Windows +SetupIconFile=..\..\resources\images\Yizi.ico +SolidCompression=yes +WizardStyle=modern dynamic + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Files] +Source: "..\..\.temp\deploy\*"; Excludes: "setup"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "inst.ps1"; DestDir: "{app}\scripts\"; Flags: ignoreversion +Source: "uninst.ps1"; DestDir: "{app}\scripts\"; Flags: ignoreversion + +[Run] +Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\scripts\inst.ps1"""; Flags: runhidden; Description: "Running post-installation script..."; StatusMsg: "Running post-installation script..."; AfterInstall: RunPostInstall + +[UninstallRun] +Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\scripts\uninst.ps1"""; Flags: runhidden; RunOnceId: "UninstallScript" + +[Code] +procedure RunPostInstall; +begin +end; -- cgit