Atlas-OS / Atlas

🚀 An open and lightweight modification to Windows, designed to optimize performance, privacy and usability.
https://atlasos.net
GNU General Public License v3.0
13.01k stars 506 forks source link

Source Code Management - Open to Suggestions #77

Closed Zusier closed 2 years ago

Zusier commented 2 years ago

Hello everyone! I have a decision to make regarding source code management and I want your opinions. As you all know, 1803 is being worked, on but with a huge hiccup: Keeping the 1803 script up to date with 20H2 changes (vice versa) is HARD.

Here are my current ideas on how to deal with this:

  1. Manually edit the script for each change (current solution, very tedious)
  2. Keep it under a single script, add if statements for versions. (Flexible, some may argue it "bloats" the script) 3. Rewrite in different language? (dont really have a reason, other than it being a nice learning experience. Theoretically would be faster due to asynchronous processing)

I'm up for other ideas. The 3rd option may just be a side project as it's arguably not viable and would take a long time

ghost commented 2 years ago

what about a new branch for 1803 which can merge with 20h2? or use the option 2 since is the better way

Zusier commented 2 years ago

Branches are not going to be an option. You cant selectively merge with them (some things in 20h2 are not usable within 1803)

Option 2 is most likely what i'll go with. Just wanted to see if anyone had other ideas

spddl commented 2 years ago

and then what is the goal of it? To build AtlasOS for every Windows version? and the script decides what to run?

Zusier commented 2 years ago

Im working on both 20h2 and 1803 which are currently separate scripts. Which makes it an absolute pain to update. Trying to make it easier to manage

spddl commented 2 years ago

I would prefer a script or routine that decides what to apply based on the OS version. But I would have problems to write this in batch because the structure becomes more and more important.

jacksyrm commented 2 years ago

Why don't you create a base script which will read a directory you have setup with a file named "1803" or "20h2" and from there will download the script from GitHub. I know it's not really solving the pain in the ass but it will be cool nonetheless.

ghost commented 2 years ago

I have the same dilemma, more than likely the settings for 1803 and 20H2 will be identical so there will be no need to use two separate scripts. For the settings that do not exist or are specific to one version or another, a simple "if not 1803 do blah blah" could be used instead.

spddl commented 2 years ago

I like the idea of SyrmGIT

create multiple folders with subfolders for the structure and there can be e.g. json files starting with //1803-2004 to compare them with the current version. Underneath is a JSON object that maps the registry. JSON objects can be merged and later exported to a registry file and executed.

└───Scripts
    ├───Network
    │       Tweak1.json
    │       Tweak2.json
    │
    └───Services
            Tweak3.json
//1803-2004
{
    "HKEY_LOCAL_MACHINE": {
        "System": {
            "CurrentControlSet": {
                "Services": {
                    "AFD": {
                        "Parameters": {
                            "DoNotHoldNicBuffers": {
                                "value": "1",
                                "type": "REG_DWORD",
                            }
                        }
                    }
                }
            }
        }
    }
}
Zusier commented 2 years ago

I think I'm going to stick with 2/AMIT's idea, there's a very small amount of differences I need to change between the two. Going to close after a few hours incase anyone has some extra ideas.

spddl commented 2 years ago

that's ok if you only 2 versions after that I think it will be more difficult :D