Closed devployment closed 2 years ago
seems safe to update using Path.GetRelativePath now.
I remember have been looked into that before, but originally when the extractor was build for .NET Standard 2.0 and NetFX there was no GetRelativePath available. However to publish as dotnet tool, the extractor had to be lifted to Standard 2.1 (whereas the GetText library still supports Standard 2.0), and obviously than, didn't rework the GetRelativePath.
If I'd update the code, would you be able to build locally and run (package if needed) before I publish a new nuget package? So we can test if there are other issues ie. on MacOS/Non-Windows?
If I'd update the code, would you be able to build locally and run (package if needed) before I publish a new nuget package?
Happy to do so. But there seems to be more to it being on macOS. The extractor project does not build ootb.
Building in Rider gives some more hints, but not sure about all of that at the moment. Need to dig a bit more in general here.
I'll publish an RC version which we can use iterate if there are other issues, before having a new release. Takes a while to run the pipeline, I'll post an update when available
there you go https://www.nuget.org/packages/GetText.NET.Extractor/1.2.4-rc
since it's pre-release, you'll need to give the exact version for dotnet update
dotnet tool update -g gettext.net.extractor --version 1.2.4-rc
Seems to work. Just executed it inside your project examples folder and it created the messages.pot
file with content.
Does not extract anything in my project, but that's probably a different story. Will explore it a bit in general. As well try to figure out on how to build it locally on my machine.
thanks for input/feedback. I'll keep the RC version for a few days so we can fix if further subsequent issues
Trying to run the extractor I get the following error on macOS, as the code imports a Windows native dll.
https://github.com/perpetualKid/GetText.NET/blob/95917ba4bbe38e4e9cd6928aaa5888c163260504/src/GetText.Extractor/Template/PathExtension.cs#L55
Not sure about the details, but might
Path.GetRelativePath(String, String)
do the job as well?https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getrelativepath?view=net-6.0
At least a quick smoke test seems to proof the example of the
shlwapi
documentation. But maybe I'm missing the point ofpublic static string GetRelativePath
's real usage.Running on macOS
Running on Windows