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

netcore #2088

Open
wants to merge 99 commits into
base: develop
Choose a base branch
from
Open

netcore #2088

wants to merge 99 commits into from

Conversation

dosymep
Copy link
Member

@dosymep dosymep commented Feb 13, 2024

No description provided.

@dosymep dosymep mentioned this pull request Feb 13, 2024
6 tasks
@jmcouffin jmcouffin added the pyRevit 5 pyRevit 5 coming release label Feb 13, 2024
@dosymep
Copy link
Member Author

dosymep commented Feb 14, 2024

@eirannejad, I don't have libs on .NET Core

  • FileFormatWavefront.dll
  • Ifc.NET.dll
  • Ifc.NET.XmlSerializers.dll
  • Microsoft.WindowsAPICodePack.dll
  • Microsoft.WindowsAPICodePack.Shell.dll
  • pyRevitLabs.MahAppsMetro.dll (available alpha version)
  • PythonStubsBuilder.dll
  • Rhino3dmIO.dll
  • rhino3dmio_native.dll
  • MadMilkman.Ini
  • Expression.Blend.Sdk

@dosymep
Copy link
Member Author

dosymep commented Feb 15, 2024

  • transferred pyRevit paths to targets
  • added revit 2025 dependensis
  • added revit 2026-2025 docs (xml) (removed)
  • added revit 2025 project to pyRevit.Runtime
  • added revits preprocessor variables like this
  • added multitargets net48, net8.0
  • remove $(RevitVersion) from version pyRevitLoader

@dosymep
Copy link
Member Author

dosymep commented Feb 15, 2024

I think we need to divide projects into those that use Revit, just libraries, applications.
Transfer all libraries to nuget, thereby greatly simplifying the assembly of the solution.
Remove destination paths from the solution and compile using dotnet build -c Release -o "pyRevit/bin".

@dosymep dosymep marked this pull request as ready for review February 15, 2024 11:14
@dosymep dosymep marked this pull request as draft February 15, 2024 11:26
# Conflicts:
#	dev/pyRevitLoader/pyRevitLoader.2710.csproj
#	dev/pyRevitLoader/pyRevitLoader.273.csproj
#	dev/pyRevitLoader/pyRevitLoader.277.csproj
#	dev/pyRevitLoader/pyRevitLoader.278.csproj
#	dev/pyRevitLoader/pyRevitLoader.279.csproj
#	dev/pyRevitLoader/pyRevitRunner.2710.csproj
#	dev/pyRevitLoader/pyRevitRunner.273.csproj
#	dev/pyRevitLoader/pyRevitRunner.277.csproj
#	dev/pyRevitLoader/pyRevitRunner.278.csproj
#	dev/pyRevitLoader/pyRevitRunner.279.csproj
@jmcouffin jmcouffin marked this pull request as ready for review February 21, 2024 14:58
@dosymep
Copy link
Member Author

dosymep commented Jun 22, 2024

Yey)
https://github.com/dosymep/pyRevit/actions/runs/9627956343

@sanzoghenzo
Copy link
Contributor

Not so good here 😢
image

Still using Revit 2022 here.
The file cannot be found because it is in the bin\netfx\engines\IPY2712PR folder, and not in bin\netfx.
The same applies to System.Memory.dll

https://github.com/dosymep/pyRevit/blob/64b98f889549b3817c0ddea11381459f1c66c7c8/pyrevitlib/pyrevit/labs.py#L26-L31

I suppose these libraries were indeed in the bin folder, since the python code used the BIN_DIR to locate them.
Not sure if we should move the dlls or to change the path inside pyrevitlib with the currently running engine path.

Other observations:

  • if I build everything with pipenv run pyrevit build poducts, I got a lot of .pdb, .deps.json and documentation .xml files, can we get rid of them?
  • I also see non-windows, platform specific files in the bin\runtimes folder. They are not tracked, but the CI will add them to the code base if ther're not excluded in .gitignore; the best way would be not to build/copy them in the first place!
  • I see you already bumped the version to 5.0.0. This should be done automatically by the CI, so it's not needed (if I'm not mistaken)

@sanzoghenzo
Copy link
Contributor

I tried to comment out the library import, since it seems that it isn't used anywhere in the code base, and I stubled across the next issue:

image

The xml file gets called by ScriptConsole (I turned on verbose logging, so it gets executed right away) here:

https://github.com/dosymep/pyRevit/blob/64b98f889549b3817c0ddea11381459f1c66c7c8/dev/pyRevitLabs.PyRevit.Runtime/ScriptConsole.cs#L125-L127

But I cannot find the file anywhere in my working folder.

@dosymep
Copy link
Member Author

dosymep commented Jun 23, 2024

The xml file gets called by ScriptConsole

this file generates on build pyRevit.MahApps.Metro.csproj

@dosymep
Copy link
Member Author

dosymep commented Jun 23, 2024

if I build everything with pipenv run pyrevit build poducts, I got a lot of .pdb, .deps.json and documentation .xml files, can we get rid of them?

I think it’s worth deleting only the documentation, the rest of the files should be left (as long as we have alpha and beta at least, and always better)

I also see non-windows, platform specific files in the bin\runtimes folder. They are not tracked, but the CI will add them to the code base if ther're not excluded in .gitignore; the best way would be not to build/copy them in the first place!

they are copied automatically when the project is published, while I don’t know how to copy only Windows dependencies
I’m also thinking of completely clearing the bin folder so that it contains at most the necessary images and icons with configurations

I see you already bumped the version to 5.0.0. This should be done automatically by the CI, so it's not needed (if I'm not mistaken)

the build automatically makes the next version, i.e. you need to upgrade the major version yourself (well, as I understand it’s arranged in build scripts)

@jmcouffin
Copy link
Contributor

You are on fire @dosymep !

@sanzoghenzo
Copy link
Contributor

I’m also thinking of completely clearing the bin folder so that it contains at most the necessary images and icons with configurations

This will break the clones feature of pyrevit cli, that expect all the binaries to be present on the branch you're cloning.
But I'm on board with this, we should aim to a compiled plugin that doesn't need to be switched via git.
I suppose we need a broader discussion on what features we need/want to break in this new major version. Maybe the upcoming meeting or a dedicated issue here or on discourse.
(I was thinking about extracting the pyrevitlib and extension into 2 separate repositories, so that c# code

That said, with the latest changes to the _build.py nothing gets built, only the png files gets copied over

@sanzoghenzo
Copy link
Contributor

this file generates on build pyRevit.MahApps.Metro.csproj

Is it working for you? I still have the error message, if I open the dll with dotPeek I can't see the xaml files

image

If the files gets created on demand, then there's something wrong in our ScriptConsoleTemplate.SetupDynamicResources method....

BTW, if we want to keep the old theme, it should be Light.Steel.xaml 😉

@dosymep
Copy link
Member Author

dosymep commented Jun 24, 2024

@sanzoghenzo need to execute XamlColorSchemeGenerator on folder styles/themes
https://github.com/pyrevitlabs/MahApps.Metro/blob/pyrevit-main/src/MahApps.Metro/MahApps.Metro.csproj#L48

@danielraziel
Copy link

I just installed and ran into issue with 2025 and saw your amazing effort @dosymep
Bravo!

@danielraziel
Copy link

I'm so excited for installer to be able to use it! I haven't used pyrevit before, saw some videos on youtube and got disappointed when I realized it's not working on 2025...
any estimation on installer? I want it for custom patterns and my project deadline is 2 days from now :(

@jmcouffin
Copy link
Contributor

any estimation on installer? I want it for custom patterns and my project deadline is 2 days from now :(

no ETA for 2025
But you can use the tools in a previous version to create your patterns, save the file and open it in 2025

@danielraziel
Copy link

any estimation on installer? I want it for custom patterns and my project deadline is 2 days from now :(

no ETA for 2025 But you can use the tools in a previous version to create your patterns, save the file and open it in 2025

Thank you! I'll try to do that. I thought it would break the link or smth opening in newer version.

@sanzoghenzo
Copy link
Contributor

Hi, I've pushed the CPythonEngine edits.
As I wrote before, pythonNet doesn't need to be compiled for different python versions, so I moved with the rest of the libraries;
the actual python engine can be shared between runtimes, so I created a "cengines" folder for them.

I couldn't test it because I still have troubles with the mahapps themes, I didn't pay enough attention to the build and install video... @dosymep can you please post it on discourse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pyRevit 5 pyRevit 5 coming release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants