Skip to content

Commit

Permalink
Merge pull request #26 from omegaui/v1.0.3+1-source
Browse files Browse the repository at this point in the history
Fix #25, Added Shell Script usage notices, Bumping (v1.0.3+1)
  • Loading branch information
omegaui authored Nov 22, 2024
2 parents 20d7443 + 93530d6 commit eb1c442
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 13 deletions.
4 changes: 3 additions & 1 deletion lib/app/home/data/home_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
48 changes: 39 additions & 9 deletions lib/config/assets/generators/linux_app_finder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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: () {
Expand Down Expand Up @@ -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: () {
Expand Down Expand Up @@ -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;
}
}
}
}
}
Expand Down Expand Up @@ -227,7 +257,7 @@ class LinuxAppFinder {
}

bool checkImageValidity(path) {
return !path.endsWith(".xpm");
return !path.endsWith(".xpm") && !path.endsWith(".svgz");
}

String? getSystemIconThemeSync() {
Expand Down
2 changes: 1 addition & 1 deletion lib/constants/app_meta_info.dart
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/show_missing_component_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
8 changes: 7 additions & 1 deletion package/build-bundle.sh
Original file line number Diff line number Diff line change
@@ -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 ..."
Expand Down
Binary file modified package/integration/bundle/app-fleet
Binary file not shown.
Binary file modified package/integration/bundle/lib/libapp.so
Binary file not shown.
Binary file modified package/integration/bundle/lib/libbitsdojo_window_linux_plugin.so
Binary file not shown.
Binary file modified package/integration/bundle/lib/liburl_launcher_linux_plugin.so
Binary file not shown.

0 comments on commit eb1c442

Please sign in to comment.