WordpressI have always written my blog here in two languages, in German and English. Back in the day, it used to be my own web code. Then at some point I switched to WordPress. And the plugins for multilingual posts, etc., have always been kind of … difficult.

And now my previous plugin for the multilingual blog has completely stopped working; probably due to a WP update or PHP update. Whatever. Doesn’t matter. So, let’s try out a another new plugin. And, this now manages different languages by having each post in exactly one language, and the same posts in different languages are “only” linked. Actually quite a nice concept.

But it also means that my previous posts all, really all, have to be revised, split, updated, etc. just like the website structure itself and all extra pages. And that will take time.

So, the content on my website will always look a bit broken until further notice. Sorry.


Update 2024-09-15: as I am fixing the blog articles, i.e. I am splitting the languages into separate articles, I notice links between the articles will most likely stay broken, especially in the english versions. Sorry, but I don’t care enough for the old stuff to fix that…

I came across that Nuget because I was writing WPF UI applications and I needed a folder picker. Someone in the internet suggests to use the WinForms dialogs. I sort of hate using two frameworks. And then another one brought up the Nuget WindowsAPICodePack.Shell with it’s class representation of the Windows Common Dialogs, including the capability of picking folders in the open dialog window.

So, I started using that. Then, at some point, a friend pointed out to me, that the Nuget package I was using did not look like an official Microsoft package, but a repackage someone did. That made me stop and think. I don’t assume any bad intent, but I found it very very strange. The official package vanished. And there is a huge load of packages which strange names:

I don’t like this. Even if there is no ill intent from any of the authors, I still don’t like this, as it reeks like fraught, phishing, and vulnerabilities. Sorry, but, no.

So, where is the official package? Seems to have disappeared, that’s why there are the repackages by community members. Why did it disappear? No idea. Maybe it got caught in a semi-automatic cleanup as it was orphaned. Someone suggestion it’s replaced by Microsoft.Windows.SDK.Contracts.

In the end, I replaced the code in my projects by either using the WinForms dialog, or by writing a very small p/invoke wrapper class calling the Win32 API directly. If you are interested, have a look:

https://github.com/sgrottel/open-here/commit/9de68198e35f0f6dec9386372cc71bada54c2f5b

The moral of the story is, a Nuget package is only as good as the people maintaining it. And, I mean people, not organizations. Because in the end, it’s whether or not individuals want to give their best.

GLM has been released in Version 1.0.0, and I updated the Nuget package accordingly.

With this, the Nuget package source code also moved from Bitbucket to Github.

I am not sure if updating Nuget packages is worth writing about. I’d rather say, it’s business as usual. But this instance here is special, as the GLM developer decided to go for 1.0.0. I want to especially congratulate on this occasion! It’s rather embarrassing how many projects seem to fear the “sonic barrier” of this step, finally switching from “I don’t know” to “This is sort of what I wanted to do and it is sort of done in its first version.” I believe, many more projects are mature enough and stable enough to go that step. But they don’t do it. I don’t know.

This is my first post in 2024, and amazingly, I managed to not post anything for seven and a half months. That might be a sad record. Well, it’s not that I did not do anything publicly available to the community in that time. It does show, however, that my priorities lay somewhere else than this blog. But I don’t want to give this here up just yet.

Anyhow, I don’t want to just write down a blown-up lazy list of what I did, e.g. repeating my Github journal, because, that would be just sad. If you are interested in what happened in my Tiny Tools, Everything Search Client, Checkouts Overview, OpenHere, LittleStarter, MyToDoBoard, updated Nuget Packages, SimpleLog, etc., I suggest you have a look at my Github profile directly. I guess, this is the non-blown-up list.

So, for today, I leave this little sad “I am still alive” message here.

A lot of stuff was happening around Lua and its NuGet package.

Lua 5.4.5 has been releases. So, it was time for an update of my Lua NuGet package. And for a surprise. And for some pain.

In the end, all was resolved, and the new version of the Lua NuGet package is online.

Although, Lua 5.4.5 was removed again in favor of a hopefully quickly upcoming Lua 5.4.6.

Update 20230514: Lua 5.4.6 is here!

Surprise: The Lua NuGet package was unlisted!?

Some months ago, my notifications from Github stopped working. No idea why. But since I don’t have much traffic there, it was never a high priority for me to fix it. For that reason, however, I nearly missed this issue raised by Smurf-IV “[Question] Why does nuget state that the packages have been witdrawn ?”

What? I have absolutely no idea what had happened there. But I have a guess. The NuGet package was originally created by the CoApp organization. However, at some point they stopped updating it. When I was needing a newer version of Lua, I decided to create a NuGet package myself. I already had good experience in creating native C++ NuGet packages, so I gave it a try, and it worked nicely. At that point I reached out to the CoApp org., and asked if they would let me co-author the NuGet package for Lua. My idea was that I could publish this package using the nice and precise NuGet package id. They agreed, gave me co-authorship, and I started publishing NuGet packages for every release of Lua ever since.

And now the package was unlisted by “the author” and marked as being deprecated and having critical bugs. What? I can tell you that, it was not me!

The “critical bugs” thing worried me a bit. I my previous job I was also tasked to regularly screen our code base for CVEs. So, I do know a couple of things to look at. I did a quick check for Lua, and yes, there are CVEs, but nothing out of the ordinary. Nothing as severe requiring the package to be locked down that hard.

And another thing became apparent: the CoApp org no longer seems to own any NuGet packages at all. None. Which is quite surprising.

So, my best guess is, the CoApp org on NuGet was maybe disbanded, but surely stopped their commitment on maintaining any of the NuGet packages. As a precaution, they shut down all the NuGets, and maybe automatically marked all of them as being deprecated and legacy. I am not sure about the “critical bugs” thing. That is why I assume an automatic “shutdown,” which indiscriminately flagged and unlisted all packages.

Well, my commitment to maintain the Lua Nuget package stands!

I will continue to release version updates and similar. And therefore I (re-)listed the 5.4.x versions of the Lua package again and removed the warning flags about being legacy, deprecated or having critical bugs. I could only speculate about the reasoning of the CoApp group. But, I won’t.

Pain: Moving from AppVeyor to Github Actions

All that happened in the wake of the release of version 5.4.5 of Lua. One task which is on my ToDo list for a long time was to migrate and consolidate the different code and CI platforms. Up until now I built the different flavors of Lua for the NuGet package on AppVeyor. And I planned to move this task to Github Actions for a long time. So, I decided that now is finally the time to do that. One reason being an upcoming public holiday in Germany, which gave me the extra time to take care of that.

While Github actions are quite nice for straight forward projects, and while they are quite powerful, I immediately run into an issue: my NuGet package also contains built flavors from older Visual C++ toolset, currently down to v120. And the runner VM of the GitHub actions only comes with the most recent Visual C++ and toolsets installed.

And so, a long run of trial-and-error started for me. A lot of pain, headache, and “why, why why…” moments. In the end, these are the solutions I came up with:

How To: Adjust Visual Studio 2022 installation on Github Actions Runner

Let’s start easy. The Github runner comes with Visual Studio Enterprise 2022 installed. So, the most recent toolchain should work right away, namely Visual C++ v143, v142, and v141, and it did. Now, for the tool chain v140, which can be installed via the Visual Studio Installer. So, that should be easy. Well, in theory, yes. The Visual Studio Installer offers command line arguments to modify an installation and to add components, and that is what I need to do. The only issue is, the Installer is not a console application. When it is started, the calling console immediately returns, thus a job in the workflow Yaml won’t wait, at least not automatically. I need to invoke the installer with `Start-Process` and need to explicitly tell the command to wait for the spawned process to finish.

When you run the Installer locally within a command prompt, like a Powershell, you will see output messages. When running on Github CI, you don’t. As I said, the Installer is not a console application. As such, it likely performs a manual console host connection to push in its output messages. And on the Github CI, the console host likely does not exist, as the process output is directed from the CI agent process into a temporary file. As a result, the Installer does not find a console host, and thus does not print any output messages. I am flying blind. To have some info of whether or not the command succeeded, I use ` vs_installer.exe export` to dump the list of installed components. That’s not beautiful, but it is good enough for manual debugging.

So, this is what worked:

- name: Modify Visual Studio 2022
  if: matrix.toolConfig.vs2022addMod != ''
  shell: pwsh
  run: |
    $component = "${{matrix.toolConfig.vs2022addMod}}"
    Write-Host "Adding:" $component

    Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "modify","--add",$component,"--installPath","`"C:\Program Files\Microsoft Visual Studio\2022\Enterprise`"","--passive","--includeRecommended","--norestart","--noUpdateInstaller" -Wait

    Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "export","--config","info-post.txt","--installPath","`"C:\Program Files\Microsoft Visual Studio\2022\Enterprise`"","--passive","--noUpdateInstaller" -Wait
    Write-Host "VS2022 Components after modification:"
    Write-Host (gc info-post.txt)

    Write-Host "Added:"
    Write-Host (gc info-post.txt | Select-String $component)

How To: Visual Studio 2013 on Github Actions Runner

This leaves with the build with the oldest still supported tool chain: v120 aka Visual Studio 2013, and this one is a real pain! I cannot blame most people, as this is an over 10 year old software. I would not want to give support to something like that. But, with this NuGet package, I sort of do.

The current Visual Studio does not support this tool chain. So, I actually need to have Visual Studio 2013. Ask the Internet what to do, and it will tell you to install Visual Studio 2013, e.g. the free “Expression” Edition, via Chocolatey. I tried, and it failed with the most cryptic error message ever:

“Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself […]” bla bla bla.

It gives a lot of wrong hints to what to do. The actual reason is quite different: The package actually only downloads the bootstrap installer of Visual Studio, around 1.2 MB. The rest of it would have been downloaded during installation on demand. And there is the issue. Microsoft removed those old download sources, as they were vulnerable because they were signed with SHA-1 hashes. And with that all Chocolatey packages are now broken. … I might be wrong, but the effects and the sparse info I carved out of the log files really look like that.

Meaning, I need a full Visual Studio 2013. At this time, it is officially available through Microsoft’s download website my.visualstudio.com. After logging in and clicking through a dynamic website, that is. For my automation purposes not acceptable. So, I rehost the DVD iso on my OneDrive. I’d say it ok, but not ideal. And now, I need to install the full Visual Studio 2013 then. Sounds expensive. Sounds painful. Sounds slow. Sounds like a job for Docker. … Well, yes, but sadly, I would need a Windows docker image, which would need a Windows Docker host, and that seems not supported on Github, yet. So, yes, I need to install Visual Studio 2013 on the runner.

- name: Install VS 2013 tools
  if: matrix.toolConfig.toolset == 'v120'
  shell: pwsh
  working-directory: ${{env.GITHUB_WORKSPACE}}
  run: |
    Write-Host "Downloading VS 2013 Express for Windows Desktop (w Update 5) DVD ISO..."
    Invoke-WebRequest -Uri "${{ secrets.VS2013ISO_URL }}" -OutFile dvd.iso
    gci dvd.iso
    $dvdiso = (Resolve-Path .\dvd.iso).Path

    Write-Host "Mounting Disk..."
    $DiskImage = Mount-DiskImage -ImagePath $dvdiso -StorageType ISO -PassThru

    $volumeInfo = (Get-Volume -DiskImage $DiskImage)
    $volumeInfo

    cd ($volumeInfo.DriveLetter + ":\")
    gci

    Write-Host "Installing Visual Studio 2013 Express..."
    Start-Process -FilePath ($volumeInfo.DriveLetter + ":\wdexpress_full.exe") -ArgumentList "/Q","/NoRestart","/NoRefresh","/NoWeb","/Full" -Wait

    Write-Host "Unmounting Disk..."
    Dismount-DiskImage -DevicePath $DiskImage.DevicePath

And this works. And, as expected, is painfully slow. To limit the overhead of this installation step, it does make sense to reduce the width of the job matrix in the workflow: only have one job to perform this installation and afterwards perform all build steps sequentially. In the end, this is almost the factor x4 faster as you would expect, due to the massive installation overhead. Luckily for me, this workflow is not a pull-request blocker during active development, but only a release automation.

Final Thoughts

In the end, the migration to Github Actions works. Was it worth it? I mean, Lua releases like once every two years. Do I even need CI for that? And, anyway, isn’t native NuGet dead, replaced by other means, like vcpkg, or something?

Well, all this is true. I did not follow through with this undertaking because of having a CI for my Lua NuGet Package. My main reason is “because I can,” or, really, “because I can’t, yet.” It was a good opportunity to improve my Github-Actions-Fu. My recommendation to you: if you see such an opportunity to learn and improve your skills, with the benefit of getting something usable out of it, do it.

And, now I am waiting for Lua 5.4.6 and maybe new surprises…

Git has this cursed function to fuck up your files by doing unspeakable things to your line endings.

For example, from Githubs Documentation on Line Endings:

On Windows, you simply pass true to the configuration. For example:

$ git config –global core.autocrlf true

Please, never never never never never never never never never never never never do this!

THERE IS NO REASON TO DO IT!

Git is here to keep track of our files, NOT TO CHANGE OUR FILES IN ANY WAY.

So, please, just, never never never never never never never never never never never never do this! Leave my file endings alone!

You might notice that the Shields.io badges, for the Nuget Packets I am maintaining, have been gone for some days and are now replaced by a simple table. What happened?

It happened with this decision of a German court that using Google Fonts from their CDN server hosted in the US can pose a privacy violation when used without user consent. Apparently, some predatorial lawyers are already on the hunt. Thus, I changed all my websites to host the fonts I am using in the same servers. While I was sort of angry about the extra effort I had to take, I understand the importance of data privacy, and, in that light, I can understand the decision. So, that is about the Google Fonts. What about anything else?

My goal was to change my website to either host everything myself, or to explicitly request content for any embedded content. And that is why Shields.io is no longer directly used on my website. Call me paranoid if you will, but I think this might be an improvement also on content “stability”. Now, my backend fetches all the data I need, store it at my own host, and delivers it as a local part of my web site. In this case, I even changed fetching the data to a cron job running once a day. I am not that fast with Nuget packing anyway.

With this, now all content displayed on sgrottel.de is delivered from the servers sgrottel.de is hosted on.

The downside, of course, is that this poses an additional maintenance burden on me. The backend is calling semi-documented Apis, which might change any time, and it does some fragile parsing, e.g., in case of the not so structured Lua project website. The current solution cannot be a final solution, and it will need to be improved in the future. We will see.

This article is only available in German.

Irgendwie ist es natürlich immer schön sich über andere Lustig machen zu können. Vor allem, wenn man sich über welche von den Großen lustig machen kann. Aber irgendwie finde ich die ganze Schachbrett-Nummer etwas arg albern. Ich will jetzt aber niemandem den Spaß verderben. In diesen Kreisen hätte dieser Fehler nicht passieren dürfen. Darum ist der Spott verdient. Nur sollten die Spötter sich bewust sein, dass sie selbst ebenfalls äußerst albern sind. Ein Hoch auf die Albernheit.

Ich muss auch zugeben, dass ich, sofort als ich von der Story gehört hatte, in meinem KDD-Prototypen nachgesehen hatte, ob ich es richtig gemacht hatte. (Ich hatte damals als ich das Programm geschrieben hatte weder darauf geachtet, noch auch nur einen Gedanken daran verschwendet ob da was wäre auf das man achten sollte.). Zu meiner Erleichtung: Ja, mein Brett, auch wenn es kein klassisches Schachbrett ist, steht richtig herum.

Tada! :-)

The webpage is now available with a shiny new appearance. … or something like that. At least I got rid of my old, annoying php scripts. I decided to use WordPress as blog engine/CMS, and up to now, I don’t regret the decision. Everything seems functional. There are a few small flaws with the multi-language plugin and, of course, I want to replace the theme with my own, but for now I am satisfied.

Now I can focus on other things. There are enough projects I want to work o …

In … April, *omg* that was a long time ago, … whatever … I wrote I’d like to re-work and extend my websites. On my wish list were bullets like user comments and RSS feeds. Long story short: I ask myself recently if I am a complete idiot. I mean … *wtf* … what I have here is pretty exactly a Blog and nothing else. Therefore I am currently looking at existing, free Blog-Engines and I will switch to one of these.

Nevertheless, as I am writing an entry here I thought I use this opportunity to update my project list:

  • MegaMol
    My huge project at work: MegaMol; That project is now in the hands of my successor. I am not doing any big changes there any more, just some minor fixes.
  • Exoworlds
    There is nothing new here. I got my ideas. They are rather complete. I simply have to do it. *sigh*
  • MILC
    “… but stay tuned.” What a joke. Whatever. Does not evolve and is problably going to get canceled.
  • Nameless Board Game
    Well, I can actually tell you something new here! In May I wrote that the rule set is making good progress. Now I got a first version (with some possible variants).You can take a look:

    KDD_Rules_2011_6.pdfKDD_Rules_2011_6.pdf Knights Double-Duel Rules (June 2011)
    Von dieser Datei ist eine neuere Version verfügbar
    [378 KB; MD5: b76e1d4489614ae95cfcf716663980ca; Mehr Info]

    Now, the problem remains, that I am not sure if the game is fair with these rules. At the moment it looks like the second player as a slight advantage (when played without the variants. I am currently checking if this is really the case.
    I also named the game “Knights Double-Duel”, because this is basically it. Both players play each with two knights similar to chess.
  • NSB
    NSB is officially dead for now.
  • Kanoneur 2
    Kanoneur 2 is also officially dead for now.
  • My Website
    Now, I am not going to say something.
  • Mr. Burns TOK
    *sigh* I don‘t know.
  • All my little Tools
    Yeah, there are some I am writing every now and then. (No mail), no plan, no goal