WhyNotWin11
WhyNotWin11 copied to clipboard
Improve script structure
Move general code for better structure
- [x] Move FileInstall into
_ResourceHelper.au3 - [x] Create
_OtherHelpers.au3for various small functions- [x] Move _INIUnicode($sINI)
- [x] Move _Translate($iMUI, $sString)
- [x] Move all other small functions like the one before.
- [ ] Move command line processing into
_CommandLineHelper.au3 - [x] Combine related functions (example:
HighContrast+LightTheme=>GetColorTheme)
Checks
- [x] Create a function for every check and place it in
_Checks.au3- [x] Use this functions for GUI and command line
Gui code
- [x] #699
- [ ] Move all Gui related functions including GDI+ function (
_GDIPlus_GraphicsGetDPIRatio)
- [ ] Move all Gui related functions including GDI+ function (
- [x] Add new function
_UpdateScanResult($iScanResultIndex, $iState, $sResultText, $sResultInfo)=> $iState = Question, Warning, Okay, Error
Comments and structure
- [ ] Add a comment to each function like this:
; Description: Function does ...
; Input: param1 = ...; param2 = ...
; Output: ....
; On error: ....
- [ ] Structure code by adding comment structure (Not only this region thing, which isn't supported by every editor.):
; ========= Init global vars ====
(...)
; ======== Includes ========
; AutoIT-UDFs
(...)
; Internal Includes
(...)
; ========= Init Gui =========
(...)
; ========== Begin Checks ===============
; Checking CPU
(...)
; Checking GPT
(...)
- [ ] Improve script order (Main part):
1. Global vars
2. Includes
3. Options
4. Check OS
5. Init Gui part or command line part
6. run checks for command line or gui
Folder/file structure
- [ ] Align naming: All upper case or all lower case.
- [ ] Move source code (*.au3, include, lang, assets) into folder
/src. - [ ] Fix include commands
- [x] Fix Wrapper_Add_Icon commands path.
@rcmaehl This would help other contributors to fast understanding the code. I would do it. But this makes no sense because this is inkompatibel to other commits.
Could you format points as [ ] ? That way it would be easier to tell progress. I assume that it's unlikely to so such big task all at once.
@micwoj92 Done!
Should I assign this to you?
Should I assign this to you?
Me
Updated main comment.
@rcmaehl you can assign yourself :P
@rcmaehl
We should use the same naming structure for the same type of include. This means Resources.au3 should be _Resources.au3.
@rcmaehl
- Your includes are broken. (See fix here: https://github.com/htcfreek/WhyNotWin11/commit/9a24e7d6a2e446e0e8d5973475a66b20dfa8eeb0)
- The lang copy is broken. It crashed my changed lang files. (Don't know why.)
As far as I know you are using this IDE called "ISN AutoIt Studio" while Robert uses Scite4Autoit, could you try with Scite and see if it still is issue?
As far as I know you are using this IDE called "ISN AutoIt Studio" while Robert uses Scite, could you try with Scite and see if it still is issue?
- The includes are working now. The error came from Wrapper and tidy.
- The lang files aren't broken. But the doesn't get read.
Let me work tomorrow on this. It's time for sleeping. 😅
@rcmaehl
Csn you please stop doing this .\ things while including. This breaks code. You need "Includes\...au3".
See here: https://www.autoitscript.com/autoit3/docs/keywords/include.htm
@rcmaehl I have added a new group "Folder/file structure" to the checklist.
How does that break?
@micwoj92 The include files/assets aren't found/included. Wrapper and Check saying that files aren't available.
@micwoj92 Can you please add "In-progress" lable.
Has there been any progress on this in ~1 year?