BHoM / Dynamo_UI

Tools for Dynamo
GNU Lesser General Public License v3.0
8 stars 6 forks source link

Modify DynamoSettings.xml at build to point to ProgramData/BHoM #240

Closed adecler closed 4 years ago

adecler commented 4 years ago

Issues addressed by this PR

Closes #239

Now only copy the Dynamo toolkit specific dlls to Roaming and modifies DynamoSettings.xml to inlcude ProgramData/BHoM in the list of custom package folders.

Test files

After cleaning ALL your BHoM folders inside Dynamo/Roaming, and recompiling, make sure BHoM still works in Dynamo for all versions of core and revit.

FraserGreenroyd commented 4 years ago

I have followed the above but cannot get BHoM to show up in Dynamo sandbox or Dynamo Revit, I don't know if this is my machine to this PR so am holding off requesting changes yet.

I can confirm I can see the ProgramData link appear in the CustomPackageFolders of the XML files for each though, so that part has worked.

I also have a question, which may require more testing to confirm, which is whether we need a PR on the installer to remove installing the DLLs to Dynamo's folder if this PR works. I suspect we might need to test this PR without clearing the folders to see how it behaves as to whether the installer could update after this PR or not?

adecler commented 4 years ago

@FraserGreenroyd ,

Some extra tests I did right now:

adecler commented 4 years ago

This should now be resolved next quarter as it only partially solves the problem.

pawelbaran commented 4 years ago

@adecler is that something I could work in parallel with the UI refactoring? I could capture the following:

adecler commented 4 years ago

@pawelbaran , I am afraid not. https://github.com/BHoM/Dynamo_Toolkit/pull/255 is changing pretty much every single file. What can be done though is making the change directly on that PR itself. Happy for you to have a go if you want.

pawelbaran commented 4 years ago

Oke, in such case I will prototype locally and try to coordinate with you once I make it work. Thanks!

pawelbaran commented 4 years ago

@adecler I just gave it a shot and copied the assemblies related to Dynamo UI to BHoM folder:

image image

Then I added the following line in %appdata\Dynamo\Dynamo Revit\2.X\DynamoSettings.xml, same for both 2.0 and 2.3: image

And BHoM got loaded to Dynamo, but without anything happening on BHoM button click. I guess that is because only _DynamoEngine.dll and _DynamoUI.dll get loaded atm resulting in empty buttons.

To sum up: it seems that it should be possible to centralise Dynamo UI in the BHoM\Assemblies folder, but we would need to make sure the assemblies from the central folder get loaded correctly on the UI startup. Not sure what would be the best approach here:

It needs to be further investigated - I did not go deeper bearing in mind that you are planning to refactor the Dynamo UI - I hope the above will help with that.

adecler commented 4 years ago

Now superseded by #267