Skip to content

Commit 2f9ae66

Browse files
authored
feat: ipfs on PATH on runtime (#906)
License: MIT Signed-off-by: Henrique Dias <[email protected]>
1 parent c2e2ba4 commit 2f9ae66

File tree

24 files changed

+365
-342
lines changed

24 files changed

+365
-342
lines changed

assets/bin-win/ipfs.cmd

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/bin/ipfs.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

assets/build/after-install.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

assets/build/after-remove.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

assets/build/nsis.nsh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
ManifestDPIAware true
22

3-
!include "path.nsh"
4-
53
!macro AddToShellSpecific Where
64
DeleteRegKey SHELL_CONTEXT "Software\Classes\${Where}\shell\ipfs-desktop"
75
WriteRegStr SHELL_CONTEXT "Software\Classes\${Where}\shell\ipfs-desktop" "MUIVerb" "Add to IPFS"
@@ -30,9 +28,6 @@ ManifestDPIAware true
3028
!insertmacro AddProtocolHandler "ipns" "IPNS"
3129
!insertmacro AddProtocolHandler "dweb" "DWEB"
3230
!insertmacro AddToShell
33-
34-
Push "${PROJECT_DIR}\assets\bin-win"
35-
Call AddToPath
3631
!macroend
3732

3833
!macro customUnInstall
@@ -42,7 +37,4 @@ ManifestDPIAware true
4237
DeleteRegKey SHELL_CONTEXT "Software\Classes\ipns"
4338
DeleteRegKey SHELL_CONTEXT "Software\Classes\ipfs"
4439
DeleteRegKey SHELL_CONTEXT "Software\Classes\dweb"
45-
46-
Push "${PROJECT_DIR}\assets\bin-win"
47-
Call un.RemoveFromPath
4840
!macroend

assets/build/path.nsh

Lines changed: 0 additions & 179 deletions
This file was deleted.

assets/locales/en.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,18 @@
4242
"runningLatestVersion": "You seem to be running the latest version.",
4343
"couldNotCheckForUpdates": "Could not check for updates",
4444
"pleaseCheckInternet": "Please check your Internet connection.",
45-
"checkForUpdates": "Check for Updates..."
45+
"checkForUpdates": "Check for Updates...",
46+
"yes": "Yes",
47+
"no": "No",
48+
"close": "Close",
49+
"reportTheError": "Report the error",
50+
"openLogs": "Open logs",
51+
"anErrorHasOccurred": "An error has occurred",
52+
"anUnexpectedErrorHasOccurred": "An error occurred but it does not prevent the execution of IPFS Desktop. You can either inspect the logs for yourself or report the error to the developers.",
53+
"ipfsCommandLineTools": "IPFS command line tools",
54+
"ipfsCommandLineToolsWindows": "We detected you already have the IPFS command line tools on your PATH. IPFS Desktop can pre-prepend its tools to the PATH and keep them up to date. Do you agree?",
55+
"ipfsCommandLineToolsAlreadyExists": "IPFS Desktop detected you already have IPFS CLI installed. We can replace the existing ipfs command installed at /usr/local/bin/ipfs, and update it when new versions are available. Do you agree?",
56+
"ipfsCommandLineToolsNotExists": "IPFS Desktop can keep the IPFS command-line interface (CLI) up to date. It will be installed at /usr/local/bin/ipfs. Do you agree?",
57+
"polkitNotFound": "IPFS can't be added to /usr/local/bin/ without polkit agent.",
58+
"noPermission": "IPFS couldn't be added to /usr/local/bin/, either because you entered the wrong password, or you denied permission."
4659
}

electron-builder.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ appId: io.ipfs.desktop
33
directories:
44
buildResources: assets/build
55

6-
extraResources:
7-
- from: "assets/bin"
8-
to: "bin"
9-
filter:
10-
- "**/*"
6+
asarUnpack: 'out/**/scripts/**/*'
117

128
mac:
139
category: public.app-category.utilities
@@ -46,18 +42,8 @@ linux:
4642
- rpm
4743
- snap
4844

49-
rpm:
50-
fpm:
51-
- "--after-install=assets/build/after-install.sh"
52-
- "--after-remove=assets/build/after-remove.sh"
53-
54-
deb:
55-
afterInstall: assets/build/after-install.sh
56-
afterRemove: assets/build/after-remove.sh
57-
5845
snap:
5946
confinement: strict
60-
hooks: assets/build/snap-hooks
6147
plugs:
6248
- default
6349
- network

0 commit comments

Comments
 (0)