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

FIXED/SOLVED - Suggestion>Update method #44

Open
0x4e44 opened this issue May 4, 2021 · 13 comments
Open

FIXED/SOLVED - Suggestion>Update method #44

0x4e44 opened this issue May 4, 2021 · 13 comments

Comments

@0x4e44
Copy link

0x4e44 commented May 4, 2021

Would love to have app or some sort of way to easy update the Wrapper.

Even a script that Downloads something off the web with some curl commands and puts it into the right directory then launch the Diablo II game./Plugy.

Like a Launcher like Slash Diablo with all the updates of the new wrapper and everything.

@0x4e44 0x4e44 changed the title update Update method May 4, 2021
@0x4e44 0x4e44 changed the title Update method Suggestion>Update method May 4, 2021
@eleriaqueen
Copy link

eleriaqueen commented May 5, 2021

Personally I go to https://github.com/bolrog/d2dx/releases/ and check release notes, then download.

Edit : There doesn't seem to be a way to do a quick Curl command to download latest D2DX release because they're named after the version number which changes each time.

Were they all named d2dx.zip I think the direct link would always have been https://github.com/bolrog/d2dx/releases/latest/download/d2dx.zip

@bolrog
Copy link
Owner

bolrog commented May 5, 2021

A good suggestion, I should name the zip consistently at a minimum.

@bolrog
Copy link
Owner

bolrog commented May 5, 2021

Release 505 onward will omit the version nr in the zip name.

@eleriaqueen
Copy link

eleriaqueen commented May 5, 2021

Can confirm the following URL points to latest release.

https://github.com/bolrog/d2dx/releases/latest/download/d2dx.zip

For the laziest of lazies I whipped up a windows batch file which downloads latest release using curl :
d2dx_downloader_v1_win32.zip

@0x4e44
Copy link
Author

0x4e44 commented May 5, 2021

Made a script that can be ran with powershell.

-Download and update the wrapper into the right directory

and then launch it

Update wrapper.zip

Thanks again !

@eleriaqueen
Copy link

eleriaqueen commented May 5, 2021

I modified your script to use $env:TEMP+'\d2dx.zip' as temp directory which is less likely to fail (on my computer c:\temp didn't exist and script failed) and made a second Registry-based script which is useful if Diablo II was properly installed.
Oh and I removed the line which auto-launches the game because executable shortcuts exist for a reason.

Edit : Should be good now ;
D2DX Update Wrapper (Manual Path & Registry) v0.2.zip

Further Edit (Version 0.3 does things slightly cleanlier and puts documentation and licenses inside d2dx-addendum inside Diablo II folder) :
D2DX Update Wrapper (Manual Path & Registry) v0.3.zip

@0x4e44
Copy link
Author

0x4e44 commented May 5, 2021

I modified your script to use $env:TEMP+'\d2dx.zip' as temp directory which is less likely to fail (on my computer c:\temp didn't exist and script failed) and made a second Registry-based script which is useful if Diablo II was properly installed.
Oh and I removed the line which auto-launches the game because executable shortcuts exist for a reason.

Edit : Should be good now ;
D2DX Update Wrapper (Manual Path & Registry) v0.2.zip

Further Edit (Version 0.3 does things slightly cleanlier and puts documentation and licenses inside d2dx-addendum inside Diablo II folder) :
D2DX Update Wrapper (Manual Path & Registry) v0.3.zip

That is just magnificent! I really like that. That Will help me to be able to be on the latest and greatest all the time :) Thanks mate !

@updawg
Copy link

updawg commented May 5, 2021

You should have the script do a compare hash to see if the file is different indicating a new version and alert the user if there is a change.

Get the file hashes

$hashSrc = Get-FileHash $file -Algorithm "SHA256"
$hashDest = Get-FileHash $file2 -Algorithm "SHA256"

Compare the hashes & note this in the log

If ($hashSrc.Hash -ne $hashDest.Hash)
{
Add-Content -Path $cLogFile -Value " Source File Hash: $hashSrc does not
equal Existing Destination File Hash: $hashDest the files are NOT EQUAL."
}

@eleriaqueen
Copy link

eleriaqueen commented May 5, 2021

I am writing a script which does file hashes, it is moderately verbose and prints hash results in Powershell prompt.

@eleriaqueen
Copy link

eleriaqueen commented May 5, 2021

D2DX Automated Updater v0.5a.zip (Typo Fix)

@0x4e44 0x4e44 changed the title Suggestion>Update method FIXED/SOLVED - Suggestion>Update method May 5, 2021
@bolrog
Copy link
Owner

bolrog commented May 6, 2021

Fantastic, thanks!

@IAmTrial
Copy link

I think an updater like this should exist as a separate repo, as GitHub issues is not exactly the best place to post automated updating systems where it can get lost in a crowd of bug reports or feature requests.

@eleriaqueen
Copy link

eleriaqueen commented May 12, 2021

You might be right @IAmTrial, I was just not confident enough it would be useful so I posted it for the small handful of people who found it a pain to update.

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

5 participants