Skip to content

Commit fa50a4f

Browse files
author
Kristiyan Ivanov
authored
RI-6527 Resolve an issue on Ubuntu with a space in a folder name && RI-6551 Resolve the app name issue for Debian (#4304)
* RI-6527 Resolve an issue on Ubuntu with a space in a folder name * RI-6551 Resolve the app name issue for Debian * RI-6527 Resolve an issue on Ubuntu with a space in a folder name. Updated based on PR feedback * RI-6527 Resolve an issue on Ubuntu with a space in a folder name && RI-6551 Resolve the app name issue for Debian * fixed chrome sandbox permissions
1 parent ecaf374 commit fa50a4f

File tree

2 files changed

+93
-21
lines changed

2 files changed

+93
-21
lines changed

electron-builder.json

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,30 @@
1313
"node_modules/keytar",
1414
"node_modules/sqlite3"
1515
],
16-
"protocols": [{
17-
"name": "RedisInsight",
18-
"role": "Viewer",
19-
"schemes": ["redisinsight"]
20-
}
16+
"protocols": [
17+
{
18+
"name": "RedisInsight",
19+
"role": "Viewer",
20+
"schemes": [
21+
"redisinsight"
22+
]
23+
}
2124
],
2225
"mac": {
2326
"target": [
2427
{
2528
"target": "dmg",
26-
"arch": ["x64", "arm64"]
29+
"arch": [
30+
"x64",
31+
"arm64"
32+
]
2733
},
2834
{
2935
"target": "zip",
30-
"arch": ["x64", "arm64"]
36+
"arch": [
37+
"x64",
38+
"arm64"
39+
]
3140
}
3241
],
3342
"notarize": {
@@ -48,7 +57,9 @@
4857
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
4958
"entitlementsLoginHelper": "resources/entitlements.mas.loginhelper.plist",
5059
"hardenedRuntime": false,
51-
"asarUnpack": ["node_modules"],
60+
"asarUnpack": [
61+
"node_modules"
62+
],
5263
"provisioningProfile": "embedded.provisionprofile",
5364
"binaries": [
5465
"Contents/Resources/app-x64.asar.unpacked/node_modules/sqlite3/build/Release/node_sqlite3.node",
@@ -64,7 +75,9 @@
6475
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
6576
"entitlementsLoginHelper": "resources/entitlements.mas.loginhelper.plist",
6677
"hardenedRuntime": false,
67-
"asarUnpack": ["node_modules"],
78+
"asarUnpack": [
79+
"node_modules"
80+
],
6881
"provisioningProfile": "dev.provisionprofile",
6982
"binaries": [
7083
"Contents/Resources/app-x64.asar.unpacked/node_modules/sqlite3/build/Release/node_sqlite3.node",
@@ -89,7 +102,9 @@
89102
]
90103
},
91104
"win": {
92-
"target": ["nsis"],
105+
"target": [
106+
"nsis"
107+
],
93108
"artifactName": "Redis-Insight-${os}-installer.${ext}",
94109
"icon": "resources/icon.ico",
95110
"publisherName": [
@@ -107,19 +122,27 @@
107122
"target": [
108123
{
109124
"target": "AppImage",
110-
"arch": ["x64"]
125+
"arch": [
126+
"x64"
127+
]
111128
},
112129
{
113130
"target": "deb",
114-
"arch": ["x64"]
131+
"arch": [
132+
"x64"
133+
]
115134
},
116135
{
117136
"target": "rpm",
118-
"arch": ["x64"]
137+
"arch": [
138+
"x64"
139+
]
119140
},
120141
{
121142
"target": "snap",
122-
"arch": ["x64"]
143+
"arch": [
144+
"x64"
145+
]
123146
}
124147
],
125148
"synopsis": "Redis GUI by Redis Ltd.",
@@ -131,13 +154,18 @@
131154
"Comment": "Redis GUI by Redis Ltd"
132155
}
133156
},
157+
"deb": {
158+
"afterInstall": "scripts/deb-after-install.sh"
159+
},
134160
"snap": {
135161
"plugs": [
136162
"default",
137163
"password-manager-service"
138164
],
139165
"confinement": "strict",
140-
"stagePackages": ["default"]
166+
"stagePackages": [
167+
"default"
168+
]
141169
},
142170
"flatpak": {
143171
"runtimeVersion": "20.08",
@@ -151,7 +179,12 @@
151179
"-Dgtk_doc=false",
152180
"-Dintrospection=false"
153181
],
154-
"cleanup": ["/bin", "/include", "/lib/pkgconfig", "/share/man"],
182+
"cleanup": [
183+
"/bin",
184+
"/include",
185+
"/lib/pkgconfig",
186+
"/share/man"
187+
],
155188
"sources": [
156189
{
157190
"type": "archive",
@@ -184,17 +217,23 @@
184217
{
185218
"from": "./redisinsight/api/static",
186219
"to": "static",
187-
"filter": ["**/*"]
220+
"filter": [
221+
"**/*"
222+
]
188223
},
189224
{
190225
"from": "./redisinsight/api/defaults",
191226
"to": "defaults",
192-
"filter": ["**/*"]
227+
"filter": [
228+
"**/*"
229+
]
193230
},
194231
{
195232
"from": "./redisinsight/api/data",
196233
"to": "data",
197-
"filter": ["**/*"]
234+
"filter": [
235+
"**/*"
236+
]
198237
},
199238
{
200239
"from": "LICENSE",
@@ -203,7 +242,9 @@
203242
{
204243
"from": "./resources/app",
205244
"to": "./app",
206-
"filter": ["**/*"]
245+
"filter": [
246+
"**/*"
247+
]
207248
}
208249
]
209-
}
250+
}

scripts/deb-after-install.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
# Define paths
5+
OLD_INSTALL_PATH="/opt/Redis Insight" # Path with space
6+
NEW_INSTALL_PATH="/opt/redisinsight" # New path without space
7+
DESKTOP_FILE="/usr/share/applications/redisinsight.desktop"
8+
9+
# Check if old directory exists and rename it
10+
if [ -d "$OLD_INSTALL_PATH" ]; then
11+
echo "Renaming $OLD_INSTALL_PATH to $NEW_INSTALL_PATH"
12+
sudo mv "$OLD_INSTALL_PATH" "$NEW_INSTALL_PATH"
13+
fi
14+
15+
# Update desktop file to use new path
16+
if [ -f "$DESKTOP_FILE" ]; then
17+
echo "Updating desktop file to use new path"
18+
sudo sed -i "s|$OLD_INSTALL_PATH|$NEW_INSTALL_PATH|g" "$DESKTOP_FILE"
19+
fi
20+
21+
# Update binary link
22+
sudo ln -sf "$NEW_INSTALL_PATH/redisinsight" "/usr/bin/redisinsight"
23+
24+
# Set basic executable permissions
25+
sudo chmod +x "$NEW_INSTALL_PATH/redisinsight"
26+
27+
# Set correct ownership and permissions for chrome-sandbox
28+
sudo chown root:root "$NEW_INSTALL_PATH/chrome-sandbox"
29+
sudo chmod 4755 "$NEW_INSTALL_PATH/chrome-sandbox"
30+
31+
echo "RedisInsight post-installation setup completed successfully"

0 commit comments

Comments
 (0)