Drop legacy musrfit-gui credit from MSRs and expose the version on the web

Generated MSRs no longer carry the old musrfit-gui repository URL; the
header names muSRFlow, the author, the licence, and the muSRFlow site,
and the reference fixtures follow. The Quick Start/help page gains an
About muSRFlow section with the version, author, and licence, mirroring
the Electron Help > About dialog: the Electron window is fed
app.getVersion() over the quickStartSection channel, while the web
deploy brands the installed page with the package.json version
(idempotent sed on a __MUSRFLOW_VERSION__ token that renders as
'development build' when unsubstituted).
This commit is contained in:
salman committed 2026-09-14 11:36:45 +02:00
1 parent 722aa42de7
commit 5a91b1a043
13 files changed
+60 -9

No files matched your search

+9
View File
@@ -25,6 +25,15 @@ release path documented in [`TODO.md`](TODO.md).
platforms each expose an `chooseDataSources` multi-picker, wired to a new
`selectParameterDataFiles` IPC channel for the native dialog.
### About and versioning
- The Quick Start/help page gained an **About muSRFlow** section with the
version, author, and licence, mirroring the Electron Help > About dialog.
The Electron window is fed `app.getVersion()`; the web deploy brands the
installed help page with the `package.json` version (the source keeps a
`__MUSRFLOW_VERSION__` token that renders as "development build").
- Generated MSRs no longer credit the legacy `musrfit-gui` repository; the
header now names muSRFlow, the author, the licence, and the muSRFlow site.
## [1.0.0-rc.1] - 2026-09-10
### Highlights
+1 -1
View File
@@ -146,7 +146,7 @@ function showQuickStartWindow(sectionId = "helpRuns") {
minHeight: 360,
file: "quick-start.html",
dataChannel: "quickStartSection",
data: { sectionId: sectionId }
data: { sectionId: sectionId, version: app.getVersion() }
});
quickStartWindow.on("closed", () => {
quickStartWindow = null;
+1 -1
View File
@@ -764,7 +764,7 @@ PLOT_BLOCK
FOURIER
FOURIER_BLOCK
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
`
// Create additional property with an array of parameters
+18
View File
@@ -49,6 +49,12 @@
<h3>Results and diagnostics</h3>
<p>The Results tab keeps generated files, fit statistics and the full command log. The status bar provides the short state; click its state or message to open the run log immediately. Hover over shortened values to see them in full.</p>
</section>
<section class="quick-start-section" id="helpAbout">
<h3>About muSRFlow</h3>
<p><b>muSRFlow <span id="musrflowVersion">__MUSRFLOW_VERSION__</span></b> is a desktop and web workflow for musrfit.</p>
<p>Author: <a href="mailto:zaher.salman@psi.ch">Zaher Salman</a>. Copyright (C) 2026 Zaher Salman. GNU GPL version 3 or later.</p>
</section>
</main>
<footer class="quick-start-footer" id="quickStartFooter">
@@ -72,7 +78,18 @@
}, 0);
}
var versionSpan = document.getElementById("musrflowVersion");
function setVersion(version) {
if (!versionSpan) return;
if (version) {
versionSpan.textContent = version;
} else if (versionSpan.textContent.indexOf("__MUSRFLOW_VERSION__") !== -1) {
versionSpan.textContent = "development build";
}
}
window.focusQuickStartSection = focusSection;
setVersion();
focusSection(window.location.hash ? window.location.hash.slice(1) : "helpRuns");
window.addEventListener("hashchange", function() {
focusSection(window.location.hash ? window.location.hash.slice(1) : "helpRuns");
@@ -82,6 +99,7 @@
try {
require("electron").ipcRenderer.on("quickStartSection", function(event, payload) {
focusSection(payload && payload.sectionId ? payload.sectionId : "helpRuns");
setVersion(payload && payload.version);
});
} catch (error) {
console.log("Could not attach Quick Start Electron channel:", error);
+16
View File
@@ -29,6 +29,22 @@ install -m 0644 \
"$project_root/assets/musrflow-icon.png" \
"$web_target/assets/"
# Brand the installed help page with the current release version, matching the
# About dialog in the Electron edition. The source keeps a __MUSRFLOW_VERSION__
# token that renders as "development build" when left unsubstituted; the
# installed copy is rewritten with the version from package.json. Idempotent:
# an already-branded file contains no token, so re-running matches nothing.
if command -v node >/dev/null 2>&1; then
version="$(node -p 'require(process.argv[1]).version' "$project_root/package.json")"
tmp_qs="$(mktemp)"
sed "s#__MUSRFLOW_VERSION__#$version#g" "$web_target/quick-start.html" > "$tmp_qs"
install -m 0644 "$tmp_qs" "$web_target/quick-start.html"
rm -f "$tmp_qs"
printf 'Branded %s with muSRFlow version %s\n' "$web_target/quick-start.html" "$version"
else
printf 'node not found; quick-start.html keeps the source version token\n'
fi
# Apache executes the runner through the existing /cgi-bin ScriptAlias.
install -m 0755 "$project_root/cgi/single_musrfit.cgi" "$cgi_target"
+1 -1
View File
@@ -43,4 +43,4 @@ plot power
phase 8.5
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
+1 -1
View File
@@ -36,4 +36,4 @@ use_fit_ranges
###############################################################
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
+1 -1
View File
@@ -52,4 +52,4 @@ plot power
range 0 11
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
+1 -1
View File
@@ -48,4 +48,4 @@ plot power
range 0 11
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
+1 -1
View File
@@ -84,7 +84,7 @@ plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_RE
range 0 11
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
###############################################################
STATISTIC --- 2026-08-31 17:06:34
+1 -1
View File
@@ -76,4 +76,4 @@ plot power
range 0 11
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
+1 -1
View File
@@ -45,4 +45,4 @@ plot power
phase 8.5
###############################################################
# Created by muSRFlow (ZS https://bitbucket.org/zaher-salman/musrfit-gui)
# Created by muSRFlow (Zaher Salman; GNU GPL version 3 or later; https://musruser.psi.ch/muSRFlow/)
+8
View File
@@ -33,9 +33,17 @@ function testSharedHelpWindowInfrastructure() {
assert.match(help, /class="quick-start-footer"/);
assert.match(help, /zaher\.salman@psi\.ch/);
assert.match(help, /https:\/\/musruser\.psi\.ch\/muSRFlow\/docs\//);
assert.match(help, /id="helpAbout"/);
assert.match(help, /About muSRFlow/);
assert.match(help, /id="musrflowVersion"/);
assert.match(help, /setVersion\(payload && payload\.version\)/);
assert.match(main, /version: app\.getVersion\(\)/);
assert.match(main, /shell\.openExternal/);
assert.match(main, /setWindowOpenHandler/);
assert.match(deploy, /quick-start\.html/);
assert.match(deploy, /__MUSRFLOW_VERSION__/);
assert.match(deploy, /node -p 'require\(process\.argv\[1\]\)\.version'/);
assert.doesNotMatch(lib, /musrfit-gui|bitbucket\.org\/zaher-salman/);
}
testSharedHelpWindowInfrastructure();