I hope I've found the right forum, if not please point me to the right direction. Seeing a lack of git skins, I decided to create a plugin that can return information about git repositories, like files changes, current branch, etc. I did this up until now with a !CommandMeasure bang to the git executable, and it worked, but now I'm trying a new thing by making a git-specific plugin in C# using https://github.com/libgit2/libgit2sharp.
I've succeeded in returning a simple string measure to a skin. However, when I initialize a new Repository object, it crashes Rainmeter. I tried the same in a console application, and it works there. Wrapping it in a try/catch block did not send it to the catch block, so I could not find out anything about what the problem was. I also did not find anything useful in the log file in AppData. Just this:
Code: Select all
NOTE (17:25:26.478) TestPlugin\TestPlugin.ini: Refreshing skin
DBUG (17:25:26.479) TestPlugin\TestPlugin.ini: Reading file: C:\Users\heel\Documents\Rainmeter\Skins\TestPlugin\TestPlugin.ini
DBUG (17:25:26.482) : Reading file: C:\Users\heel\AppData\Roaming\Rainmeter\Rainmeter.ini
Code: Select all
using (var repo = new Repository(@"C:\path\to\repo\.git"))
{
currentBranchName = repo.Head.FriendlyName;
}
Thanks for reading, and I'm hoping for some advice.