Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

feat(desktop): setup asks about the desktop shortcut

Bee899c7838eb6f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5555a7f..ede51ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -152,6 +152,10 @@ has a Stop button. Choosing another
### Changed
+- **Setup on Windows asks about the desktop shortcut.** Untick **Add a
+ desktop shortcut** to skip it. Updates leave it as you had it, so one
+ you deleted no longer comes back
+ ([#102](https://github.com/thtbee/nectarlink/issues/102)).
- **Files received on Windows are marked as from another device,** the way
a browser marks a download, so Windows checks a program with SmartScreen
before it runs and Office opens documents in Protected View.
diff --git a/desktop/app/i18n/nectarlink_de.ts b/desktop/app/i18n/nectarlink_de.ts
index 0c085c8..2b21a2a 100644
--- a/desktop/app/i18n/nectarlink_de.ts
+++ b/desktop/app/i18n/nectarlink_de.ts
@@ -8052,8 +8052,8 @@ Voraussetzungen
<message>
<location filename="../qml/setup/SetupWindow.qml" line="108"/>
<location filename="../qml/setup/SetupWindow.qml" line="286"/>
- <location filename="../qml/setup/SetupWindow.qml" line="396"/>
- <location filename="../qml/setup/SetupWindow.qml" line="405"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="477"/>
<source>Close</source>
<translation>Schließen</translation>
</message>
@@ -8148,78 +8148,87 @@ Voraussetzungen
<translation>NectarLink behalten</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="301"/>
- <location filename="../qml/setup/SetupWindow.qml" line="446"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="344"/>
+ <source>Add a desktop shortcut</source>
+ <translation>Desktop-Verknüpfung erstellen</translation>
+ </message>
+ <message>
+ <location filename="../qml/setup/SetupWindow.qml" line="373"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="518"/>
<source>What this installs</source>
<translation>Was installiert wird</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is uninstalled</source>
<translation>NectarLink wurde deinstalliert</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is ready</source>
<translation>NectarLink ist bereit</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="346"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="418"/>
<source>Your received files are still in %1. Thanks for giving it a try.</source>
<translation>Deine empfangenen Dateien befinden sich weiterhin in %1. Danke fürs Ausprobieren!</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="347"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="419"/>
<source>Next, get the Android app. Scan this code with your phone&apos;s camera to open its download page.</source>
<translation>Hole dir als Nächstes die Android-App. Scanne diesen Code mit der Kamera deines Geräts, um die Download-Seite zu öffnen.</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="368"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="440"/>
<source>QR code for the Android app download page</source>
<translation>QR-Code für die Download-Seite der Android-App</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="381"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="453"/>
<source>Open the Android app download page</source>
<translation>Download-Seite der Android-App öffnen</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="396"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="468"/>
<source>Open NectarLink</source>
<translation>NectarLink öffnen</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="456"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="528"/>
<source>NectarLink goes into Program Files for everyone on this PC. Setup also:</source>
<translation>NectarLink wird unter „Programme“ für alle Benutzer dieses PCs installiert. Außerdem führt die Installation Folgendes aus:</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="457"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="529"/>
<source>allows it through Windows Firewall on private networks, so your phone can connect</source>
<translation>lässt NectarLink in privaten Netzwerken durch die Windows-Firewall zu, damit sich dein Gerät verbinden kann</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="458"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="530"/>
<source>adds a task that installs updates without an administrator prompt</source>
<translation>richtet eine Aufgabe ein, die Updates ohne Administratorabfrage installiert</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="459"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="531"/>
+ <source>adds a Start menu shortcut, and a desktop one if you leave that ticked, and starts it with Windows (turn this off in Settings)</source>
+ <translation>erstellt eine Verknüpfung im Startmenü, auf Wunsch auch eine auf dem Desktop, und startet die App mit Windows (in den Einstellungen deaktivierbar)</translation>
+ </message>
+ <message>
<source>adds Start menu and desktop shortcuts, and starts it with Windows (turn this off in Settings)</source>
- <translation>erstellt Verknüpfungen im Startmenü und auf dem Desktop und startet die App mit Windows (in den Einstellungen deaktivierbar)</translation>
+ <translation type="vanished">erstellt Verknüpfungen im Startmenü und auf dem Desktop und startet die App mit Windows (in den Einstellungen deaktivierbar)</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="460"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="532"/>
<source>adds it to the Windows Share sheet</source>
<translation>fügt NectarLink zum Teilen-Menü von Windows hinzu</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="461"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="533"/>
<source>It checks GitHub for updates once a day, which you can turn off in Settings. Otherwise your phone and PC only talk to each other.</source>
<translation>Es sucht einmal täglich auf GitHub nach Updates, was du in den Einstellungen ausschalten kannst. Ansonsten kommunizieren dein Gerät und dein PC ausschließlich direkt miteinander.</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="540"/>
<source>Privacy details</source>
<translation>Details zum Datenschutz</translation>
</message>
diff --git a/desktop/app/i18n/nectarlink_tr.ts b/desktop/app/i18n/nectarlink_tr.ts
index 2cef696..48063f5 100644
--- a/desktop/app/i18n/nectarlink_tr.ts
+++ b/desktop/app/i18n/nectarlink_tr.ts
@@ -8044,8 +8044,8 @@ Neler gerekir
<message>
<location filename="../qml/setup/SetupWindow.qml" line="108"/>
<location filename="../qml/setup/SetupWindow.qml" line="286"/>
- <location filename="../qml/setup/SetupWindow.qml" line="396"/>
- <location filename="../qml/setup/SetupWindow.qml" line="405"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="477"/>
<source>Close</source>
<translation>Kapat</translation>
</message>
@@ -8140,78 +8140,87 @@ Neler gerekir
<translation>NectarLink&apos;i tut</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="301"/>
- <location filename="../qml/setup/SetupWindow.qml" line="446"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="344"/>
+ <source>Add a desktop shortcut</source>
+ <translation>Masaüstü kısayolu ekle</translation>
+ </message>
+ <message>
+ <location filename="../qml/setup/SetupWindow.qml" line="373"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="518"/>
<source>What this installs</source>
<translation>Neler kurulur</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is uninstalled</source>
<translation>NectarLink kaldırıldı</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is ready</source>
<translation>NectarLink hazır</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="346"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="418"/>
<source>Your received files are still in %1. Thanks for giving it a try.</source>
<translation>Aldığınız dosyalar hâlâ %1 konumunda. Denediğiniz için teşekkürler.</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="347"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="419"/>
<source>Next, get the Android app. Scan this code with your phone&apos;s camera to open its download page.</source>
<translation>Şimdi Android uygulamasını edinin. İndirme sayfasını açmak için bu kodu telefonunuzun kamerasıyla tarayın.</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="368"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="440"/>
<source>QR code for the Android app download page</source>
<translation>Android uygulaması indirme sayfası için QR kodu</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="381"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="453"/>
<source>Open the Android app download page</source>
<translation>Android uygulaması indirme sayfasını aç</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="396"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="468"/>
<source>Open NectarLink</source>
<translation>NectarLink&apos;i aç</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="456"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="528"/>
<source>NectarLink goes into Program Files for everyone on this PC. Setup also:</source>
<translation>NectarLink, bu bilgisayardaki herkes için Program Files klasörüne kurulur. Kurulum ayrıca:</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="457"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="529"/>
<source>allows it through Windows Firewall on private networks, so your phone can connect</source>
<translation>telefonunuzun bağlanabilmesi için özel ağlarda Windows Güvenlik Duvarı&apos;ndan geçmesine izin verir</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="458"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="530"/>
<source>adds a task that installs updates without an administrator prompt</source>
<translation>güncellemeleri yönetici onayı istemeden kuran bir görev ekler</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="459"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="531"/>
+ <source>adds a Start menu shortcut, and a desktop one if you leave that ticked, and starts it with Windows (turn this off in Settings)</source>
+ <translation>Başlat menüsü kısayolu ekler, işaretli bırakırsanız masaüstü kısayolu da ekler ve Windows ile birlikte başlatır (bunu Ayarlar&apos;dan kapatabilirsiniz)</translation>
+ </message>
+ <message>
<source>adds Start menu and desktop shortcuts, and starts it with Windows (turn this off in Settings)</source>
- <translation>Başlat menüsü ve masaüstü kısayolları ekler ve Windows ile birlikte başlatır (bunu Ayarlar&apos;dan kapatabilirsiniz)</translation>
+ <translation type="vanished">Başlat menüsü ve masaüstü kısayolları ekler ve Windows ile birlikte başlatır (bunu Ayarlar&apos;dan kapatabilirsiniz)</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="460"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="532"/>
<source>adds it to the Windows Share sheet</source>
<translation>Windows Paylaş penceresine ekler</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="461"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="533"/>
<source>It checks GitHub for updates once a day, which you can turn off in Settings. Otherwise your phone and PC only talk to each other.</source>
<translation>Günde bir kez GitHub&apos;da güncelleme olup olmadığını denetler; bunu Ayarlar&apos;dan kapatabilirsiniz. Bunun dışında telefonunuz ve bilgisayarınız yalnızca birbiriyle iletişim kurar.</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="540"/>
<source>Privacy details</source>
<translation>Gizlilik ayrıntıları</translation>
</message>
diff --git a/desktop/app/i18n/nectarlink_zh_CN.ts b/desktop/app/i18n/nectarlink_zh_CN.ts
index 188eb68..1ba1297 100644
--- a/desktop/app/i18n/nectarlink_zh_CN.ts
+++ b/desktop/app/i18n/nectarlink_zh_CN.ts
@@ -8048,8 +8048,8 @@ What it needs
<message>
<location filename="../qml/setup/SetupWindow.qml" line="108"/>
<location filename="../qml/setup/SetupWindow.qml" line="286"/>
- <location filename="../qml/setup/SetupWindow.qml" line="396"/>
- <location filename="../qml/setup/SetupWindow.qml" line="405"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="477"/>
<source>Close</source>
<translation>关闭</translation>
</message>
@@ -8144,78 +8144,87 @@ What it needs
<translation>保留 NectarLink</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="301"/>
- <location filename="../qml/setup/SetupWindow.qml" line="446"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="344"/>
+ <source>Add a desktop shortcut</source>
+ <translation>添加桌面快捷方式</translation>
+ </message>
+ <message>
+ <location filename="../qml/setup/SetupWindow.qml" line="373"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="518"/>
<source>What this installs</source>
<translation>安装内容</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is uninstalled</source>
<translation>NectarLink 已卸载</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is ready</source>
<translation>NectarLink 已就绪</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="346"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="418"/>
<source>Your received files are still in %1. Thanks for giving it a try.</source>
<translation>你收到的文件仍保留在 %1。谢谢你的试用。</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="347"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="419"/>
<source>Next, get the Android app. Scan this code with your phone&apos;s camera to open its download page.</source>
<translation>接下来,获取 Android 应用。用手机相机扫描此二维码即可打开其下载页面。</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="368"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="440"/>
<source>QR code for the Android app download page</source>
<translation>Android 应用下载页面的二维码</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="381"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="453"/>
<source>Open the Android app download page</source>
<translation>打开 Android 应用下载页面</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="396"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="468"/>
<source>Open NectarLink</source>
<translation>打开 NectarLink</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="456"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="528"/>
<source>NectarLink goes into Program Files for everyone on this PC. Setup also:</source>
<translation>NectarLink 将安装到 Program Files,供本机所有用户使用。安装程序还会:</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="457"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="529"/>
<source>allows it through Windows Firewall on private networks, so your phone can connect</source>
<translation>在专用网络上允许其通过 Windows 防火墙,以便你的手机可以连接</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="458"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="530"/>
<source>adds a task that installs updates without an administrator prompt</source>
<translation>添加一个无需管理员提示即可安装更新的任务</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="459"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="531"/>
+ <source>adds a Start menu shortcut, and a desktop one if you leave that ticked, and starts it with Windows (turn this off in Settings)</source>
+ <translation>添加开始菜单快捷方式(勾选时也添加桌面快捷方式),并随 Windows 启动(可在设置中关闭)</translation>
+ </message>
+ <message>
<source>adds Start menu and desktop shortcuts, and starts it with Windows (turn this off in Settings)</source>
- <translation>添加开始菜单和桌面快捷方式,并随 Windows 启动(可在设置中关闭)</translation>
+ <translation type="vanished">添加开始菜单和桌面快捷方式,并随 Windows 启动(可在设置中关闭)</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="460"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="532"/>
<source>adds it to the Windows Share sheet</source>
<translation>将其添加到 Windows 共享面板</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="461"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="533"/>
<source>It checks GitHub for updates once a day, which you can turn off in Settings. Otherwise your phone and PC only talk to each other.</source>
<translation>它每天会检查一次 GitHub 上的更新,你可以在设置中关闭。除此之外,你的手机和电脑只会在彼此之间通信。</translation>
</message>
<message>
- <location filename="../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../qml/setup/SetupWindow.qml" line="540"/>
<source>Privacy details</source>
<translation>隐私详情</translation>
</message>
diff --git a/desktop/app/i18n/template/nectarlink.ts b/desktop/app/i18n/template/nectarlink.ts
index a61c7b7..6747a77 100644
--- a/desktop/app/i18n/template/nectarlink.ts
+++ b/desktop/app/i18n/template/nectarlink.ts
@@ -7768,8 +7768,8 @@ What it needs
<message>
<location filename="../../qml/setup/SetupWindow.qml" line="108"/>
<location filename="../../qml/setup/SetupWindow.qml" line="286"/>
- <location filename="../../qml/setup/SetupWindow.qml" line="396"/>
- <location filename="../../qml/setup/SetupWindow.qml" line="405"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="477"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
@@ -7864,78 +7864,83 @@ What it needs
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="301"/>
- <location filename="../../qml/setup/SetupWindow.qml" line="446"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="344"/>
+ <source>Add a desktop shortcut</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../../qml/setup/SetupWindow.qml" line="373"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="518"/>
<source>What this installs</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is uninstalled</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="334"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="406"/>
<source>NectarLink is ready</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="346"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="418"/>
<source>Your received files are still in %1. Thanks for giving it a try.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="347"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="419"/>
<source>Next, get the Android app. Scan this code with your phone&apos;s camera to open its download page.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="368"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="440"/>
<source>QR code for the Android app download page</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="381"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="453"/>
<source>Open the Android app download page</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="396"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="468"/>
<source>Open NectarLink</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="456"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="528"/>
<source>NectarLink goes into Program Files for everyone on this PC. Setup also:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="457"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="529"/>
<source>allows it through Windows Firewall on private networks, so your phone can connect</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="458"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="530"/>
<source>adds a task that installs updates without an administrator prompt</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="459"/>
- <source>adds Start menu and desktop shortcuts, and starts it with Windows (turn this off in Settings)</source>
+ <location filename="../../qml/setup/SetupWindow.qml" line="531"/>
+ <source>adds a Start menu shortcut, and a desktop one if you leave that ticked, and starts it with Windows (turn this off in Settings)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="460"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="532"/>
<source>adds it to the Windows Share sheet</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="461"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="533"/>
<source>It checks GitHub for updates once a day, which you can turn off in Settings. Otherwise your phone and PC only talk to each other.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../../qml/setup/SetupWindow.qml" line="468"/>
+ <location filename="../../qml/setup/SetupWindow.qml" line="540"/>
<source>Privacy details</source>
<translation type="unfinished"></translation>
</message>
diff --git a/desktop/app/qml/setup/SetupWindow.qml b/desktop/app/qml/setup/SetupWindow.qml
index d7f84be..cc1d68b 100644
--- a/desktop/app/qml/setup/SetupWindow.qml
+++ b/desktop/app/qml/setup/SetupWindow.qml
@@ -289,7 +289,79 @@ NativeWindow {
onClicked: window.close()
}
}
- Item { width: 1; height: 18 }
+
+ // Whether setup adds a desktop shortcut (Windows; #102).
+ Item { width: 1; height: shortcutChoice.visible ? 18 : 0 }
+ Item {
+ id: shortcutChoice
+ visible: !window.removing && window.phase !== "working" && Qt.platform.os === "windows"
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: shortcutRow.implicitWidth
+ height: visible ? 24 : 0
+ activeFocusOnTab: visible
+ Accessible.role: Accessible.CheckBox
+ Accessible.name: shortcutLabel.text
+ Accessible.checkable: true
+ Accessible.checked: Setup.desktopShortcut
+ Accessible.onToggleAction: Setup.desktopShortcut = !Setup.desktopShortcut
+ Accessible.onPressAction: Setup.desktopShortcut = !Setup.desktopShortcut
+ Keys.onSpacePressed: Setup.desktopShortcut = !Setup.desktopShortcut
+
+ Row {
+ id: shortcutRow
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 10
+ Rectangle {
+ width: 18
+ height: 18
+ radius: 5
+ anchors.verticalCenter: parent.verticalCenter
+ color: Setup.desktopShortcut ? window.honey : "transparent"
+ border.width: Setup.desktopShortcut ? 0 : 1.5
+ border.color: window.muted
+ Shape {
+ anchors.centerIn: parent
+ width: 10
+ height: 8
+ visible: Setup.desktopShortcut
+ preferredRendererType: Shape.CurveRenderer
+ ShapePath {
+ strokeColor: window.onHoney
+ strokeWidth: 2
+ fillColor: "transparent"
+ capStyle: ShapePath.RoundCap
+ joinStyle: ShapePath.RoundJoin
+ PathSvg { path: "M 1 4 L 4 7 L 9 1" }
+ }
+ }
+ }
+ Text {
+ id: shortcutLabel
+ anchors.verticalCenter: parent.verticalCenter
+ font.family: "Figtree"
+ font.pixelSize: 13
+ color: window.ink
+ text: qsTr("Add a desktop shortcut")
+ }
+ }
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: -5
+ radius: 8
+ color: "transparent"
+ border.width: 2
+ border.color: window.honey
+ visible: shortcutChoice.activeFocus
+ }
+ MouseArea {
+ anchors.fill: parent
+ anchors.margins: -6
+ cursorShape: Qt.PointingHandCursor
+ onClicked: Setup.desktopShortcut = !Setup.desktopShortcut
+ }
+ }
+
+ Item { width: 1; height: shortcutChoice.visible ? 14 : 18 }
Text {
id: details
visible: window.phase === "welcome" && !window.removing
@@ -456,7 +528,7 @@ NativeWindow {
text: qsTr("NectarLink goes into Program Files for everyone on this PC. Setup also:")
+ "<br>&#8226; " + qsTr("allows it through Windows Firewall on private networks, so your phone can connect")
+ "<br>&#8226; " + qsTr("adds a task that installs updates without an administrator prompt")
- + "<br>&#8226; " + qsTr("adds Start menu and desktop shortcuts, and starts it with Windows (turn this off in Settings)")
+ + "<br>&#8226; " + qsTr("adds a Start menu shortcut, and a desktop one if you leave that ticked, and starts it with Windows (turn this off in Settings)")
+ "<br>&#8226; " + qsTr("adds it to the Windows Share sheet")
+ "<br><br>" + qsTr("It checks GitHub for updates once a day, which you can turn off in Settings. Otherwise your phone and PC only talk to each other.")
}
diff --git a/desktop/app/src/bridge/setup.rs b/desktop/app/src/bridge/setup.rs
index ee1b47a..e11e765 100644
--- a/desktop/app/src/bridge/setup.rs
+++ b/desktop/app/src/bridge/setup.rs
@@ -40,6 +40,8 @@ pub mod qobject {
#[qproperty(QString, icon_url, cxx_name = "iconUrl")]
#[qproperty(QString, qr_url, cxx_name = "qrUrl")]
#[qproperty(QString, android_url, cxx_name = "androidUrl")]
+ /// Windows: whether setup adds a desktop shortcut.
+ #[qproperty(bool, desktop_shortcut, cxx_name = "desktopShortcut")]
type Setup = super::SetupRust;
}
@@ -77,6 +79,7 @@ pub struct SetupRust {
icon_url: QString,
qr_url: QString,
android_url: QString,
+ desktop_shortcut: bool,
}
static MODE: OnceLock<Mode> = OnceLock::new();
@@ -119,6 +122,8 @@ impl cxx_qt::Initialize for qobject::Setup {
Kind::Older => "older",
};
self.as_mut().set_kind(QString::from(kind));
+ // A first install adds it; otherwise it stays as the user left it.
+ self.as_mut().set_desktop_shortcut(kind == "fresh" || setup::has_desktop_shortcut());
self.as_mut().set_mode(QString::from("install"));
}
}
@@ -162,6 +167,7 @@ impl qobject::Setup {
self.as_mut().set_message(QString::default());
self.as_mut().set_progress(0.02);
let removing = matches!(mode, Mode::Remove { .. });
+ let desktop_shortcut = *self.desktop_shortcut();
self.as_mut().set_step(QString::from("Waiting for permission"));
let qt = self.qt_thread();
std::thread::spawn(move || {
@@ -175,7 +181,7 @@ impl qobject::Setup {
}
};
let outcome = match &mode {
- Mode::Install { installer } => setup::install(installer, report),
+ Mode::Install { installer } => setup::install(installer, desktop_shortcut, report),
Mode::Remove { installed } => setup::remove(installed, report),
};
if outcome == Outcome::Done && !removing {
diff --git a/desktop/app/src/setup.rs b/desktop/app/src/setup.rs
index 498bd80..b029ba8 100644
--- a/desktop/app/src/setup.rs
+++ b/desktop/app/src/setup.rs
@@ -246,16 +246,28 @@ pub enum Outcome {
Failed(String),
}
+/// Whether the desktop has NectarLink's shortcut, which setup only adds when
+/// asked to (#102).
+#[cfg(windows)]
+pub fn has_desktop_shortcut() -> bool {
+ crate::win::shortcut::public_desktop_dir().is_some_and(|dir| dir.join("NectarLink.lnk").is_file())
+}
+
+#[cfg(not(windows))]
+pub fn has_desktop_shortcut() -> bool {
+ false
+}
+
/// Installs from `installer` with administrator rights, reporting each step.
#[cfg(windows)]
-pub fn install(installer: &Path, on_event: impl FnMut(Event)) -> Outcome {
+pub fn install(installer: &Path, desktop_shortcut: bool, on_event: impl FnMut(Event)) -> Outcome {
let progress = progress_file("install");
- let params = format!("/S /PROGRESS={}", progress.display());
+ let params = format!("/S /DESKTOP={} /PROGRESS={}", u8::from(desktop_shortcut), progress.display());
run_tracked(installer, &params, &progress, Duration::from_secs(600), true, on_event)
}
#[cfg(target_os = "linux")]
-pub fn install(installer: &Path, mut on_event: impl FnMut(Event)) -> Outcome {
+pub fn install(installer: &Path, _desktop_shortcut: bool, mut on_event: impl FnMut(Event)) -> Outcome {
let name = installer.file_name().and_then(|s| s.to_str()).unwrap_or_default();
if name.ends_with(".deb") {
on_event(Event::Step(Step::Closing));
@@ -306,7 +318,7 @@ pub fn install(installer: &Path, mut on_event: impl FnMut(Event)) -> Outcome {
/// The app installs from a disk image on macOS, not through this setup.
#[cfg(not(any(windows, target_os = "linux")))]
-pub fn install(installer: &Path, _on_event: impl FnMut(Event)) -> Outcome {
+pub fn install(installer: &Path, _desktop_shortcut: bool, _on_event: impl FnMut(Event)) -> Outcome {
Outcome::Failed(tr!("Setup", "Couldn't start setup: %1", installer.display()))
}
diff --git a/desktop/app/src/win/shortcut.rs b/desktop/app/src/win/shortcut.rs
index 1aaa88c..941f0c3 100644
--- a/desktop/app/src/win/shortcut.rs
+++ b/desktop/app/src/win/shortcut.rs
@@ -7,7 +7,8 @@ use windows::{
Win32::{
System::Com::{CLSCTX_INPROC_SERVER, CoCreateInstance, CoTaskMemFree, IPersistFile},
UI::Shell::{
- FOLDERID_Recent, FOLDERID_SendTo, IShellLinkW, KF_FLAG_DEFAULT, SHGetKnownFolderPath, ShellLink,
+ FOLDERID_PublicDesktop, FOLDERID_Recent, FOLDERID_SendTo, IShellLinkW, KF_FLAG_DEFAULT,
+ SHGetKnownFolderPath, ShellLink,
},
},
core::{HSTRING, Interface},
@@ -83,6 +84,11 @@ pub fn send_to_dir() -> Option<PathBuf> {
known_folder(&FOLDERID_SendTo)
}
+/// The desktop every user of the PC sees, where setup puts its shortcut.
+pub fn public_desktop_dir() -> Option<PathBuf> {
+ known_folder(&FOLDERID_PublicDesktop)
+}
+
/// The user's Recent folder: a shortcut to each file opened lately.
pub fn recent_dir() -> Option<PathBuf> {
known_folder(&FOLDERID_Recent)
diff --git a/desktop/installer/nectarlink.nsi b/desktop/installer/nectarlink.nsi
index 1155818..2d51cea 100644
--- a/desktop/installer/nectarlink.nsi
+++ b/desktop/installer/nectarlink.nsi
@@ -66,6 +66,8 @@ Var Interactive
; Where each step is written, for the setup window (/PROGRESS=<file>).
Var ProgressFile
Var AppDir
+; Where an earlier copy was installed, if there is one.
+Var PreviousDir
!macro Progress line
${If} $ProgressFile != ""
@@ -165,6 +167,7 @@ Section "Install"
InitPluginsDir
StrCpy $AppDir "$PLUGINSDIR\app"
${Else}
+ ReadRegStr $PreviousDir HKLM "Software\${APP}" "InstallDir"
!insertmacro Progress "step closing"
!insertmacro QuitRunningApp
!insertmacro Progress "step files"
@@ -229,7 +232,24 @@ Section "Install"
!insertmacro Progress "step shortcuts"
CreateShortCut "$SMPROGRAMS\${DISPLAY}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 "" "" "Your phone, on your PC"
- CreateShortCut "$DESKTOP\${DISPLAY}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 "" "" "Your phone, on your PC"
+ ; The desktop shortcut is a choice in the setup window (/DESKTOP=1 or 0).
+ ; Without one (the app's updater), a first install adds it and an update
+ ; keeps it only if it's still there, so a deleted one stays deleted (#102).
+ ${GetParameters} $R0
+ ClearErrors
+ ${GetOptions} $R0 "/DESKTOP=" $R1
+ ${If} ${Errors}
+ StrCpy $R1 1
+ ${If} $PreviousDir != ""
+ ${AndIfNot} ${FileExists} "$DESKTOP\${DISPLAY}.lnk"
+ StrCpy $R1 0
+ ${EndIf}
+ ${EndIf}
+ ${If} $R1 == 1
+ CreateShortCut "$DESKTOP\${DISPLAY}.lnk" "$INSTDIR\${EXE}" "" "$INSTDIR\${EXE}" 0 "" "" "Your phone, on your PC"
+ ${Else}
+ Delete "$DESKTOP\${DISPLAY}.lnk"
+ ${EndIf}
; The Windows Share sheet needs the app's sparse package registered, which
; Windows allows for an unsigned one only with Developer Mode on. Why it
diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md
index de43c2c..be9f6a8 100644
--- a/docs/guide/getting-started.md
+++ b/docs/guide/getting-started.md
@@ -17,7 +17,7 @@ This guide walks you through installing NectarLink on Windows 11, Linux and Andr
1. Download the latest Windows installer (`Nectarlink-<version>-x64-setup.exe` for Intel/AMD PCs or `Nectarlink-<version>-arm64-setup.exe` for Snapdragon/ARM64 PCs) from the project's GitHub Releases page.
2. Run the installer. The installer isn't code-signed yet, so Windows SmartScreen may show **Windows protected your PC**: choose **More info**, then **Run anyway**.
-3. Click **Install** and allow the administrator prompt. Setup installs NectarLink, registers the required Windows Firewall rule for local QUIC discovery and connections, adds Start Menu and desktop shortcuts, and sets NectarLink to start in the system tray when you sign in (turn this off with **Start with Windows** in **Settings › General**). **What this installs** on the first screen lists everything it adds.
+3. Click **Install** and allow the administrator prompt. Setup installs NectarLink, registers the required Windows Firewall rule for local QUIC discovery and connections, adds a Start Menu shortcut (and a desktop one, unless you untick **Add a desktop shortcut**), and sets NectarLink to start in the system tray when you sign in (turn this off with **Start with Windows** in **Settings › General**). **What this installs** on the first screen lists everything it adds.
4. The last screen shows a QR code for the Android app's download page. Scan it with your phone's camera, then click **Open NectarLink**.
### On Linux
diff --git a/scripts/smoke-installer.ps1 b/scripts/smoke-installer.ps1
index a0a6900..efc74c7 100644
--- a/scripts/smoke-installer.ps1
+++ b/scripts/smoke-installer.ps1
@@ -24,6 +24,7 @@ $dir = Join-Path $env:ProgramFiles 'Nectarlink'
$exe = Join-Path $dir 'nectarlink-desktop.exe'
$uninstallKey = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Nectarlink'
$shortcut = Join-Path $env:ProgramData 'Microsoft\Windows\Start Menu\Programs\Nectarlink.lnk'
+$desktopShortcut = Join-Path $env:PUBLIC 'Desktop\NectarLink.lnk'
$data = if ($env:RUNNER_TEMP) { Join-Path $env:RUNNER_TEMP 'nectarlink-smoke' } else { Join-Path $env:TEMP 'nectarlink-smoke' }
function Check($what, [bool]$ok) {
@@ -59,6 +60,7 @@ Check "the app is installed" (Test-Path $exe)
Check "an uninstaller is installed" (Test-Path (Join-Path $dir 'uninstall.exe'))
Check "it's in Apps (uninstall entry)" (Test-Path $uninstallKey)
Check "it's in the Start menu" (Test-Path $shortcut)
+Check "a first install adds a desktop shortcut" (Test-Path $desktopShortcut)
Check "the firewall lets phones in" ([bool](FirewallRule))
Check "license notices are included" ((Get-Item (Join-Path $dir 'THIRD-PARTY-NOTICES.txt')).Length -gt 100KB)
$task = UpdateTask
@@ -81,6 +83,19 @@ Check "signed-in users may start the update task" (
(Test-TaskRights $sd 'S-1-5-11' 0x20) -or (Test-TaskRights $sd 'S-1-5-11' 0x20000000))
Check "nobody else may change or delete the update task" (-not (Test-OthersMayWrite $sd))
+# The desktop shortcut: an update (no /DESKTOP, as the updater runs it) leaves
+# a deleted one deleted; the setup window's choice adds or removes it.
+Remove-Item $desktopShortcut
+Start-Process $Setup -ArgumentList '/S' -Wait
+Check "an update doesn't bring back a deleted desktop shortcut" (-not (Test-Path $desktopShortcut))
+Start-Process $Setup -ArgumentList '/S', '/DESKTOP=1' -Wait
+Check "asking for a desktop shortcut adds it" (Test-Path $desktopShortcut)
+Start-Process $Setup -ArgumentList '/S' -Wait
+Check "an update keeps the desktop shortcut" (Test-Path $desktopShortcut)
+Start-Process $Setup -ArgumentList '/S', '/DESKTOP=0' -Wait
+Check "declining a desktop shortcut removes it" (-not (Test-Path $desktopShortcut))
+Start-Process $Setup -ArgumentList '/S', '/DESKTOP=1' -Wait
+
# The installed copy starts on its own files and quits when asked.
$app = Start-Process $exe -ArgumentList '--minimized', '--data-dir', $data -PassThru
Start-Sleep 8
@@ -97,6 +112,7 @@ while ((Test-Path $dir) -and (Get-Date) -lt $deadline) { Start-Sleep 1 }
Check "the app folder is gone" (-not (Test-Path $dir))
Check "the uninstall entry is gone" (-not (Test-Path $uninstallKey))
Check "the Start menu shortcut is gone" (-not (Test-Path $shortcut))
+Check "the desktop shortcut is gone" (-not (Test-Path $desktopShortcut))
Check "the firewall rule is gone" (-not (FirewallRule))
Check "the update task is gone" ($null -eq (UpdateTask))
Write-Host "Installer smoke test passed."