Fragjacker / DoW-Mod-Manager

The original repository for the DoW Mod Manager application, which was made for the Dawn of War:tm: series.
MIT License
32 stars 7 forks source link

v2.0.3 "Reinforcements have arrived!" #16

Closed Fragjacker closed 4 years ago

Fragjacker commented 4 years ago

Description

This is the pull request that contains @IgorTheLight 2.0.2 changes plus my 2.0.3 changes that contains the auto update function.

Features

v2.0.2

v2.0.3

How to Test

Type the following commands into the command line tool of choice:

git fetch origin pull/5/head:NEW_BRANCH_NAME
git checkout BRANCH_NAME

After one is done delete the branch again git branch -D BRANCH_NAME

Fragjacker commented 4 years ago

Alright @IgorTheLight care to review this pull request? It should have both your and my changes properly merged and ready to go into master.

IgorTheLight commented 4 years ago

Ok. I will merge it with my 2.0.3 and test it! My new version just has one small tweak:

IgorTheLight commented 4 years ago

There is just one small complain - new features in a bugfix release. I wanted 2.0.X releases to be bugfix and refactorings only. But we are pushing new features here. It's not a big deal here, but in future it may be a bad habit ;-)

IgorTheLight commented 4 years ago

My plans for a near future:

Fragjacker commented 4 years ago

There is just one small complain - new features in a bugfix release. I wanted 2.0.X releases to be bugfix and refactorings only. But we are pushing new features here. It's not a big deal here, but in future it may be a bad habit ;-)

Yes that is fair, however I really wanted this auto updated utility in the Mod Manager as fast as possible. So forgive me my sins πŸ˜€ .

Another thing I noticed with the Fetch MISSING button is that you get no result if the missing mod does not exist in your reference file. Maybe some prompt would be due here to inform the user that the mod was unknown.

My plans for a near future:

  • Move silent autoupdate to a new thread. I will test will it be faster that way
  • Keep looking at already existing code and try to optimize something
  • Add ability to enlarge fonts when needed When Visual Studio 16.7 will be released I will port DoW Mod Manager to a .NET Core 3.1 + WinForms. That will be on a separate branch "dotNet Core". The reason for that is my curiosity ;-) And that may be beneficial in a few ways: .NET Core is Open Source, it's crossplatform, it's faster, it's newer and it's evolving (.NET Framework is on a maintenance now).

I definitely support moving the autoupdate feature to a separate thread. As of now the autoupdater blocks the Form from showing up which is not intended.

The enlarge font feature would also dramatically help people who want to play DoW in 4K resolution but get a font the size of an ant.

My Plans

Fragjacker commented 4 years ago

@IgorTheLight Make sure to pull the latest of the master since I found an issue as I forgot to update the assembly info and the updater was asking me after each update that there is a new updated available. It's fixed now.

IgorTheLight commented 4 years ago

Agree - I will add a prompt when MISSING could be resolved. - OK, Google! Play "Destination unknown"! :-) I like your plans so far! But... will we stop after that or that is an ongoing project? We always add "one last feature" Well it works for now (our release model) so why change something! :-)

On Fri, Jul 17, 2020 at 4:33 PM Dennis S. notifications@github.com wrote:

There is just one small complain - new features in a bugfix release. I wanted 2.0.X releases to be bugfix and refactorings only. But we are pushing new features here. It's not a big deal here, but in future it may be a bad habit ;-)

Yes that is fair, however I really wanted this auto updated utility in the Mod Manager as fast as possible. So forgive me my sins πŸ˜€ .

Another thing I noticed with the Fetch MISSING button is that you get no result if the missing mod does not exist in your reference file. Maybe some prompt would be due here to inform the user that the mod was unknown.

My plans for a near future:

  • Move silent autoupdate to a new thread. I will test will it be faster that way
  • Keep looking at already existing code and try to optimize something
  • Add ability to enlarge fonts when needed When Visual Studio 16.7 will be released I will port DoW Mod Manager to a .NET Core 3.1 + WinForms. That will be on a separate branch "dotNet Core". The reason for that is my curiosity ;-) And that may be beneficial in a few ways: .NET Core is Open Source, it's crossplatform, it's faster, it's newer and it's evolving (.NET Framework is on a maintenance now).

I definitely support moving the autoupdate feature to a separate thread. As of now the autoupdater blocks the Form from showing up which is not intended.

The enlarge font feature would also dramatically help people who want to play DoW in 4K resolution but get a font the size of an ant. My Plans

  • For the next major version I had envisioned the UI overhaul to resolve the cluttered mess of buttons we have right now.
  • Next would be marking mods as outdated if there's a newer version available then installed (Preferably via some text file hosted here on github. That would make updating it a lot easier). I have some unused color code to render the text (orange) for exactly this purpose somewhere.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-660109850, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F3Z5ABEBHEETRKME2UTR4BHMFANCNFSM4O4EOKLA .

IgorTheLight commented 4 years ago

Ok, thanks!

On Fri, Jul 17, 2020 at 5:16 PM Dennis S. notifications@github.com wrote:

@IgorTheLight https://github.com/IgorTheLight Make sure to pull the latest of the master since I found an issue as I forgot to update the assembly info and the updater was asking me after each update that there is a new updated available. It's fixed now.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-660131495, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F35E7XAURGOKUGBWYZLR4BMNRANCNFSM4O4EOKLA .

Fragjacker commented 4 years ago

Agree - I will add a prompt when MISSING could be resolved. - OK, Google! Play "Destination unknown"! :-) I like your plans so far! But... will we stop after that or that is an ongoing project? We always add "one last feature" Well it works for now (our release model) so why change something! :-)

Well at this point the Mod Manager is a living organism of sorts where we add new stuff where we see fit πŸ˜€ . Gradually adding new features over the course of the development was the modus operandum from the get go of this app anyways 😬 .

IgorTheLight commented 4 years ago

Nice! We will test all our new skills on DoW Mod Manager then :-) Sadly most likely noone would sponsor our job - there are just a few loyal DoW fans! https://steamcharts.com/app/9450#1y Random thoughts: do you need any of VirtualBox VM's? I just configured Windows 98 SE, Windows XP SP3, Windows 7 SP1 and Windows 10 (2004). Not just lazily installed - fully tweaked and installed all needed for almost any job (drivers, updates, VC++, .NET Framework, Java) That's why I didn't do anything interesting for DoW Mod Manager for a few days :-)

On Sun, Jul 19, 2020 at 2:01 PM Dennis S. notifications@github.com wrote:

Agree - I will add a prompt when MISSING could be resolved. - OK, Google! Play "Destination unknown"! :-) I like your plans so far! But... will we stop after that or that is an ongoing project? We always add "one last feature" Well it works for now (our release model) so why change something! :-)

Well at this point the Mod Manager is a living organism of sorts where we add new stuff where we see fit πŸ˜€ . Gradually adding new features over the course of the development was the modus operandum from the get go of this app anyways 😬 .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-660626244, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F3YETALSOF4MTWDO5I3R4LHBJANCNFSM4O4EOKLA .

IgorTheLight commented 4 years ago

P. S. You forgot to update changelog.txt for 2.0.2

On Sun, Jul 19, 2020 at 7:59 PM Igor Sandu igorthelight@gmail.com wrote:

Nice! We will test all our new skills on DoW Mod Manager then :-) Sadly most likely noone would sponsor our job - there are just a few loyal DoW fans! https://steamcharts.com/app/9450#1y Random thoughts: do you need any of VirtualBox VM's? I just configured Windows 98 SE, Windows XP SP3, Windows 7 SP1 and Windows 10 (2004). Not just lazily installed - fully tweaked and installed all needed for almost any job (drivers, updates, VC++, .NET Framework, Java) That's why I didn't do anything interesting for DoW Mod Manager for a few days :-)

On Sun, Jul 19, 2020 at 2:01 PM Dennis S. notifications@github.com wrote:

Agree - I will add a prompt when MISSING could be resolved. - OK, Google! Play "Destination unknown"! :-) I like your plans so far! But... will we stop after that or that is an ongoing project? We always add "one last feature" Well it works for now (our release model) so why change something! :-)

Well at this point the Mod Manager is a living organism of sorts where we add new stuff where we see fit πŸ˜€ . Gradually adding new features over the course of the development was the modus operandum from the get go of this app anyways 😬 .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-660626244, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F3YETALSOF4MTWDO5I3R4LHBJANCNFSM4O4EOKLA .

Fragjacker commented 4 years ago

P. S. You forgot to update changelog.txt for 2.0.2

Funny since I actually updated the in-app changelog but not the changelog.txt file itself πŸ˜€ .

Random thoughts: do you need any of VirtualBox VM's? I just configured Windows 98 SE, Windows XP SP3, Windows 7 SP1 and Windows 10 (2004). Not just lazily installed - fully tweaked and installed all needed for almost any job (drivers, updates, VC++, .NET Framework, Java) That's why I didn't do anything interesting for DoW Mod Manager for a few days :-)

Not yet but good to know where I can get some, should the need arise 😁 .

IgorTheLight commented 4 years ago

Hello there! :-) I have an interesting performance test for you! SettingsManagerForm start time:

// multithreaded JIT - no, AOT - no // 511 612 ticks or 51.1 ms - cold start // 449 380 ticks or 44.9 ms // 452 104 ticks or 45.2 ms

// multithreaded JIT - yes, AOT - no // 460 392 ticks or 46.0 ms - cold start // 120 066 ticks or 12.0 ms // 129 683 ticks or 12.9 ms

// multithreaded JIT - no, AOT - yes // 82 779 ticks or 8.3 ms - cold start // 81 871 ticks or 8.2 ms // 79 517 ticks or 7.9 ms

// multithreaded JIT - yes, AOT - yes // 244 659 ticks or 24.5 ms - cold start // 80 392 ticks or 8.0 ms // 79 894 ticks or 8.0 ms

So: Singethreaded JIT compilation < Multithreaded JIT compilation < AOT compilation < Native code (we don't have this option)

Default Python option is to Interpret the code - this is even slower than singlecore JIT in C#! But you can do a few things:

On Tue, Jul 21, 2020 at 3:24 PM Dennis S. notifications@github.com wrote:

P. S. You forgot to update changelog.txt for 2.0.2

Funny since I actually updated the in-app changelog but not the changelog.txt file itself πŸ˜€ .

Random thoughts: do you need any of VirtualBox VM's? I just configured Windows 98 SE, Windows XP SP3, Windows 7 SP1 and Windows 10 (2004). Not just lazily installed - fully tweaked and installed all needed for almost any job (drivers, updates, VC++, .NET Framework, Java) That's why I didn't do anything interesting for DoW Mod Manager for a few days :-)

Not yet but good to know where I can get some, should the need arise 😁 .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-661823827, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F3Y5DP7FW6UMO56BFELR4WCJPANCNFSM4O4EOKLA .

Fragjacker commented 4 years ago

I have used Nuitka in one of my Python projects, though haven't witnessed that much of a drastic performance change. If you want to get your hands dirty I could invite you to one of my private repos, that contains an useful tool (not yet released) which could maybe need some performance improvements (Is written in Python 2.7). It needs to do a lot of file I/O operations and I am sure stuff could be done to work faster.

If you are interested, tell me 😁 .

IgorTheLight commented 4 years ago

Oh! That sounds interesting! But I have zero experience with Python 2. Is that library big? Do you consider porting it to Python 3? (Python 2 officially is not supported anymore so you will see less and less people willing to tinker with it). Well, your library is private but still. Maybe I will help to port it on Python 3 or even Cython? Can't guarantee anything. Can you tell me more? Is that your project? Forked? :-) In exchange I will tell you that I'm planning to create "dotNET Framework Optimizer" which could do a bunch of useful stuff with dotNET Framework itself and with programs written in it. Not MUCH but still a few useful things. You could do all of that today by using different *.cmd scripts or in PowerShell. And no - my program will not just launch Command Prompt with those commands ;-)

On Wed, Jul 22, 2020 at 6:35 PM Dennis S. notifications@github.com wrote:

I have used Nuitka in one of my Python projects, though haven't witnessed that much of a drastic performance change. If you want to get your hands dirty I could invite you to one of my private repos, that contains an useful tool (not yet released) which could maybe need some performance improvements (Is written in Python 2.7). It needs to do a lot of file I/O operations and I am sure stuff could be done to work faster.

If you are interested, tell me 😁 .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-662524423, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F3YZBJBPHJOWNIOTVI3R44BMPANCNFSM4O4EOKLA .

IgorTheLight commented 4 years ago

I have news about multithreaded Autoupdater and AOT compilation! DowModManagerForm: // Singlecore JIT compilation (Autoupdate is in the same Thread) // 5 452 321 = 545 ms (Autoupdate=0) // 10 553 435 = 1055 ms (Autoupdate=1)

// Multicore JIT compilation (Autoupdate is in the same Thread) // 4 350 376 = 435 ms (Autoupdate=0) // 7 828 059 = 783 ms (Autoupdate=1)

// Singlecore JIT compilation (Autoupdate is in a new Thread) // 5 568 867 = 556 ms (Autoupdate=0) // 5 682 794 = 568 ms (Autoupdate=1)

// Multicore JIT compilation (Autoupdate is in a new Thread) // 4 354 217 = 435 ms (Autoupdate=0) // 4 472 958 = 447 ms (Autoupdate=1)

// AOT compilation (Autoupdate is in a new Thread) // 3 659 173 = 365 ms (Autoupdate=0) // 3 679 265 = 368 ms (Autoupdate=1)

Autoupdates, Multicore JIT compilation and AOT compilation could be enabled/disabled now in DoW Mod Manager.ini! There are a few rules:

On Wed, Jul 22, 2020 at 7:08 PM Igor Sandu igorthelight@gmail.com wrote:

Oh! That sounds interesting! But I have zero experience with Python 2. Is that library big? Do you consider porting it to Python 3? (Python 2 officially is not supported anymore so you will see less and less people willing to tinker with it). Well, your library is private but still. Maybe I will help to port it on Python 3 or even Cython? Can't guarantee anything. Can you tell me more? Is that your project? Forked? :-) In exchange I will tell you that I'm planning to create "dotNET Framework Optimizer" which could do a bunch of useful stuff with dotNET Framework itself and with programs written in it. Not MUCH but still a few useful things. You could do all of that today by using different *.cmd scripts or in PowerShell. And no - my program will not just launch Command Prompt with those commands ;-)

On Wed, Jul 22, 2020 at 6:35 PM Dennis S. notifications@github.com wrote:

I have used Nuitka in one of my Python projects, though haven't witnessed that much of a drastic performance change. If you want to get your hands dirty I could invite you to one of my private repos, that contains an useful tool (not yet released) which could maybe need some performance improvements (Is written in Python 2.7). It needs to do a lot of file I/O operations and I am sure stuff could be done to work faster.

If you are interested, tell me 😁 .

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-662524423, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F3YZBJBPHJOWNIOTVI3R44BMPANCNFSM4O4EOKLA .

Fragjacker commented 4 years ago

That's some pretty nice performance boosts right there. Auto-update in a new thread beats the same thread versions, which was kind of to be expected. I am a bit surprised by AOT beating JIT as I would expect the opposite to be true, since less work is required as stuff is only compiled when needed.

Autoupdates, Multicore JIT compilation and AOT compilation could be enabled/disabled now in DoW Mod Manager.ini!

Guess it would be cool to have them as checkbox options in the mod manager itself so all the special rules can be directly implemented as code which would prevent anyone from breaking stuff and cry.

I also got a question today in Discord which could need some fixing:

"Hi in the Mod Manager settings in the Video tab there is an option "Active Videocard" mines at 0 and the other options are 1, 2, 3. What does it mean?"

So what do these numbers indeed mean? A more verbose and self explanatory item here would be better I think to reduce confusion.

IgorTheLight commented 4 years ago

Hi! :-) JIT compilation is almost real-time so it uses more RAM and needs more time to calculate things "on the fly" while AOT compilation is done before application starts so it will not need additional RAM and CPU cycles. It may be a little bit different in different programming languages. Here is the useful article: https://devblogs.microsoft.com/dotnet/got-a-need-for-speed-net-apps-start-faster/ Yes - checkboxes are in the AboutForm now! You can switch the type of compilation just in one-two clicks of a mouse! Autoupdates could be disabled/enabled there too!

About "what Active Videocard means?" - this is an exposed option "screenadapter=0" from Local.ini If you have more than one videocard (or integrated + dedicated) you could try to switch it from 0 to 1 (or 2 if you have 3 videocards) and it will use your another videocard. Does it work - I don't know. I'm just exposing this option in Setting Manager so users could play with it and see for themselves. That will not harm them or their PC in any way :-) Maybe instead of numbers I would show actual videocard names (sounds like a reasonable idea).

Also - 2.0.4 is almost ready! It's (almost complete) changelog:

On Fri, Jul 24, 2020 at 2:24 PM Dennis S. notifications@github.com wrote:

That's some pretty nice performance boosts right there. Auto-update in a new thread beats the same thread versions, which was kind of to be expected. I am a bit surprised by AOT beating JIT as I would expect the opposite to be true, since less work is required as stuff is only compiled when needed.

Autoupdates, Multicore JIT compilation and AOT compilation could be enabled/disabled now in DoW Mod Manager.ini!

Guess it would be cool to have them as checkbox options in the mod manager itself so all the special rules can be directly implemented as code which would prevent anyone from breaking stuff and cry.

I also got a question today in Discord which could need some fixing:

"Hi in the Mod Manager settings in the Video tab there is an option "Active Videocard" mines at 0 and the other options are 1, 2, 3. What does it mean?"

So what do these numbers indeed mean? A more verbose and self explanatory item here would be better I think to reduce confusion.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/16#issuecomment-663492704, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F3Z2Z2J3CDWHYNDVHZ3R5FVNFANCNFSM4O4EOKLA .