diff --git a/lib/app/home/data/home_repository.dart b/lib/app/home/data/home_repository.dart index b764242..4e393d3 100644 --- a/lib/app/home/data/home_repository.dart +++ b/lib/app/home/data/home_repository.dart @@ -44,7 +44,9 @@ class HomeRepository { } catch (e) { prettyLog( value: - "Couldn't detect 'wmctrl' on this computer, APP FLEET WONT BE ABLE TO SWITCH WORKSPACES !!!", + "Couldn't detect `wmctrl` on PATH, APP FLEET WONT BE ABLE TO SWITCH WORKSPACES !!!" + "\nIf you are on a debian based distro, or have access to the apt or dnf package manager, " + "try running `sudo apt install wmctrl` or `sudo dnf install wmctrl`.", type: DebugType.error, ); result = false; diff --git a/lib/config/assets/generators/linux_app_finder.dart b/lib/config/assets/generators/linux_app_finder.dart index 23af159..05520bb 100644 --- a/lib/config/assets/generators/linux_app_finder.dart +++ b/lib/config/assets/generators/linux_app_finder.dart @@ -27,12 +27,19 @@ class LinuxAppFinder { prettyLog(tag: "LinuxAppFinder", value: "Loading Apps ..."); // Finding Global Applications - _addAppsFrom('/usr/local/share/applications', onNotExistEvent: () { + _addAppsFrom('/usr/share/applications', onNotExistEvent: () { prettyLog( tag: "LinuxAppFinder", value: "Unable to find any global applications ..."); }); + // Finding User Applications + _addAppsFrom('/usr/local/share/applications', onNotExistEvent: () { + prettyLog( + tag: "LinuxAppFinder", + value: "Unable to find any user applications ..."); + }); + // Finding Local Snap Applications _addAppsFrom('${Platform.environment['HOME']}/.local/share/applications', onNotExistEvent: () { @@ -74,6 +81,15 @@ class LinuxAppFinder { } void _cacheIcons() { + _cacheFrom( + '/usr/share/icons', + onNotExistEvent: () { + prettyLog( + value: "No Global Icons Directory found", + type: DebugType.error, + ); + }, + ); _cacheFrom( '/usr/local/share/icons', onNotExistEvent: () { @@ -150,13 +166,27 @@ class LinuxAppFinder { bool found = icon.contains('/'); bool foundInPixmaps = false; if (!found) { - Directory pixmapsDir = Directory('/usr/local/share/pixmaps'); - var icons = pixmapsDir.listSync(); - for (var entity in icons) { - if (entity.path.contains("/$icon.")) { - icon = entity.path; - foundInPixmaps = true; - break; + Directory userPixmapsDir = Directory('/usr/local/share/pixmaps'); + if(userPixmapsDir.existsSync()) { + var icons = userPixmapsDir.listSync(); + for (var entity in icons) { + if (entity.path.contains("/$icon.")) { + icon = entity.path; + foundInPixmaps = true; + break; + } + } + } else { + Directory globalPixmapsDir = Directory('/usr/share/pixmaps'); + if(globalPixmapsDir.existsSync()) { + var icons = globalPixmapsDir.listSync(); + for (var entity in icons) { + if (entity.path.contains("/$icon.")) { + icon = entity.path; + foundInPixmaps = true; + break; + } + } } } } @@ -227,7 +257,7 @@ class LinuxAppFinder { } bool checkImageValidity(path) { - return !path.endsWith(".xpm"); + return !path.endsWith(".xpm") && !path.endsWith(".svgz"); } String? getSystemIconThemeSync() { diff --git a/lib/constants/app_meta_info.dart b/lib/constants/app_meta_info.dart index 2801c2b..c3c5f78 100644 --- a/lib/constants/app_meta_info.dart +++ b/lib/constants/app_meta_info.dart @@ -1,7 +1,7 @@ class AppMetaInfo { AppMetaInfo._(); - static const version = "v1.0.2+1"; + static const version = "v1.0.3+1"; static const sourceCodeUrl = "https://github.com/omegaui/app-fleet"; static const releasePageUrl = "https://github.com/omegaui/app-fleet/releases/latest"; diff --git a/lib/utils/show_missing_component_dialog.dart b/lib/utils/show_missing_component_dialog.dart index cad584b..3af734b 100644 --- a/lib/utils/show_missing_component_dialog.dart +++ b/lib/utils/show_missing_component_dialog.dart @@ -60,7 +60,7 @@ void showMissingComponentDialog(BuildContext context) async { style: AppTheme.fontSize(12).makeBold(), ), Text( - "couldn't switch workspaces", + "cannot switch workspaces", style: AppTheme.fontSize(12).makeBold(), ), const SizedBox(height: 5), diff --git a/package/build-bundle.sh b/package/build-bundle.sh index 9bea62b..48a360f 100755 --- a/package/build-bundle.sh +++ b/package/build-bundle.sh @@ -1,7 +1,13 @@ #!/bin/bash +# Requires Flutter 3.13.7 or any compatible version +# Replace [flutter] with the exact path of the sdk if you have +# more than one flutter sdk versions installed. cd .. +echo "Do you have more than one flutter sdk installed? Or Does your SDK version is greater than 3.13.7? then, in that case, please make sure you check 'package/build-bundle.sh' file." +echo "Press any key to continue with building using the default Flutter SDK ..." +read echo "> Building Linux Bundle ..." -flutter build linux --release +/home/omegaui/dev/tools/flutter/bin/flutter build linux --release echo "> Removing Old Bundle ..." rm -rf package/integration/bundle/* echo "> Copying Bundle ..." diff --git a/package/integration/bundle/app-fleet b/package/integration/bundle/app-fleet index 498b133..170c625 100755 Binary files a/package/integration/bundle/app-fleet and b/package/integration/bundle/app-fleet differ diff --git a/package/integration/bundle/lib/libapp.so b/package/integration/bundle/lib/libapp.so index ea9cf5c..6e2f949 100644 Binary files a/package/integration/bundle/lib/libapp.so and b/package/integration/bundle/lib/libapp.so differ diff --git a/package/integration/bundle/lib/libbitsdojo_window_linux_plugin.so b/package/integration/bundle/lib/libbitsdojo_window_linux_plugin.so index 841faad..d14513c 100644 Binary files a/package/integration/bundle/lib/libbitsdojo_window_linux_plugin.so and b/package/integration/bundle/lib/libbitsdojo_window_linux_plugin.so differ diff --git a/package/integration/bundle/lib/liburl_launcher_linux_plugin.so b/package/integration/bundle/lib/liburl_launcher_linux_plugin.so index 9c59343..3cc4764 100644 Binary files a/package/integration/bundle/lib/liburl_launcher_linux_plugin.so and b/package/integration/bundle/lib/liburl_launcher_linux_plugin.so differ