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

Add feature to automatically download levels from Mods repository #4

Open
thekovic opened this issue Jul 22, 2024 · 2 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@thekovic
Copy link
Owner

The current community archive of mods/levels is at https://github.com/Jones3D-The-Infernal-Engine/Mods . This is not the most user-friendly to download from. Indy3DModInstaller could be extended to scan this repository and allow the user to select and automatically download a mod from there.

@thekovic thekovic added enhancement New feature or request good first issue Good for newcomers labels Jul 22, 2024
@NekoJonez
Copy link

In Powershell this would be

$download_location = "C:\Temp_Mod_Folder"
$download_mod_temp_file = $download_location + "\sedlevel.zip"

Invoke-WebRequest -Uri https://github.com/Jones3D-The-Infernal-Engine/Mods/archive/refs/heads/main.zip -OutFile $download_mod_temp_file

Expand-Archive -Path $download_mod_temp_file -Out $download_location

# DO YOUR MOD INSTALL MAGIC HERE.

I'd also write some logic then to disable that feature if the tool sees that it's offline. You don't want to throw errors to the user like not connected errors from Windows and such. Since those are too technical. What I usually do is write a function to check if we are online and then disable or enable the buttons if we are online or offline and adjust my error messages to something more human readable.

@NekoJonez
Copy link

https://github.com/NekoJonez/RandomProjects/blob/867b2d0b2070741a1b20297f483b24318213cd29/Indiana%20Jones%20Custom%20Levels%20project/IndyPatcher.ps1#L782-L800

This is how I did the downloading and extraction of the tools in my tool... those tools you include in your install.

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

No branches or pull requests

2 participants