Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy Speckle references only if Speckle is not installed #93

Open
alelom opened this issue Jun 5, 2020 · 3 comments
Open

Copy Speckle references only if Speckle is not installed #93

alelom opened this issue Jun 5, 2020 · 3 comments
Assignees
Labels
type:feature New capability or enhancement

Comments

@alelom
Copy link
Member

alelom commented Jun 5, 2020

Description:

Speckle_Toolkits references the nuget of SpeckleCore to work. BHoM therefore need to have SpeckleCore loaded in the UI when using the Speckle_Toolkit (e.g. Grasshopper has to load it).

For this to happen, we need to make sure that the SpeckleCore.dll will be loaded from the UI, so it should be placed in the BHoM folder where it can be loaded from.

However, if Speckle is installed, the UI (e.g. Grasshopper) will try to load another SpeckleCore.dll from the Speckle installation folder. This creates a conflicting reference.

When Speckle is not installed, this problem does not exist; additionally, it is desirable for the Speckle_Toolkit to work without requiring the user to install Speckle separately, as the Toolkit will now include all that is needed for operating Speckle.

This can be solved by selectively copying the dlls from the Speckle_Toolkit to the BHoM Assembly folder. We need to check if Speckle is installed; if it is, SpeckleCore.dll should not be copied.

After BHoM/admin#5 and #92 , this will be possible.

The same for SpeckleCoreGeometry.dll.

@alelom alelom added the type:feature New capability or enhancement label Jun 5, 2020
@alelom alelom self-assigned this Jun 5, 2020
@alelom
Copy link
Member Author

alelom commented Jun 5, 2020

Added question in Speckle forum to understand best way to check if speckle is installed: https://discourse.speckle.works/t/check-if-speckle-is-installed/611

@alelom
Copy link
Member Author

alelom commented Jun 5, 2020

The answer seems to be to check at least one of the following:

  1. If %localappdata%\Speckle and its contents exist - after uninstalling Speckle this actually disapperars, so this is a valid option.
  2. If there is a registry key in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\{BA3A01AA-F70D-4747-AA0E-E93F38C793C8}_is1 – did not check its validity after uninstall.
  3. If SpeckleCache.db exists in %localappdata%\SpeckleSettings --> after uninstalling Speckle this persists - no good.

@alelom alelom changed the title Implement selective copy of assemblies Copy Speckle references only if Speckle is not installed Jun 5, 2020
@alelom
Copy link
Member Author

alelom commented Jun 5, 2020

In #91 I implemented the option number 1.

  1. If %localappdata%\Speckle and its contents exist - after uninstalling Speckle this actually disapperars, so this is a valid option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant