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

AUTO INSTALLER #44

Closed
Noraxx1 opened this issue May 11, 2024 · 8 comments
Closed

AUTO INSTALLER #44

Noraxx1 opened this issue May 11, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@Noraxx1
Copy link

Noraxx1 commented May 11, 2024

i was bored so i coded a linux only bash installer script for this theme,it needs to be in the main FF-ULTIMA directory :P

(feel free to use it!!!)

this is the text version,just remove .txt and leave only. sh
install.sh.txt

HOW TO RUN IT

inside the theme directory run:
chmod +x install.sh
./install.sh

@soulhotel soulhotel added the enhancement New feature or request label May 12, 2024
@soulhotel
Copy link
Owner

Its pretty simple which is cool, ill test it out in a bit

@digitalsignalperson
Copy link

for me firefox always makes the profiles.ini file in a way that the actual profile is the 2nd one under [Profile0]

I use this

profile_dir="$HOME/.mozilla/firefox/$(kreadconfig5 --file ~/.mozilla/firefox/profiles.ini --group Profile0 --key Path)"

I'm lazy but the script could also do

  • temporarily move existing user.js
  • move the FF-ULTIMA user.js into place, then kill/run firefox for 5 seconds, then delete the user.js and move the original back into place

@soulhotel
Copy link
Owner

Yeah Im not as experienced with bash myself, I did notice the need to still enter the folder and do that exactly, I considered restructuring the source -> into a chrome folder, with the user.js on the outside like Kaedriz once suggested. It might be easier than making the directory via script, but then, the user.js doesnt need to be added in on every update, its typically a one time application.

@soulhotel
Copy link
Owner

soulhotel commented Jun 8, 2024

You know, now that im primarily on linux.. I looked at your script again to really see what its about. The script is actually really good, and I made some modifications to transformed it into a universal installer TUI

After autodetecting the current profile, or taking in a users specified profile path:

  • Ask the user to delete their chrome folder for a new theme/update
    • It uses Git, to download the latest version of the theme
    • The user can also enter a different theme's github page (example: https://github.com/user/Theme.git)
    • Then it Git clones the latest version of whichever theme straight into the chrome folder
  • It searches to see if the theme has a user.js
    • If there is a user.js, it copies it into the profile folder, and restarts firefox
    • If there is a user.js, it also removes it, after firefox is restarted

Now the script works standalone, it will download latest sources of whatever theme you input, and do the rest. Let me know what you think @Noraxx1

test.sh.txt

2024-06-07.23-11-51-mc.mp4

@Kaedriz
Copy link
Collaborator

Kaedriz commented Jun 8, 2024

I would nitpick that it requires git installed in order to work. While that is common on Linux systems, on Windows not so much I think, not sure about Mac. There is another way using download and extract, but is more convoluted as there is systems-specific code to execute commands.

You probably need a warning that git must be installed in order to installer to work, as confusion can arrive.

EDIT: But seeing as it is .sh file, it probably won't work on Windows easily. Dunno how PShell comp goes.

@soulhotel
Copy link
Owner

I would nitpick that it requires git installed in order to work.|

Yeah definitely, but that requirement can be included in the installers distribution, shouldnt be an issue since a majority (maybe all) css themes are acquired through Github anyway.

EDIT: But seeing as it is .sh file, it probably won't work on Windows easily. Dunno how PShell comp goes.

A Windows script I wouldn't even attempt, after switching to Linux as a main pc, I see more and more how complicated Windows makes things for the User. Rven potentially deleting downloaded scripts that they would have to go into Windows Defender (typically) to 'restore' is a pain.

@Kaedriz
Copy link
Collaborator

Kaedriz commented Jun 8, 2024

Just letting it here if anyone want to try Windows version.
https://stackoverflow.com/questions/60525393/install-git-if-not-installed-and-clone#60526053
Although it lacks git setup downloading, but it is a simple command to add I guess.

More work would be needed to navigate various profile folders and cleanup.

@soulhotel
Copy link
Owner

I further corrected the firefox restart process to shutdown gracefully, and restart in time for the user.js deletion phase. Added a git check at least, for the first page. Will look into making the Windows thing.

git_chrome_installer.sh.txt

2024-06-09_17-15

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

No branches or pull requests

4 participants