diff --git a/Cargo.toml b/Cargo.toml index 90af17138..7ac714c04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -142,10 +142,10 @@ hound = "3.5" [package.metadata.bundle] name = "RustDesk" identifier = "com.carriez.rustdesk" -icon = ["32x32.png", "128x128.png", "128x128@2x.png"] +icon = ["res/32x32.png", "res/128x128.png", "res/128x128@2x.png"] deb_depends = ["libgtk-3-0", "libxcb-randr0", "libxdo3", "libxfixes3", "libxcb-shape0", "libxcb-xfixes0", "libasound2", "libsystemd0", "pulseaudio", "python3-pip", "curl"] osx_minimum_system_version = "10.14" -resources = ["mac-tray-light.png","mac-tray-dark.png"] +resources = ["res/mac-tray-light.png","res/mac-tray-dark.png"] #https://github.com/johnthagen/min-sized-rust [profile.release] diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index 5216876c6..d4ae9af18 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 627a5900c..61c13f60b 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 6f5812ab2..ed67c27ad 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index fec319956..f974850af 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 1dfae6a19..ff419814d 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index 626a8a31b..b3cdc7920 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index e8b1c7816..15b2e086d 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 6f5812ab2..ed67c27ad 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 8eb9e99e9..94665b74e 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index 8213d5d2e..3cf8a0dc2 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index 8213d5d2e..3cf8a0dc2 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 5750709c5..6e21d8ee9 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index 4f71e4267..01047f4be 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 60f2ab3eb..ceb721793 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index ce48f4170..e416e5517 100644 Binary files a/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index b012f0435..7c0b90e54 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -140,7 +140,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" charcode: dependency: transitive description: @@ -576,7 +576,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" menu_base: dependency: transitive description: @@ -590,7 +590,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" mime: dependency: transitive description: diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 02621ed66..09025ad0e 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -89,7 +89,7 @@ dev_dependencies: # rerun: flutter pub run flutter_launcher_icons:main icons_launcher: - image_path: "../128x128@2x.png" + image_path: "../res/icon.png" platforms: android: enable: true diff --git a/128x128.png b/res/128x128.png similarity index 100% rename from 128x128.png rename to res/128x128.png diff --git a/128x128@2x.png b/res/128x128@2x.png similarity index 100% rename from 128x128@2x.png rename to res/128x128@2x.png diff --git a/32x32.png b/res/32x32.png similarity index 100% rename from 32x32.png rename to res/32x32.png diff --git a/res/icon.png b/res/icon.png new file mode 100644 index 000000000..573165a06 Binary files /dev/null and b/res/icon.png differ diff --git a/mac-tray-dark.png b/res/mac-tray-dark.png similarity index 100% rename from mac-tray-dark.png rename to res/mac-tray-dark.png diff --git a/mac-tray-light.png b/res/mac-tray-light.png similarity index 100% rename from mac-tray-light.png rename to res/mac-tray-light.png diff --git a/setup.nsi b/res/setup.nsi similarity index 96% rename from setup.nsi rename to res/setup.nsi index bbca85c71..0d8636592 100644 --- a/setup.nsi +++ b/res/setup.nsi @@ -1,112 +1,112 @@ -Unicode true - -#################################################################### -# Includes - -!include nsDialogs.nsh -!include MUI2.nsh -!include x64.nsh -!include LogicLib.nsh - -#################################################################### -# File Info - -!define PRODUCT_NAME "RustDesk" -!define PRODUCT_DESCRIPTION "Installer for ${PRODUCT_NAME}" -!define COPYRIGHT "Copyright © 2021" -!define VERSION "1.1.6" - -VIProductVersion "${VERSION}.0" -VIAddVersionKey "ProductName" "${PRODUCT_NAME}" -VIAddVersionKey "ProductVersion" "${VERSION}" -VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}" -VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" -VIAddVersionKey "FileVersion" "${VERSION}.0" - -#################################################################### -# Installer Attributes - -Name "${PRODUCT_NAME}" -Outfile "rustdesk-${VERSION}-setup.exe" -Caption "Setup - ${PRODUCT_NAME}" -BrandingText "${PRODUCT_NAME}" - -ShowInstDetails show -RequestExecutionLevel admin -SetOverwrite on - -InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}" - -#################################################################### -# Pages - -!define MUI_ICON "src\tray-icon.ico" -!define MUI_ABORTWARNING -!define MUI_LANGDLL_ALLLANGUAGES -!define MUI_FINISHPAGE_SHOWREADME "" -!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED -!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut" -!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortcut -!define MUI_FINISHPAGE_RUN "$INSTDIR\${PRODUCT_NAME}.exe" - -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES -!insertmacro MUI_PAGE_FINISH - -#################################################################### -# Language - -!insertmacro MUI_LANGUAGE "English" -!insertmacro MUI_LANGUAGE "SimpChinese" - -#################################################################### -# Sections - -Section "Install" - SetOutPath $INSTDIR - - # Regkeys - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${PRODUCT_NAME}.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME} (x64)" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${VERSION}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" '"$INSTDIR\${PRODUCT_NAME}.exe" --uninstall' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "InstallLocation" "$INSTDIR" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "Publisher" "Carriez, Inc." - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "HelpLink" "https://www.rustdesk.com/" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "URLInfoAbout" "https://www.rustdesk.com/" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "URLUpdateInfo" "https://www.rustdesk.com/" - - nsExec::Exec "taskkill /F /IM ${PRODUCT_NAME}.exe" - Sleep 500 ; Give time for process to be completely killed - File "${PRODUCT_NAME}.exe" - - SetShellVarContext all - CreateShortCut "$INSTDIR\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "--uninstall" "msiexec.exe" - CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "--uninstall" "msiexec.exe" - CreateShortCut "$SMSTARTUP\${PRODUCT_NAME} Tray.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "--tray" - - nsExec::Exec 'sc create ${PRODUCT_NAME} start=auto DisplayName="${PRODUCT_NAME} Service" binPath= "\"$INSTDIR\${PRODUCT_NAME}.exe\" --service"' - nsExec::Exec 'netsh advfirewall firewall add rule name="${PRODUCT_NAME} Service" dir=in action=allow program="$INSTDIR\${PRODUCT_NAME}.exe" enable=yes' - nsExec::Exec 'sc start ${PRODUCT_NAME}' -SectionEnd - -#################################################################### -# Functions - -Function .onInit - # RustDesk is 64-bit only - ${IfNot} ${RunningX64} - MessageBox MB_ICONSTOP "${PRODUCT_NAME} is 64-bit only!" - Quit - ${EndIf} - ${DisableX64FSRedirection} - SetRegView 64 - - !insertmacro MUI_LANGDLL_DISPLAY -FunctionEnd - -Function CreateDesktopShortcut - CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" -FunctionEnd \ No newline at end of file +Unicode true + +#################################################################### +# Includes + +!include nsDialogs.nsh +!include MUI2.nsh +!include x64.nsh +!include LogicLib.nsh + +#################################################################### +# File Info + +!define PRODUCT_NAME "RustDesk" +!define PRODUCT_DESCRIPTION "Installer for ${PRODUCT_NAME}" +!define COPYRIGHT "Copyright © 2021" +!define VERSION "1.1.6" + +VIProductVersion "${VERSION}.0" +VIAddVersionKey "ProductName" "${PRODUCT_NAME}" +VIAddVersionKey "ProductVersion" "${VERSION}" +VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}" +VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" +VIAddVersionKey "FileVersion" "${VERSION}.0" + +#################################################################### +# Installer Attributes + +Name "${PRODUCT_NAME}" +Outfile "rustdesk-${VERSION}-setup.exe" +Caption "Setup - ${PRODUCT_NAME}" +BrandingText "${PRODUCT_NAME}" + +ShowInstDetails show +RequestExecutionLevel admin +SetOverwrite on + +InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}" + +#################################################################### +# Pages + +!define MUI_ICON "tray-icon.ico" +!define MUI_ABORTWARNING +!define MUI_LANGDLL_ALLLANGUAGES +!define MUI_FINISHPAGE_SHOWREADME "" +!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED +!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut" +!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortcut +!define MUI_FINISHPAGE_RUN "$INSTDIR\${PRODUCT_NAME}.exe" + +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +#################################################################### +# Language + +!insertmacro MUI_LANGUAGE "English" +!insertmacro MUI_LANGUAGE "SimpChinese" + +#################################################################### +# Sections + +Section "Install" + SetOutPath $INSTDIR + + # Regkeys + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\${PRODUCT_NAME}.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME} (x64)" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" '"$INSTDIR\${PRODUCT_NAME}.exe" --uninstall' + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "InstallLocation" "$INSTDIR" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "Publisher" "Carriez, Inc." + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "HelpLink" "https://www.rustdesk.com/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "URLInfoAbout" "https://www.rustdesk.com/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "URLUpdateInfo" "https://www.rustdesk.com/" + + nsExec::Exec "taskkill /F /IM ${PRODUCT_NAME}.exe" + Sleep 500 ; Give time for process to be completely killed + File "${PRODUCT_NAME}.exe" + + SetShellVarContext all + CreateShortCut "$INSTDIR\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "--uninstall" "msiexec.exe" + CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall ${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "--uninstall" "msiexec.exe" + CreateShortCut "$SMSTARTUP\${PRODUCT_NAME} Tray.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" "--tray" + + nsExec::Exec 'sc create ${PRODUCT_NAME} start=auto DisplayName="${PRODUCT_NAME} Service" binPath= "\"$INSTDIR\${PRODUCT_NAME}.exe\" --service"' + nsExec::Exec 'netsh advfirewall firewall add rule name="${PRODUCT_NAME} Service" dir=in action=allow program="$INSTDIR\${PRODUCT_NAME}.exe" enable=yes' + nsExec::Exec 'sc start ${PRODUCT_NAME}' +SectionEnd + +#################################################################### +# Functions + +Function .onInit + # RustDesk is 64-bit only + ${IfNot} ${RunningX64} + MessageBox MB_ICONSTOP "${PRODUCT_NAME} is 64-bit only!" + Quit + ${EndIf} + ${DisableX64FSRedirection} + SetRegView 64 + + !insertmacro MUI_LANGDLL_DISPLAY +FunctionEnd + +Function CreateDesktopShortcut + CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe" +FunctionEnd diff --git a/src/tray-icon.ico b/res/tray-icon.ico similarity index 100% rename from src/tray-icon.ico rename to res/tray-icon.ico diff --git a/src/tray.rs b/src/tray.rs index 6b5ab388c..d29bfc7f2 100644 --- a/src/tray.rs +++ b/src/tray.rs @@ -18,7 +18,7 @@ enum Events { pub fn start_tray(options: Arc>>) { let event_loop = EventLoop::::with_user_event(); let proxy = event_loop.create_proxy(); - let icon = include_bytes!("./tray-icon.ico"); + let icon = include_bytes!("../res/tray-icon.ico"); let mut tray_icon = TrayIconBuilder::new() .sender_winit(proxy) .icon_from_buffer(icon)