leandrosa81 / taskbar-monitor

monitoring tool with graphs (CPU, memory, disk and network) for Windows taskbar.
https://lugarinho.tech/tools/taskbar-monitor
GNU General Public License v3.0
305 stars 24 forks source link

Automated builds #15

Open KoalaBear84 opened 3 years ago

KoalaBear84 commented 3 years ago

Needed to change some things in the Resources part, because now all is merged automatically into a single file.

There is still a problem though, because I and GitHub do not have the "leandro.pfx"file. I have no idea if that can be fixed somehow.. Would be a pity if that is a showstopper for automated builds.

So I tested it with:

  <PropertyGroup>
    <SignAssembly>false</SignAssembly>
  </PropertyGroup>

You can test it locally by executing:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\amd64\MSBuild.exe" -t:restore,build,ILMerge -p:Configuration=Release -p:OutputPath=../TaskbarMonitor-win-x64/ -p:VersionAssembly=1.2.3.4

You might need to change the MSBuild.exe location, because I'm using the Visual Studio Preview.

leandrosa81 commented 3 years ago

To be honest with you, I don't know why the assembly is signed at all. Maybe I thought it would be necessary, since it is marked as "Com-visible" 😂 I have already removed it on my development build and everything is working fine. I will also study a little more your pull request to learn about it, but will soon merge it. Thank you again.

KoalaBear84 commented 3 years ago

OOPS! I see the installer doesn't work yet. I thought it did because I already had it.

I ILMerge-d it all, didn't test, need to change it that it copies it from the .exe file, so it reads the ILMerge-d file from it.

So, until then, don't merge it 🙃

KoalaBear84 commented 3 years ago

Yes, now it should be good!

** Sorry, I'm currently testing and see that I referenced a file hardcoded, but should be used as a link **

I'll send another update when also that is fixed 😬

Grr. I HATE GitHub Actions, it's very hard to find why it doesn't 'find' the $(ILMergeConsolePath) when building a project directly (in GitHub), but it does work when you build it all, but then I have other issues... Sometimes simple things are hard...

KoalaBear84 commented 3 years ago

Sorry for all the mess :)

It didn't cooperate with me. But finally I guess it is fixed. If you build it in Release, it will output the final executable in the "TaskbarMonitor-win-x64" folder. Same when you tag the releases as you already do like "v1.2.3.4" and also changed that it uses the version from the DLL for the uninstaller.

All should be good, now you can also test it without custom command.

KoalaBear84 commented 3 years ago

Found out that it didn't always build correctly when Newtonsoft.Json 12 wasn't on the build machine, so added an expicit nuget restore, seems to fix it. Although msbuild should do that too, but that doesn't look like that works as expected.

KoalaBear84 commented 3 years ago

Could you try to check this out? After this, you can just tag the code starting with "v", push it to GitHub and it will automatically build and release it.

KoalaBear84 commented 2 years ago

Bump 😂