forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install user components on startup; Install KBFS later (keybase#7733)
* Install user components (only) on startup * Exit with non-zero code on install error * Use go install path exclusively; Allow mount-type none * Fuse status and install from RPC folders tab * Fix install helper CLI missing * Install result, progress indicators * Auto install based on fuse status * Default non-darwin methods for service compile * Move CLI uninstall last * Fix dead code * Uninstall KBFS rpc * Install option for /etc/paths.d in native installer Instead of CLI, which is handled by go install package. Also remove install all option which is ununsed and not entirely accurate (it's not all). * Upgrade fuse to 3.6.3 * Update Xcode instructions * Install banner * Security prefs UI * Break up into install fuse, load kext, install KBFS * Return specific fuse status error codes * Have to load kext to get perm error later * Need to load kext after install to trigger system policy block * Don't want Quit dialog on error * Fuse install with kextPermissionRequired status * Set permission error * Kext error from install * Load kext on install * Remove unused loadFuseKext * Refresh fuse status on focus if in secprefs * Finish install after kextStarting * Update DMG background * Install everything is Fuse is installed * Underline properly even in widget * Handle general Fuse kext error * Update comment * Uninstall KBFS impl * Install/uninstall CLI privileged * Fix compile * Fix installing indication * Change some text on uninstall, move open link * Remove progress indicator * Don't show banner in small mode * Wait for mount and open after install * Wait for mount, show progress * Back button instead of close * Open after KBFS install (show progress) * Change uninstall wording * Set opening before finished * Un-stale protocol * Open in KBFS on link click * Parse and handle install errors in app * Fix comment * Install docs * Update docs * Diagram for installer * Install CLI privileged on CLI error * Don't uninstall cli paths by default * Remove test code * Move CLI to last * Fix links * Type the actions * Rename to getFuseStatus * Use compose branch for Banner * Fix action is method * Needs to call saga * Fuse status update saga * Fix saga getting canceled * Move fuse status to promise all * Type actions * Remove existing /usr/local/bin/keybase * Ensure that it is a link and resolves correctly for installed * Overwrite non-symlink on cli install Do Windows version of split install
- Loading branch information
Showing
92 changed files
with
2,100 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2015 Keybase, Inc. All rights reserved. Use of | ||
// this source code is governed by the included BSD license. | ||
|
||
// +build !darwin,!windows | ||
|
||
package install | ||
|
||
import "github.com/keybase/client/go/protocol/keybase1" | ||
|
||
func KeybaseFuseStatus(bundleVersion string, log Log) keybase1.FuseStatus { | ||
return keybase1.FuseStatus{} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2015 Keybase, Inc. All rights reserved. Use of | ||
// this source code is governed by the included BSD license. | ||
|
||
// +build windows | ||
|
||
package install | ||
|
||
import ( | ||
"github.com/keybase/client/go/protocol/keybase1" | ||
"golang.org/x/sys/windows/registry" | ||
) | ||
|
||
func KeybaseFuseStatus(bundleVersion string, log Log) keybase1.FuseStatus { | ||
status := keybase1.FuseStatus{} | ||
if checkKeybaseDokanCodes(log) { | ||
status.InstallStatus = keybase1.InstallStatus_INSTALLED | ||
status.InstallAction = keybase1.InstallAction_NONE | ||
status.KextStarted = true | ||
} else { | ||
status.InstallStatus = keybase1.InstallStatus_NOT_INSTALLED | ||
status.InstallAction = keybase1.InstallAction_INSTALL | ||
} | ||
return status | ||
} | ||
|
||
func checkKeybaseDokanCodes(log Log) bool { | ||
foundDokan, err := checkRegistryKeybaseDokan("DOKANPRODUCT64", log) | ||
if !foundDokan || err != nil { | ||
foundDokan, err = checkRegistryKeybaseDokan("DOKANPRODUCT86", log) | ||
} | ||
if err != nil { | ||
log.Errorf("checkKeybaseDokanCodes error: %v", err.Error()) | ||
} | ||
return foundDokan | ||
} | ||
|
||
// Our installer writes the dokan product codes to our registry location, | ||
// which we can then look for in the list of windows uninstall keys. | ||
// Another alternative might be to look for %windir%\system32\dokan1.dll | ||
func checkRegistryKeybaseDokan(productIDKey string, log Log) (bool, error) { | ||
k, err := registry.OpenKey(registry.CURRENT_USER, `SOFTWARE\Keybase\Keybase\`, registry.QUERY_VALUE|registry.WOW64_64KEY) | ||
if err != nil { | ||
return false, err | ||
} | ||
defer k.Close() | ||
productID, _, err := k.GetStringValue(productIDKey) | ||
if err != nil { | ||
return false, err | ||
} | ||
log.Info("CheckRegistryKeybaseDokan: Searching registry for %s", productID) | ||
if productID == "" { | ||
log.Info("CheckRegistryKeybaseDokan: Empty product ID, returning false") | ||
return false, err | ||
} | ||
k2, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\`+productID, registry.QUERY_VALUE|registry.WOW64_64KEY) | ||
if err == nil { | ||
return true, nil | ||
} | ||
defer k2.Close() | ||
return false, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.