Legolash2o Posted March 28, 2014 Share Posted March 28, 2014 (edited) IntroductionSo as you may or may not be aware. Win Toolkit v2.0 has been accepted to be my final year project. That means a year and a half of researching, re-designing, re-coding and re-testing). It will require me to start the project from scratch taking in lots of researching, coding practices and everything I've learnt in the first four years into one beautiful final product. At the moment the current Win Toolkit code is a big mess. It has a mixture of old rubbish code, sorta ok code and new code. Unfortunately that means adding your requests is really hard because as you know, it leads to quite a few bugs from just forcing it in there. Some of the big tools such as the All-In-One Integrator, has become so hard to manage that it scares me just thinking about adding stuff to it. So, saying all that. A complete rewrite is required. The main effort will be focusing on the design and planning, focusing on efficiency, maintainability and taking advantage of the latest tools such as .NET Framework v4.5. This is crucial for making a high end product. Planning is key! Feel free to post any questions. Anything which isn't on topic will be deleted. ResearchI hell of a lot of research is required, as I still have a lot to learn. In two hours alone, I learned so much about multi-threading. I even took the time to recover subjects in more detail such as abstract classes, constructors and best of all LINQ/Lambda. The potential of LINQ alone is huge but unfortunately, it's not implement much in the current release at all. I also have to relearn Windows Presentation Foundation (WPF), as I plan on moving to that instead of Windows Forms to create an even better GUI. So far on my list of research material is:.NET 4.5 featuresThreading (Tasks & Paralellism)WPF - Windows Presentation FoundationWIMGAPI - Remove the need for imagexExtraction - Remove the need for 7zAutomated TestingLanguagesList will most likely grow.Maintainability and EfficiencyAt the moment, the code is one big heap of mess with a low maintainability score and very high Cyclomatic Complexity rate. Adding new features and request, has become such as hard task that most of the time it's not even worth bothering, which is why not many requests get done. Don't get me wrong, I know all my code of by heart pretty much and understands what it does, even without a single line of comments but it's still hard to add features. I absolutely need to focus on making the code as easily read as possible AND also efficient. Both of these together will create one hell of a program. Before I start on a feature or any code at all really. I need to sit back and look at it from a different perspective. Heck, even get a pencil and some paper out if I have to! At the minute Visual Studio rates my Maintainability Score and Cyclomatic Complexity rating for the All-In-One Integrator as 31 (higher better) and 2,508 (lower better) respectively. However, with the new error logging system. It gets a rating of 80%+ and a cyclomatic rating of 4, which I think is impressive. If I took a step back and look at it again, I'm pretty sure I can get it to 90%+. The point is, the new system is so much easier to read and understand. I can add anything to it so easily, I could do it in my sleep. With the All-In-One Integrator on the other hand, just scares me thinking about changing even a tiny change. Error Logging ExperimentBelieve it or not error logging is an absolute critical feature that needs to work 99% of the time. Before the experiment, error logging worked about 10% of the time, with the other 90% of error logs being completely unreadable and therefore pointless. Using the latest code and practices I've learnt. I made Error Logging v2.0 which works 99% of the time, producing nice readable and detailed reports which you can view at your discretion. Also as more and more logs get moved onto the new system, you will see more details about the issues you are seeing. Better yet, they are in YOUR language! The new error logs system was a huge success and I'm proud of that. The new EL2.0 system only took 5-6 hours of planning but it was done with minimal code and it worked like a dream from day 1. This just shows what happens when I sit back and think about things rather than just the usual hack and patch method to just get it working. Imagine the potential if the rest of the program had the same make-over! .NET Framework 4.5I've always been behind on the releases. Originally I used v2.5 when 3.5 was available. Currently I'm on v3.5 when v4.5 is available. I am eagerly wanting to jump to the latest release and take use of all the new features. v4.5 has a lot more features compared to 3.5, the biggest one of all is threading. I can't even begin to list them all. Win Toolkit v1.4.xx will remain available on .NET Framework v3.5 for XP users. It will only have bug fixes. LanguagesHaving a version of Win Toolkit has been requested for years. Since the program will be written from scratch, I will definitely explore the idea of having this in from the beginning. So hopefully the first version you test will have this feature. This will definitely make a lot of people happy. Multi-ThreadingAnother focus will be on taking advantage, in a positive way, your computer’s hardware. Since computers these days are having more processing cores, I thought it’s about time Win Toolkit took advantage of that. Win Toolkit at the moment only uses a maximum of two threads. For example, in the All-In-One Integrator it uses a Background Workers to do the actual tasks whilst the GUI thread sits there doing nothing apart from keeping the GUI responsive. So in actual fact, Win Toolkit isn’t really multi-threaded at all. Even worse still, I’ve been told Background Workers are actually really bad for performance. Imagine the potential if Win Toolkit used all of your cores instead of just the one. Integrating difference things at the same time. Reducing the amount of total time required. So this is where ‘Tasks’ and ‘Parallel’ come in. Tasks are a completely new feature of .NET 4.0 with huge enhancements in .NET 4.5. Tasks are absolutely powerful. Tasks will be used to do the split up each individual task whilst Parallel will be used within the tasks themselves to work on more than one file at a time. If you have have a multi-core processor. The advantages you will gain are huge. Lets say, for example, you have an 8 core processor. Thats x8 the performance. In reality, it will be more like 6-7 times the performance but I won't complain about that at all and I doubt you will either. Check out the results of my multi-threaded experiments here. Win Toolkit v1.4.xx.x All-In-One IntegratorAt the moment with just one thread, the tasks are queued.Mount > Updates > Drivers > Removal > Tweaks > Silents > Themes > Wallpapers > etc.. > UnmountAs you can see, it can take a while to get to the last task especially since most of the work is with Drivers. Win Toolkit v2.x.x.x All-In-One IntegratorThe new task method will give each one of those their own thread so all of them will be done at the same time. The image will be mounted, and then once mounted a task will be assigned to add Updates, Drivers and Component Removals. AT THE SAME TIME, your wallpapers, custom files, gadgets, theme packs Stage 1:Whilst Updates, Drivers and Components are queued under one task due to the fact they can't be done at the same time. Every other task will be given their own thread and will be done in the background.MountMain Task: Updates > Drivers > Component RemovalTask 2: WallpapersTask 3: ThemesTask 4: GadgetsTask 5: Copy Silent Installersetc..Stage 2: These are things which require the registry but are locked during the DISM tasks.Task 1: TweaksTask 2: Add Silent Installer entries.Task 3: ServicesUnmount Windows Presentation Foundation, WPFAt the moment Win Toolkit uses Windows Forms which is very dated with controls which look they are made for Windows 98. WPF is the latest in GUI design, with all new controls, features, options and so on. ListViews for example, are sort-able by column built-in. It will made the app look more modern and give me much more control over the design. The bad news is, it's completely alien to me but I'm going to enjoy the learning experience so it isn't really bad news at all. Rate of WPF adoption 2005-2007 As you can see, the rate of adoption for WPF is huge and that was back in 2007 so I'm definitely behind the times. Some say WPF is dead, I disagree but either way it's newer and I want to learn something new. This is just a sample design of the new startup screen. Still has a tiny bit more work. Mostly just experimenting with WPF. Automated Online DatabaseTo save time, there will be a mostly automated SQL database which will contain if a description of an update, if it's LDR/GDR (update.mum present), any known issues and if it can't be integrated or not. This should save time in extracting files, HDD usage and immediately make it so I don't have to release a new version when a problem update appears. It may also include it the update is superseded or out-of-date. DependenciesWin Toolkit relies on quite a few external tools which makes it size pretty big. It currently has imagex, 7z.exe, 7z.dll and some others built-in to the main exe which has made the exe itself a lot larger than it should be. I plan to hopefully get rid of imagex and replace it with WIMGAPI but also 7z with my own code. This will mostly benefit those on slow internet connections. Component RemovalThe vLite tab will be completely removed. Minor items such as removing themes will be moved to the normal Component Removal tab but more complicated ones such as 'Speech and Natural Language' will be removed. I will be sticking to the official methods of removing components. TestingYes I admit, I can rush things and can leave or add new bugs because I didn't do enough testing. In Win Toolkit 2.0, I will be using automated testing. With just a click of the button it will automatically test the product and look for things which did work and no longer do. The automated testing is another key part of making Win Toolkit a high quality product by hopefully decreasing the amount of bugs. As new bugs appear, I can add more testing to prevent it from re-occurring in the future. Unfortunately however, not everything can be tested automatically. Edited May 18, 2014 by Legolash2o Superman125 1 Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted April 8, 2014 Author Share Posted April 8, 2014 Added news about Component Removal. Quote Link to comment Share on other sites More sharing options...
Etz Posted April 8, 2014 Share Posted April 8, 2014 Problem with External SQL Database is, that someone has to maintain it. IMHO it would be more feasible to use SQLite and maintain local copy on user PC aswell (and sync it against online one) so program would be still usable without Internet connection or even after Development is being ceased. Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted April 8, 2014 Author Share Posted April 8, 2014 It will be an mostly automated database Quote Link to comment Share on other sites More sharing options...
bphlpt Posted April 8, 2014 Share Posted April 8, 2014 Automated or not, I hope that local copies of whatever is needed are maintained and used if available so that proper operation is possible even if no internet connection is available. Cheers and Regards Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted May 18, 2014 Author Share Posted May 18, 2014 Update: Added languages. Quote Link to comment Share on other sites More sharing options...
Superman125 Posted May 18, 2014 Share Posted May 18, 2014 How can someone test the new final year 2.0 project? Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted May 19, 2014 Author Share Posted May 19, 2014 When it has started, it will go in 'Latest Builds'. To be honest the first few builds won't have much, everything is being done from scratch Quote Link to comment Share on other sites More sharing options...
ThuGie Posted May 19, 2014 Share Posted May 19, 2014 Perhaps wrong place, but is there a changelog for latest builds ? Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted May 19, 2014 Author Share Posted May 19, 2014 They are in the same place as the usual change log (in the first menu of the program where it says version number). Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted May 29, 2014 Author Share Posted May 29, 2014 I've already started my experiments again. At the moment I've been designing class diagrams and experimenting with WPF. At the moment, progress will be slow whilst I get used to using WPF instead of Windows Forms. Quote Link to comment Share on other sites More sharing options...
crashfly Posted May 31, 2014 Share Posted May 31, 2014 To possibly save you some trouble, (or at least move you along when creating your own 7zip support), you might consider using the dlls written for 7zip. The following is a quote from the 7zip.org faq. I see no reason for you to "reinvent the wheel" when the code is already available for you. How can I add support for 7z archives to my application?One way is to use the 7z.dll or 7za.dll (available from sf.net for download). The 7za.dll works via COM interfaces. It, however, doesn't use standard COM interfaces for creating objects. You can find a small example in "CPP\7zip\UI\Client7z" folder in the source code. A full example is 7-Zip itself, since 7-Zip works via this dll also. There are other applications that use 7za.dll such as WinRAR, PowerArchiver and others. Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted May 31, 2014 Author Share Posted May 31, 2014 I will be trying to do it without using external DLLs. If I used the 7z.dll, it would add an extra 2MB to the size of WinToolkit considering I only need CAB and ISO extraction support. Quote Link to comment Share on other sites More sharing options...
Tuesday77 Posted June 1, 2014 Share Posted June 1, 2014 (edited) Whats about a first alpha build just for see it works?Or can you please make a preview-video with few at-the-moment-features? Im interesting much, would be nice. Edited June 1, 2014 by BrokenZer0 Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted June 1, 2014 Author Share Posted June 1, 2014 At the moment I'm focusing on converting the public methods from WinToolkit v1.x into better v2 code This time round I'm actually making my own nice, clean, efficient and organised DLL which can be used in later projects. For example if both v1.x and v2.x used my DLL. I would only have to fix bugs once and both versions would be fixed But I doubt I can use it for v1.x as it's .NET 4.5 Make sense? Quote Link to comment Share on other sites More sharing options...
Cartman586 Posted June 2, 2014 Share Posted June 2, 2014 Hi Liam, can i help to test Version 2.0? Have you a download link? Quote Link to comment Share on other sites More sharing options...
Extended Posted June 9, 2014 Share Posted June 9, 2014 v2 screenshot pls with download links pls Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted June 9, 2014 Author Share Posted June 9, 2014 Again, I'm working on the *.dll part of the program so there isn't any GUI. Well there is but it's a messy as I've been experimenting with all the controls. Extended 1 Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted June 18, 2014 Author Share Posted June 18, 2014 Don't I am still on the forum. I'm just focusing my efforts on coding but mostly planning. Since I'm working on the DLL. I can't release a BETA so it requires a lot of time testing as well, then doing some tweaks, testing, then further tweaks. Testing has been taking up a lot of my time Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted July 8, 2014 Author Share Posted July 8, 2014 Ok so hopefully you guys like the GUI so far, whilst I await feedback on translation i.e. 'this or that doesn't look right in german', etc.. I will go back to coding the back end dll Quote Link to comment Share on other sites More sharing options...
Tuesday77 Posted July 8, 2014 Share Posted July 8, 2014 Whats about the dism cleanup, can you include as Windows 8 Tweak in WTK2?-> http://www.wincert.net/forum/topic/12360-wtk-aio-integrator-auto-dism-cleanup-options/ Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted July 8, 2014 Author Share Posted July 8, 2014 Most likely yes Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted August 1, 2014 Author Share Posted August 1, 2014 OK so the last week or so, I've been thinking about designs and coding the DLL. From Sunday, I will be working on the GUI again so expect more releases next week I have to for my FYP do a lot of research and push myself to learn new things and, more importantly, produce better code! Cipherfx2 and ruby 2 Quote Link to comment Share on other sites More sharing options...
Legolash2o Posted August 6, 2014 Author Share Posted August 6, 2014 Completely forgot to mention that I've started work on the GUI again. I'm just doing a whole bunch at a time Quote Link to comment Share on other sites More sharing options...
testplayer Posted August 8, 2014 Share Posted August 8, 2014 I would like to see that WTK can do all that DX WinNT6.x True Integrator can do, i.e., a DISM GUI that can enable/disable features/packages. This is very useful in deployment of windows server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.