@@ -128,29 +128,36 @@ void checkLaunchStatus() {
128
128
}
129
129
130
130
/**
131
- * Updates platform-specific shortcuts to reference the new launcher,
132
- * including {@code .desktop} files on Linux .
131
+ * Warns users to update any shortcuts to reference the new launcher.
132
+ * Currently, this is recommended to be done manually .
133
133
* <p>
134
134
* The macOS-specific {@code Contents/Info.plist} is handled separately
135
135
* by the Updater, as part of the switch to the new update site; see
136
136
* {@link #migrateUpdateSite()}.
137
137
* </p>
138
- * <p></p>
139
- * Windows users are advised to update their shortcuts by hand, because:
138
+ * <p>
139
+ * Linux users need to change any {@code .desktop} files.
140
+ * </p>
141
+ * <p>
142
+ * Windows is particularly complicated, because:
140
143
* A) we don't know where the user put their Fiji shortcuts—they
141
144
* could be in the Start menu, on the desktop, or elsewhere and pinned
142
145
* to the taskbar; and B) the .lnk file format is an opaque binary
143
146
* format and I'm not going to code up something to hack it just for
144
147
* this transitional migration code that will be obsolete in a few months.
145
148
* </p>
146
149
* <p>
147
- * Finally, old launchers are renamed with {@code .backup} extension in
150
+ * Note that launchers will be renamed with the {@code .backup} extension in
148
151
* case there are any missed shortcuts, so that launch fails fast at the
149
- * OS level rather than potentially exploding at the application level.
152
+ * OS level rather than potentially exploding at the application level; see
153
+ * {@link #startExeRenameAndRestart(Path, String)}
150
154
* </p>
151
155
*/
152
- private void warnAboutShortcuts () {
153
- // If no old launchers are present, assume we already did this.
156
+ private void warnAboutShortcuts (File exeFile ) {
157
+
158
+ // FIXME warn users on all platforms not just windows and use the exe file to
159
+ // tell them the new executable name
160
+
154
161
155
162
// Fix links within Linux .desktop files.
156
163
// ~/.local/share/applications
@@ -164,8 +171,6 @@ private void warnAboutShortcuts() {
164
171
// one of these files is fiji/fiji/scripts/Plugins/Utilities/Create_Desktop_Icon.bsh,
165
172
// but it's outdated. So what is making these files these days??
166
173
167
- // TODO On MAC, Fiji.app is now a subdir of Fiji.. may want to rename the
168
- // top level Fiji.app to Fiji.
169
174
if (OS_WIN ) {
170
175
// FIXME: Warn user to update any shortcuts!
171
176
uiService .showDialog (
@@ -385,8 +390,8 @@ private void switchToNewLauncher() {
385
390
// Switch update sites, and then we can finally relaunch safely with the
386
391
// new launcher.
387
392
migrateUpdateSite ();
388
- warnAboutShortcuts ();
389
393
File exeFile = exeFile (appSlug , appDir );
394
+ warnAboutShortcuts (exeFile );
390
395
try {
391
396
startExeRenameAndRestart (appDir .toPath (), exeFile .getAbsolutePath ());
392
397
appService .getContext ().dispose ();
@@ -455,6 +460,7 @@ private static void startExeRenameAndRestart(Path appDir,
455
460
);
456
461
} else {
457
462
// Unix/Linux/Mac implementation using bash
463
+ // FIXME On MAC, Fiji.app is now a subdir of Fiji.. also rename the top level Fiji.app to Fiji
458
464
pb = new ProcessBuilder (
459
465
"bash" ,
460
466
"-c" ,
0 commit comments