R0rt1z2 / realme-ota

Request and download OTA packages from BBK server(s)
GNU General Public License v3.0
150 stars 49 forks source link

Fixed installation script under Windows #40

Closed wjdob closed 1 year ago

wjdob commented 1 year ago

Corrected PowerShell installation script by adding features of:

I adjusted README.MD and Install.ps1 to hyperlink to my fork, so feel free to change it back to master :)

R0rt1z2 commented 1 year ago

Thank you very much! I was planning to fix the script sooner or later but I see you went ahead ;) I've applied the changes manually (keeping your authorship), hope you don't mind.

wjdob commented 1 year ago

Not a problem, glad to help :) One thing I noticed is that you have merged the .bat wrapper into a main directory. The installation script checks for the .bat wrapper inside the realme_ota folder, so you may want to move it there :)

R0rt1z2 commented 1 year ago

Should be fixed now!

wjdob commented 1 year ago

Line 312 and 313 in Install script - adjust the link to reflect your Github master. Currently it points to my fork :)

R0rt1z2 commented 1 year ago

Updated that too, sorry! However, I just tried to run the script on my machine and the last step fails? image

wjdob commented 1 year ago

image

I suspect that line 307 may need to be wrapped to wait until Remove-Item completes. My computer has SSD, but I can imagine that on a HDD-based system the seek-time may cause too long of a delay when scanning sub-directories, so the system prompt for recursive removal may not show up instantly.

EDIT: Found more information about this. Seems like it is an ongoing bug with Remove-Item feature that runs asynchronously in Windows 10 versions before 20H2 : Powershell Remove-Item not waiting More info: PowerShell GitHub Windows 20H2 update seems to fix it.