{Feature] Create a py script to access the env and perform the update
Closed this issue · 4 comments
Ive been trying to figure out how to create a python script that will automatically access the env and perform the commands to install/update Gamma.
This would be a nice additional script to have once the initial process has been created.
Now i dont know anything about coding in python, so ive been using ChatGPT to get an understanding ( as much as i hate using AI)
Ive came up with this script here, but i get this error
*Complete script
I got everything figured out, i was over complicating things
This is using the .venv
environment
Python script i created is here
Would love to see this implemented once the information regarding the directory location is taken care of
Slowly working on this
i redid my gamma-launcher since it was originally in an ENV over to .venv and it seems that the modules in the commands are broken for me
Also trying on the standalone executable and i can get it to download the Main files, but i get this error: it doesnt matter if i use the MAGIC workaround or the preload
/etc/magic, 0: Warning: using regular magic file /usr/share/misc/magic' /etc/magic, 0: Warning: using regular magic file
/usr/share/misc/magic'
[+] Updating G.A.M.M.A. definition
will be updated from 846 to 848
downloading archive...
- Downloading Stalker_GAMMA-main.zip: 309MiB [00:06, 52.8MiB/s]
/etc/magic, 0: Warning: using regular magic file `/usr/share/misc/magic'
Traceback (most recent call last):
File "gamma-launcher.py", line 8, in
File "launcher/cli.py", line 68, in main
args.cobject().run(args)
File "launcher/commands/install.py", line 341, in run
(self._update_gamma_definition if not args.custom_def else self._set_custom_gamma_def)(args.custom_def)
File "launcher/commands/install.py", line 258, in _update_gamma_definition
extract_git_archive(gdef, self._grok_mod_dir, 'Stalker_GAMMA-main')
File "launcher/archive.py", line 76, in extract_git_archive
_extract_func_dict.get(mime)(filename, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "launcher/archive.py", line 60, in extract_archive
}
File "magic/init.py", line 178, in from_file
File "magic/init.py", line 165, in _get_magic_type
File "magic/init.py", line 73, in init
File "magic/init.py", line 332, in magic_load
File "magic/init.py", line 225, in errorcheck_negative_one
magic.MagicException: b'could not find any valid magic files!'
[121157] Failed to execute script 'gamma-launcher' due to unhandled exception!
I feel like im getting closer
The other thing i want to do is figure out the --cache-directory command; i dont see any option on where to add that.
When i do 'gamma-launcher --cache-directory ... it reports invalid command
Ive been trying to figure out how to create a python script that will automatically access the env and perform the commands to install/update Gamma. This would be a nice additional script to have once the initial process has been created. Now i dont know anything about coding in python, so ive been using ChatGPT to get an understanding ( as much as i hate using AI) Ive came up with this script here, but i get this error
Went back through the script and it looks like i had the "Gamma-launcher" pathed to the standalone executable and not the one created inside the venv. going to adjust that tonight and see if that helps. Internet went down at home
Hi,
Sorry this cant be implemented in this repo.
- This is a personal script to do the update
- ChatGPT was used to generate the code
At best, I can modify my code to create a configuration file to remember the last Anomaly / GAMMA dir.
No problem, I was curious if i could get it to work and i learned a little bit about python :)
The configuration file would be a wonderful addition to have to help make things easier for gamma-launcher.