Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PRODUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Log Analysis 将连续工控log与逐层监控log只读汇总为可筛选、可
- 综合模式下 `Motor Speed` 以工控log为准,并保留监控log参考值用于审计。
- 中文界面为主,核心入口保持 `analyze_folder(path) -> AnalysisResult`。
- 第一版只支持 Windows x64,不提供在线分析、数据库、账号或自动更新。
- 当前二进制版本是未签名测试版 `v0.1.0-beta.5`。
- 当前二进制版本是未签名测试版 `v0.1.0-beta.6`。

## Brand Commitments

Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,24 @@
### 下载与校验

1. 升级前先关闭所有正在运行的 Log Analysis 窗口。
2. 下载 [Log Analysis v0.1.0-beta.5 安装程序](https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.5/Log-Analysis-Setup-v0.1.0-beta.5-x64.exe) 和同一版本的 [SHA256SUMS.txt](https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.5/SHA256SUMS.txt)。也可以先查看[完整版本说明](https://github.com/Reyppp/log-analysis/releases/tag/v0.1.0-beta.5)。
2. 下载 [Log Analysis v0.1.0-beta.6 安装程序](https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.6/Log-Analysis-Setup-v0.1.0-beta.6-x64.exe) 和同一版本的 [SHA256SUMS.txt](https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.6/SHA256SUMS.txt)。也可以先查看[完整版本说明](https://github.com/Reyppp/log-analysis/releases/tag/v0.1.0-beta.6)。
3. 在下载目录打开 PowerShell,运行:

```powershell
Get-FileHash -Algorithm SHA256 .\Log-Analysis-Setup-v0.1.0-beta.5-x64.exe
Get-FileHash -Algorithm SHA256 .\Log-Analysis-Setup-v0.1.0-beta.6-x64.exe
Get-Content .\SHA256SUMS.txt
```

4. 确认两处显示的 64 位 SHA-256 完全一致;不一致时不要运行安装程序,请重新下载。

### 安装与首次使用

1. 双击 `Log-Analysis-Setup-v0.1.0-beta.5-x64.exe`。
2. 按安装向导继续;程序默认安装到当前用户目录,不需要管理员权限,桌面快捷方式可选。
3. 当前版本是未签名测试版。若 SmartScreen 显示“Windows 已保护你的电脑”,请先确认 SHA-256 已匹配,再选择“更多信息”,核对文件名后选择“仍要运行”。如果组织安全策略禁止运行,请联系管理员,不要关闭系统安全功能。
4. 安装完成后,从开始菜单打开 **Log Analysis**。
5. 点击“选择文件夹”,选择炉次日志目录,再点击“开始分析”。所有数据只在本机处理。
1. 双击 `Log-Analysis-Setup-v0.1.0-beta.6-x64.exe`。
2. 在安装向导中选择安装目录;程序默认安装到当前用户目录,不需要管理员权限,桌面快捷方式可选。
3. 桌面位于其他磁盘或使用目录链接时,安装程序会使用 Windows 登记的真实桌面路径;快捷方式创建失败也不会中断应用安装,可改用开始菜单启动。
4. 当前版本是未签名测试版。若 SmartScreen 显示“Windows 已保护你的电脑”,请先确认 SHA-256 已匹配,再选择“更多信息”,核对文件名后选择“仍要运行”。如果组织安全策略禁止运行,请联系管理员,不要关闭系统安全功能。
5. 安装完成后,从开始菜单打开 **Log Analysis**。
6. 点击“选择文件夹”,选择炉次日志目录,再点击“开始分析”。所有数据只在本机处理。

覆盖安装会保留上次选择的炉次路径。卸载默认保留设置,也可以在卸载时选择同时删除。

Expand Down
12 changes: 8 additions & 4 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Log Analysis v0.1.0-beta.5
# Log Analysis v0.1.0-beta.6

双日志分析与设备工作台更新。
安装可靠性修复,保留 beta.5 的双日志分析与设备工作台功能。

## 主要更新

- 安装向导始终显示安装目录页面,可在安装前选择目标位置。
- 桌面快捷方式使用 Windows 登记的真实桌面路径,兼容桌面移动到其他磁盘或使用目录链接的环境。
- 桌面快捷方式创建失败时不再中断应用安装,可继续从开始菜单启动。

- 自动识别日期命名的工控log和逐层监控log,并根据文件夹内容提供综合、监控log、工控log三种分析范围。
- 综合模式自动匹配镀膜层顺序并校正两类日志的时间偏移;关联失败时保留两类日志的独立分析,不强制合并。
- 综合设备支持层数和时间两种横坐标。时间图以监控log时间为基准,工控log与监控log共享每张图最多 8,000 个真实采样点。
Expand All @@ -26,7 +30,7 @@
- 工控log连续数据在服务端会话中缓存,指标与筛选切换不重复读取原始文件。
- 高密度采样保留真实边界点和桶内极值,不计算均值、不插值。
- 关联算法允许跳过夹在完整镀膜序列之间的非镀膜工作段,避免额外工控序列导致整炉关联失败。
- 36 项自动测试覆盖单源、双源、时间对齐、8,000 点预算、筛选、桌面接口和公开网站。
- 37 项自动测试覆盖单源、双源、时间对齐、8,000 点预算、筛选、桌面接口、安装器和公开网站。

## 系统要求

Expand All @@ -35,7 +39,7 @@

## 安装与校验

同时下载 `Log-Analysis-Setup-v0.1.0-beta.5-x64.exe` 和 `SHA256SUMS.txt`。使用 PowerShell 的 `Get-FileHash` 核对 SHA-256 后运行安装程序。
同时下载 `Log-Analysis-Setup-v0.1.0-beta.6-x64.exe` 和 `SHA256SUMS.txt`。使用 PowerShell 的 `Get-FileHash` 核对 SHA-256 后运行安装程序。

## 已知限制

Expand Down
66 changes: 62 additions & 4 deletions installer/LogAnalysis.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define MyAppName "Log Analysis"
#ifndef MyAppVersion
#define MyAppVersion "0.1.0-beta.5"
#define MyAppVersion "0.1.0-beta.6"
#endif
#define MyNumericVersion "0.1.0.0"
#define MyAppPublisher "Reyppp"
Expand All @@ -17,6 +17,7 @@ AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}/issues
AppUpdatesURL={#MyAppURL}/releases
DefaultDirName={localappdata}\Programs\{#MyAppName}
DisableDirPage=no
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
PrivilegesRequired=lowest
Expand Down Expand Up @@ -46,7 +47,6 @@ Source: "..\dist\Log Analysis\*"; DestDir: "{app}"; Flags: ignoreversion recurse

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "启动 {#MyAppName}"; Flags: nowait postinstall skipifsilent
Expand All @@ -55,6 +55,23 @@ Filename: "{app}\{#MyAppExeName}"; Description: "启动 {#MyAppName}"; Flags: no
var
RemoveSettings: Boolean;

const
InstallerSettingsKey = 'Software\Log Analysis\Installer';

function GetDesktopDirectory(): String;
begin
Result := '';
if not RegQueryStringValue(HKCU,
'Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders',
'Desktop', Result) or (Result = '') or (Pos('%', Result) > 0) then
Result := ExpandConstant('{userdesktop}');
end;

function GetDesktopShortcutPath(Param: String): String;
begin
Result := AddBackslash(GetDesktopDirectory()) + '{#MyAppName}.lnk';
end;

function HasWebView2At(Base: String): Boolean;
var
Found: TFindRec;
Expand Down Expand Up @@ -87,10 +104,51 @@ begin
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
ShortcutPath: String;
begin
if (CurStep = ssPostInstall) and WizardIsTaskSelected('desktopicon') then
begin
ShortcutPath := GetDesktopShortcutPath('');
try
ForceDirectories(ExtractFileDir(ShortcutPath));
CreateShellLink(
ShortcutPath,
'{#MyAppName}',
ExpandConstant('{app}\{#MyAppExeName}'),
'',
ExpandConstant('{app}'),
ExpandConstant('{app}\{#MyAppExeName}'),
0,
SW_SHOWNORMAL);
RegWriteStringValue(HKCU, InstallerSettingsKey,
'DesktopShortcut', ShortcutPath);
except
Log('Desktop shortcut creation failed: ' + GetExceptionMessage);
SuppressibleMsgBox(
'Log Analysis 已完成安装,但桌面快捷方式创建失败。' + #13#10 +
'请从开始菜单启动应用。',
mbInformation, MB_OK, IDOK);
end;
end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
ShortcutPath: String;
begin
if CurUninstallStep = usUninstall then
RemoveSettings := SuppressibleMsgBox('是否同时删除 Log Analysis 保存的上次炉次路径?', mbConfirmation, MB_YESNO, IDNO) = IDYES;
if (CurUninstallStep = usPostUninstall) and RemoveSettings then
DelTree(ExpandConstant('{localappdata}\Log Analysis'), True, True, True);
if CurUninstallStep = usPostUninstall then
begin
if RegQueryStringValue(HKCU, InstallerSettingsKey,
'DesktopShortcut', ShortcutPath) and FileExists(ShortcutPath) then
DeleteFile(ShortcutPath);
RegDeleteValue(HKCU, InstallerSettingsKey, 'DesktopShortcut');
RegDeleteKeyIfEmpty(HKCU, InstallerSettingsKey);
RegDeleteKeyIfEmpty(HKCU, 'Software\Log Analysis');
if RemoveSettings then
DelTree(ExpandConstant('{localappdata}\Log Analysis'), True, True, True);
end;
end;
22 changes: 11 additions & 11 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
<h1>单炉次镀膜日志分析</h1>
<p>自动关联工控log与监控log,汇总逐层理论、光学与设备数据,定位需复核层。全程本地运行,原始日志只读。</p>
<div class="hero-actions">
<a class="primary-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.5/Log-Analysis-Setup-v0.1.0-beta.5-x64.exe">下载 v0.1.0-beta.5</a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.5/SHA256SUMS.txt">SHA-256 校验文件 <span aria-hidden="true">→</span></a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/tag/v0.1.0-beta.5">版本说明 <span aria-hidden="true">→</span></a>
<a class="primary-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.6/Log-Analysis-Setup-v0.1.0-beta.6-x64.exe">下载 v0.1.0-beta.6</a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.6/SHA256SUMS.txt">SHA-256 校验文件 <span aria-hidden="true">→</span></a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/tag/v0.1.0-beta.6">版本说明 <span aria-hidden="true">→</span></a>
</div>
<dl class="hero-facts">
<div><dt>运行方式</dt><dd>Windows 10/11 x64</dd></div>
<div><dt>数据边界</dt><dd>本地只读,不上传</dd></div>
<div><dt>当前版本</dt><dd>v0.1.0-beta.5</dd></div>
<div><dt>当前版本</dt><dd>v0.1.0-beta.6</dd></div>
</dl>
</div>

Expand Down Expand Up @@ -234,20 +234,20 @@ <h3 id="guideDetailTitle">双源关联</h3>
</section>

<section class="install" id="install">
<div class="install-copy"><h2>安装 Windows 测试版</h2><p>v0.1.0-beta.5 新增工控log、双源关联与实际采样点设备趋势。当前版本未进行代码签名。已知问题:部分环境下单层详情图表或原始截图可能不显示。</p></div>
<div class="install-copy"><h2>安装 Windows 测试版</h2><p>v0.1.0-beta.6 修复安装目录选择与重定向桌面快捷方式。当前版本未进行代码签名。已知问题:部分环境下单层详情图表或原始截图可能不显示。</p></div>
<div class="install-steps">
<ol>
<li><span>1</span><div><strong>关闭旧版本</strong><p>升级前先退出所有正在运行的 Log Analysis 窗口。</p></div></li>
<li><span>2</span><div><strong>下载两个文件</strong><p>同时下载 <code>Log-Analysis-Setup-v0.1.0-beta.5-x64.exe</code> 和 <code>SHA256SUMS.txt</code>。</p></div></li>
<li><span>3</span><div><strong>核对 SHA-256</strong><p>在下载目录运行 <code>Get-FileHash -Algorithm SHA256 .\Log-Analysis-Setup-v0.1.0-beta.5-x64.exe</code>,与校验文件比较。</p></div></li>
<li><span>4</span><div><strong>运行当前用户安装</strong><p>双击安装程序;不需要管理员权限,桌面快捷方式可选。</p></div></li>
<li><span>2</span><div><strong>下载两个文件</strong><p>同时下载 <code>Log-Analysis-Setup-v0.1.0-beta.6-x64.exe</code> 和 <code>SHA256SUMS.txt</code>。</p></div></li>
<li><span>3</span><div><strong>核对 SHA-256</strong><p>在下载目录运行 <code>Get-FileHash -Algorithm SHA256 .\Log-Analysis-Setup-v0.1.0-beta.6-x64.exe</code>,与校验文件比较。</p></div></li>
<li><span>4</span><div><strong>选择安装目录</strong><p>双击安装程序并选择位置;桌面快捷方式可选,失败时不影响应用安装。</p></div></li>
<li><span>5</span><div><strong>处理测试版提示</strong><p>哈希匹配后,如 SmartScreen 警告可选择“更多信息”并核对文件名;组织策略阻止时请联系管理员。</p></div></li>
<li><span>6</span><div><strong>选择炉次并分析</strong><p>从开始菜单打开应用,点击“选择文件夹”,再点击“开始分析”。</p></div></li>
</ol>
<div class="hero-actions">
<a class="primary-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.5/Log-Analysis-Setup-v0.1.0-beta.5-x64.exe">直接下载安装程序</a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.5/SHA256SUMS.txt">下载校验文件 <span aria-hidden="true">→</span></a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/tag/v0.1.0-beta.5">查看版本说明 <span aria-hidden="true">→</span></a>
<a class="primary-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.6/Log-Analysis-Setup-v0.1.0-beta.6-x64.exe">直接下载安装程序</a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/download/v0.1.0-beta.6/SHA256SUMS.txt">下载校验文件 <span aria-hidden="true">→</span></a>
<a class="text-action" href="https://github.com/Reyppp/log-analysis/releases/tag/v0.1.0-beta.6">查看版本说明 <span aria-hidden="true">→</span></a>
</div>
</div>
</section>
Expand Down
12 changes: 12 additions & 0 deletions test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,18 @@ def test_windows_launchers_use_crlf(self):
self.assertIn(b"\r\n", content)
self.assertNotIn(b"\n", content.replace(b"\r\n", b""))

def test_installer_allows_directory_selection_and_tolerates_desktop_shortcut_failure(self):
script = (Path(__file__).parent / "installer" / "LogAnalysis.iss").read_text(encoding="utf-8")
self.assertIn("DisableDirPage=no", script)
self.assertNotIn('Name: "{autodesktop}\\{#MyAppName}"', script)
self.assertIn("User Shell Folders", script)
self.assertIn("WizardIsTaskSelected('desktopicon')", script)
self.assertIn("CreateShellLink(", script)
self.assertIn("except", script)
self.assertIn("已完成安装,但桌面快捷方式创建失败", script)
self.assertIn("RegWriteStringValue(HKCU, InstallerSettingsKey", script)
self.assertIn("DeleteFile(ShortcutPath)", script)

def test_public_site_is_local_only_and_links_to_releases(self):
project = Path(__file__).parent
html = (project / "site" / "index.html").read_text(encoding="utf-8")
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_NAME = "Log Analysis"
APP_VERSION = "0.1.0-beta.5"
APP_VERSION = "0.1.0-beta.6"
BUILD_CHANNEL = "beta"
REPOSITORY_URL = "https://github.com/Reyppp/log-analysis"
RELEASES_URL = f"{REPOSITORY_URL}/releases"