rcmaehl / WhyNotWin11

Detection Script to help identify why your PC is not Windows 11 Release Ready. Now Supporting Update Checks!
https://whynotwin11.org
GNU Lesser General Public License v3.0
6.12k stars 417 forks source link

Improve script structure #412

Open htcfreek opened 3 years ago

htcfreek commented 3 years ago

Move general code for better structure

Checks

Gui code

Comments and structure

; ======== 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.

micwoj92 commented 3 years ago

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.

htcfreek commented 3 years ago

@micwoj92 Done!

micwoj92 commented 3 years ago

Should I assign this to you?

rcmaehl commented 3 years ago

Should I assign this to you?

Me

htcfreek commented 3 years ago

Updated main comment.

micwoj92 commented 3 years ago

@rcmaehl you can assign yourself :P

htcfreek commented 3 years ago

@rcmaehl We should use the same naming structure for the same type of include. This means Resources.au3 should be _Resources.au3.

htcfreek commented 3 years ago

@rcmaehl

  1. Your includes are broken. (See fix here: https://github.com/htcfreek/WhyNotWin11/commit/9a24e7d6a2e446e0e8d5973475a66b20dfa8eeb0)
  2. The lang copy is broken. It crashed my changed lang files. (Don't know why.)
micwoj92 commented 3 years ago

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?

htcfreek commented 3 years ago

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?

  1. The includes are working now. The error came from Wrapper and tidy.
  2. The lang files aren't broken. But the doesn't get read.

Let me work tomorrow on this. It's time for sleeping. 😅

htcfreek commented 3 years ago

@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

htcfreek commented 3 years ago

@rcmaehl I have added a new group "Folder/file structure" to the checklist.

micwoj92 commented 3 years ago

How does that break?

htcfreek commented 3 years ago

@micwoj92 The include files/assets aren't found/included. Wrapper and Check saying that files aren't available.

htcfreek commented 3 years ago

@micwoj92 Can you please add "In-progress" lable.

micwoj92 commented 2 years ago

Has there been any progress on this in ~1 year?