Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 62 additions & 21 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,30 @@
"node_modules/keytar",
"node_modules/sqlite3"
],
"protocols": [{
"name": "RedisInsight",
"role": "Viewer",
"schemes": ["redisinsight"]
}
"protocols": [
{
"name": "RedisInsight",
"role": "Viewer",
"schemes": [
"redisinsight"
]
}
],
"mac": {
"target": [
{
"target": "dmg",
"arch": ["x64", "arm64"]
"arch": [
"x64",
"arm64"
]
},
{
"target": "zip",
"arch": ["x64", "arm64"]
"arch": [
"x64",
"arm64"
]
}
],
"notarize": {
Expand All @@ -48,7 +57,9 @@
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
"entitlementsLoginHelper": "resources/entitlements.mas.loginhelper.plist",
"hardenedRuntime": false,
"asarUnpack": ["node_modules"],
"asarUnpack": [
"node_modules"
],
"provisioningProfile": "embedded.provisionprofile",
"binaries": [
"Contents/Resources/app-x64.asar.unpacked/node_modules/sqlite3/build/Release/node_sqlite3.node",
Expand All @@ -64,7 +75,9 @@
"entitlementsInherit": "resources/entitlements.mas.inherit.plist",
"entitlementsLoginHelper": "resources/entitlements.mas.loginhelper.plist",
"hardenedRuntime": false,
"asarUnpack": ["node_modules"],
"asarUnpack": [
"node_modules"
],
"provisioningProfile": "dev.provisionprofile",
"binaries": [
"Contents/Resources/app-x64.asar.unpacked/node_modules/sqlite3/build/Release/node_sqlite3.node",
Expand All @@ -89,7 +102,9 @@
]
},
"win": {
"target": ["nsis"],
"target": [
"nsis"
],
"artifactName": "Redis-Insight-${os}-installer.${ext}",
"icon": "resources/icon.ico",
"publisherName": [
Expand All @@ -107,19 +122,27 @@
"target": [
{
"target": "AppImage",
"arch": ["x64"]
"arch": [
"x64"
]
},
{
"target": "deb",
"arch": ["x64"]
"arch": [
"x64"
]
},
{
"target": "rpm",
"arch": ["x64"]
"arch": [
"x64"
]
},
{
"target": "snap",
"arch": ["x64"]
"arch": [
"x64"
]
}
],
"synopsis": "Redis GUI by Redis Ltd.",
Expand All @@ -131,13 +154,18 @@
"Comment": "Redis GUI by Redis Ltd"
}
},
"deb": {
"afterInstall": "scripts/deb-after-install.sh"
},
"snap": {
"plugs": [
"default",
"password-manager-service"
],
"confinement": "strict",
"stagePackages": ["default"]
"stagePackages": [
"default"
]
},
"flatpak": {
"runtimeVersion": "20.08",
Expand All @@ -151,7 +179,12 @@
"-Dgtk_doc=false",
"-Dintrospection=false"
],
"cleanup": ["/bin", "/include", "/lib/pkgconfig", "/share/man"],
"cleanup": [
"/bin",
"/include",
"/lib/pkgconfig",
"/share/man"
],
"sources": [
{
"type": "archive",
Expand Down Expand Up @@ -184,17 +217,23 @@
{
"from": "./redisinsight/api/static",
"to": "static",
"filter": ["**/*"]
"filter": [
"**/*"
]
},
{
"from": "./redisinsight/api/defaults",
"to": "defaults",
"filter": ["**/*"]
"filter": [
"**/*"
]
},
{
"from": "./redisinsight/api/data",
"to": "data",
"filter": ["**/*"]
"filter": [
"**/*"
]
},
{
"from": "LICENSE",
Expand All @@ -203,7 +242,9 @@
{
"from": "./resources/app",
"to": "./app",
"filter": ["**/*"]
"filter": [
"**/*"
]
}
]
}
}
31 changes: 31 additions & 0 deletions scripts/deb-after-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
set -ex

# Define paths
OLD_INSTALL_PATH="/opt/Redis Insight" # Path with space
NEW_INSTALL_PATH="/opt/redisinsight" # New path without space
DESKTOP_FILE="/usr/share/applications/redisinsight.desktop"

# Check if old directory exists and rename it
if [ -d "$OLD_INSTALL_PATH" ]; then
echo "Renaming $OLD_INSTALL_PATH to $NEW_INSTALL_PATH"
sudo mv "$OLD_INSTALL_PATH" "$NEW_INSTALL_PATH"
fi

# Update desktop file to use new path
if [ -f "$DESKTOP_FILE" ]; then
echo "Updating desktop file to use new path"
sudo sed -i "s|$OLD_INSTALL_PATH|$NEW_INSTALL_PATH|g" "$DESKTOP_FILE"
fi

# Update binary link
sudo ln -sf "$NEW_INSTALL_PATH/redisinsight" "/usr/bin/redisinsight"

# Set basic executable permissions
sudo chmod +x "$NEW_INSTALL_PATH/redisinsight"

# Set correct ownership and permissions for chrome-sandbox
sudo chown root:root "$NEW_INSTALL_PATH/chrome-sandbox"
sudo chmod 4755 "$NEW_INSTALL_PATH/chrome-sandbox"

echo "RedisInsight post-installation setup completed successfully"
Loading