Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Powershell script for Windows installation/configuration #19

Closed
CaptaPraelium opened this issue Dec 10, 2017 · 3 comments
Closed

Comments

@CaptaPraelium
Copy link

Sorry if logging an issue is not the correct way to suggest this, I don't github often.

It has occurred to me, that it should be possible to make a short (maybe one-liner) powershell script for installation. This would allow users to follow a very short and simple process to install the project, without needing to install git or any other additional tools. The process would be something like:

Use the address bar to visit about:support
Click on the Show Folder button available next to the label Profile Finder.
Click File... Open Windows Powershell
Paste in the following command and hit Enter:
    xxxxxxxx

It may even be possible to use powershell to find the profile directory (I'm fairly sure we could parse profiles.ini), thus making this a matter of downloading a .ps script and running it.

The script could then download the zip, create the chrome folder and any necessary files which do not already exist, and append this project's @import commands to those files (preserving existing content), extract the zip to the appropriate location, etc.

If we go all-out, we could provide a simple text menu allowing the user to select highlight colours, optional tweaks (the script could un-comment @import lines), etc.
Perhaps the script would also be able to modify options for extensions, so that colours match (thinking about https://github.com/m-khvoinitsky/dark-background-light-text-extension)

I'm fairly comfortable with manually extracting the zip file personally, and those who have git on their machine will surely want to use that, but I think this is going to be a very very popular project, and less-tech savvy users will want a way to install it, which is familiar to them and has less chance of something going wrong like extracting it to the wrong place.

I don't want to make extra work for you and I'm not sure you own a windows PC, so I would be happy to provide this script if you would be interested. I've not looked into it too deeply and perhaps it might not be perfect or even possible, but everything seems quite straightforward at this point. I don't work as fast as you though ;) There are a few variables to consider (such as upgrading existing installations, preserving existing user modifications, etc) so it would take some time to make sure it's done right.

@overdodactyl
Copy link
Owner

Hi there!

I think something along these lines is a fantastic idea and would love to see something like this incorporated into the repository :) It's late, so I apologize in advance for any ramblings haha.

Now that the project is, dare I say it, starting to reach a more "stable" form, I think a little more focus needs to be centered towards user-friendliness.

This would include:

(1) The initial install

(2) Keeping up-to-date with changes

(3) Customizability

(4) Improve the GitHub site/README/create a WIKI outlining how to do all the above

I think there are a lot of different approaches we could take to all of these and are worth looking into/considering before we decide on a path.

For example we could:

(1) Create a shell/bash script similar to what you are describing.

Advantages:

  • Relatively easy to use (would require a user to download the script, run it from the command line)

Disadvantages:

  • Would be OS dependent (would need to create/maintain different scripts for Windows, macOS, etc.)

  • Might be difficult to incorporate a good way for users to keep up to date (how frequently changes to the repo need to occur once it's initial set-up is done has yet to be seen)

(2) Create a python program to do everything you mentioned

Advantages:

  • Not OS dependent

  • Could fairly easily create a GUI for users to interact with, pick colors, select what files/changes they want incorporated etc.

Disadvantages

  • User would have to download python

(3) Create official "releases" through GitHub

Advantages:

  • Simplifies the process of gathering/downloading the necessary files off GitHub

Disadvantages:

  • Doesn't simplify the process of moving the download to the correct location

  • Makes "quick fixes" much more difficult/almost impractical

(4) Recommend the use of git

Advantages:

  • No need to "re-invent the wheel" in terms of finding a way for a user to reliably install/update the repo across all platforms.

Disadvantages:

  • User would have to install/use git

(5) Any combination of the above.


I'm open to discussion, so I'm glad you brought this up/started the topic. I don't have my heart set on anything yet...but I almost think the best approach would be this:

(1) Recommend git for install/keeping up to date. It might be a bit of a learning curve, but we should be able to write a "how to" that's easy to follow.

Installing is a matter of one of two commands from the command line, and then we could give the user the proper commands. i.e.

git clone https://github.com/overdodactyl/userContent-tweaks/ xxxx

and then git pull to update. On top of this, if the user already has to use the command line for a script, I'm not sure git is terribly more complicated. We could even write a little script that automatically pulls from the repo every so often to keep updated without having to do anything. Alternatively, we could also write a little script that when it's executed, it does the pull request and grabs the new lines from the README (which I'll need to be better about updating...it's been a few days) and prints them out for the user to see.

Taking this approach would also save us some time/effort which could allow us to focus on creating some type of GUI to do the things you mentioned - i.e. select colors, uncomment necessary import statements etc.

For reference, here is a little script I recently wrote for another repo I frequently use. Basically, it takes file A from a profile directory, creates a backup of it, downloads the new version of file A off the repo, puts it in the directory, and appends file B to the end of it. It's a little longer than you may expect, but might provide as a good base point/references if we go with the route you suggested.

Anyways, these are just a few thoughts! Honestly I'm just stocked to have someone like you making recommendations and volunteering to help :) So any scripts you want to write, code you want to include etc., we will find a way to incorporate it in...not a chance I won't add something someone provides!

Thoughts?

@CaptaPraelium
Copy link
Author

Having covered most of this in the #14 thread, I think you've got this covered with the release plan. Good to close this? I'm happy to contribute any windows-specific stuff you like.

@overdodactyl
Copy link
Owner

We could certainly close it -

I think the only thing you brought up here is the idea of a script that moves the directory to the correct location...I'm not sure if that's a really necessary thing though or just more work/things to upload/download that no one would use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants