BHoM / Sofistik_Toolkit

GNU Lesser General Public License v3.0
2 stars 0 forks source link

Installation of Sofistik_BHoM toolkit #2

Open MSA4253 opened 10 months ago

MSA4253 commented 10 months ago

How can I clone and Complie Sofistik_BHoM Toolkit? According to my understanding we need .dll file in assemblies Folder to create a link with a method. Anyone knows how to get those files or how to run this toolkit. Your help will be much appreciated.

FraserGreenroyd commented 10 months ago

Hi @MSA4253 do you have the BHoM installed to begin with? If not, I recommend taking the latest beta to start with as that will give you all the pre-requisite DLLs needed (including the Grasshopper links, Excel links, etc.) to expose BHoM into those UIs.

After that, you should just need to compile this toolkit on top of that installer, and that should then make it available within your chosen UI. I'll just double check the project files though and make sure they're set up to put the DLL correctly - give me a couple mins!

FraserGreenroyd commented 10 months ago

Ok I checked and all 3 project files have <Exec Command="xcopy &quot;$(TargetDir)$(TargetFileName)&quot; &quot;C:\ProgramData\BHoM\Assemblies&quot; /Y" /> which is the command needed to place the DLLs into the %ProgramData/BHoM/Assemblies for exposure via a BHoM UI.

However, they do all have references set to the C:\ rather than $(ProgramData) (which was a recent(ish) change - so if you don't have a C:\ that might cause issues on compiling.

If so, let me know and I can update the references quickly on this toolkit to be compliant to our new guidance for greater adoption 😄

To answer the original question of cloning and compiling - I would recommend using a Git tool of some kind, either GitHub desktop or Git bash (the latter is a command line interface, the former a GUI). If you want to use the CLI, then the command would be git clone https://github.com/BHoM/Sofistik_Toolki.git - you can copy/paste that in and it should work.

Compiling is then best done with Visual Studio, available from Microsoft - this is an Open Source project so community should be ok (but please check the licence terms as appropriate, I cannot offer guidance on the best version to use, but any of the latest available should be good enough), and just open the .sln file (Sofistik_Toolkit.sln) and do a full rebuild (top tab, build -> rebuild) to get the code to compile and enter your %ProgramData/BHoM/Assemblies folder.

Hope that all makes sense - please reach out if you have more questions, feel free to tag me directly or my email is on my GitHub profile 😄

MSA4253 commented 10 months ago

I am a frequent user of BHoM tool. But i never tried this kind of compilation that is why i was confused. Will it be possible for you to directly provide the .dll files so that i can paste in the assemblies folder.

FraserGreenroyd commented 10 months ago

Gimme a few mins and I'll give it a try 😄

FraserGreenroyd commented 10 months ago

Sofistik_Toolkit.zip

Give this a try - this should contain Sofistik_oM, Sofistik_Engine, and Sofistic_Adapter built against today's alpha.

MSA4253 commented 10 months ago

@FraserGreenroyd thanks for providing the files. I have set up every thing but i cant find the component related to sofistik

FraserGreenroyd commented 10 months ago

@MSA4253 it looks like it might be reading DLLs that need including that I don't have access to - looking at the code here it's using DLLImport in a fair few places. It might be that this toolkit hasn't finished being developed, it's not on my list of toolkits for beta or alpha inclusion so it may be that the functionality hasn't been developed very far. We can ping @felipebandeiramm and @jukkasus as contributors but it doesn't look very busy on the branches either so it may be this was an experiment that didn't go very far possibly?

Unfortunately I'm not a user of this toolkit so can't help if the components don't show up, though it could be based on what the code was compiled against, I'm running off of today's alpha which may not be compatible with the latest beta if that's what you're on. It's probably best if you get Visual Studio and compile the code locally, then you'll be able to debug in detail through any issues with the code execution possibly?

MSA4253 commented 10 months ago

Let me try. Thanks for your response