Skip to content

Commit eb1c442

Browse files
authored
Merge pull request #26 from omegaui/v1.0.3+1-source
Fix #25, Added Shell Script usage notices, Bumping (v1.0.3+1)
2 parents 20d7443 + 93530d6 commit eb1c442

File tree

9 files changed

+51
-13
lines changed

9 files changed

+51
-13
lines changed

lib/app/home/data/home_repository.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ class HomeRepository {
4444
} catch (e) {
4545
prettyLog(
4646
value:
47-
"Couldn't detect 'wmctrl' on this computer, APP FLEET WONT BE ABLE TO SWITCH WORKSPACES !!!",
47+
"Couldn't detect `wmctrl` on PATH, APP FLEET WONT BE ABLE TO SWITCH WORKSPACES !!!"
48+
"\nIf you are on a debian based distro, or have access to the apt or dnf package manager, "
49+
"try running `sudo apt install wmctrl` or `sudo dnf install wmctrl`.",
4850
type: DebugType.error,
4951
);
5052
result = false;

lib/config/assets/generators/linux_app_finder.dart

+39-9
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,19 @@ class LinuxAppFinder {
2727
prettyLog(tag: "LinuxAppFinder", value: "Loading Apps ...");
2828

2929
// Finding Global Applications
30-
_addAppsFrom('/usr/local/share/applications', onNotExistEvent: () {
30+
_addAppsFrom('/usr/share/applications', onNotExistEvent: () {
3131
prettyLog(
3232
tag: "LinuxAppFinder",
3333
value: "Unable to find any global applications ...");
3434
});
3535

36+
// Finding User Applications
37+
_addAppsFrom('/usr/local/share/applications', onNotExistEvent: () {
38+
prettyLog(
39+
tag: "LinuxAppFinder",
40+
value: "Unable to find any user applications ...");
41+
});
42+
3643
// Finding Local Snap Applications
3744
_addAppsFrom('${Platform.environment['HOME']}/.local/share/applications',
3845
onNotExistEvent: () {
@@ -74,6 +81,15 @@ class LinuxAppFinder {
7481
}
7582

7683
void _cacheIcons() {
84+
_cacheFrom(
85+
'/usr/share/icons',
86+
onNotExistEvent: () {
87+
prettyLog(
88+
value: "No Global Icons Directory found",
89+
type: DebugType.error,
90+
);
91+
},
92+
);
7793
_cacheFrom(
7894
'/usr/local/share/icons',
7995
onNotExistEvent: () {
@@ -150,13 +166,27 @@ class LinuxAppFinder {
150166
bool found = icon.contains('/');
151167
bool foundInPixmaps = false;
152168
if (!found) {
153-
Directory pixmapsDir = Directory('/usr/local/share/pixmaps');
154-
var icons = pixmapsDir.listSync();
155-
for (var entity in icons) {
156-
if (entity.path.contains("/$icon.")) {
157-
icon = entity.path;
158-
foundInPixmaps = true;
159-
break;
169+
Directory userPixmapsDir = Directory('/usr/local/share/pixmaps');
170+
if(userPixmapsDir.existsSync()) {
171+
var icons = userPixmapsDir.listSync();
172+
for (var entity in icons) {
173+
if (entity.path.contains("/$icon.")) {
174+
icon = entity.path;
175+
foundInPixmaps = true;
176+
break;
177+
}
178+
}
179+
} else {
180+
Directory globalPixmapsDir = Directory('/usr/share/pixmaps');
181+
if(globalPixmapsDir.existsSync()) {
182+
var icons = globalPixmapsDir.listSync();
183+
for (var entity in icons) {
184+
if (entity.path.contains("/$icon.")) {
185+
icon = entity.path;
186+
foundInPixmaps = true;
187+
break;
188+
}
189+
}
160190
}
161191
}
162192
}
@@ -227,7 +257,7 @@ class LinuxAppFinder {
227257
}
228258

229259
bool checkImageValidity(path) {
230-
return !path.endsWith(".xpm");
260+
return !path.endsWith(".xpm") && !path.endsWith(".svgz");
231261
}
232262

233263
String? getSystemIconThemeSync() {

lib/constants/app_meta_info.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class AppMetaInfo {
22
AppMetaInfo._();
33

4-
static const version = "v1.0.2+1";
4+
static const version = "v1.0.3+1";
55
static const sourceCodeUrl = "https://github.com/omegaui/app-fleet";
66
static const releasePageUrl =
77
"https://github.com/omegaui/app-fleet/releases/latest";

lib/utils/show_missing_component_dialog.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void showMissingComponentDialog(BuildContext context) async {
6060
style: AppTheme.fontSize(12).makeBold(),
6161
),
6262
Text(
63-
"couldn't switch workspaces",
63+
"cannot switch workspaces",
6464
style: AppTheme.fontSize(12).makeBold(),
6565
),
6666
const SizedBox(height: 5),

package/build-bundle.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/bin/bash
2+
# Requires Flutter 3.13.7 or any compatible version
3+
# Replace [flutter] with the exact path of the sdk if you have
4+
# more than one flutter sdk versions installed.
25
cd ..
6+
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."
7+
echo "Press any key to continue with building using the default Flutter SDK ..."
8+
read
39
echo "> Building Linux Bundle ..."
4-
flutter build linux --release
10+
/home/omegaui/dev/tools/flutter/bin/flutter build linux --release
511
echo "> Removing Old Bundle ..."
612
rm -rf package/integration/bundle/*
713
echo "> Copying Bundle ..."

package/integration/bundle/app-fleet

-592 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)