PhoenicisOrg / phoenicis

Phoenicis PlayOnLinux and PlayOnMac 5 repository
https://phoenicis.org/
GNU Lesser General Public License v3.0
674 stars 73 forks source link

[Easy] Implement POL_Download in bash #7

Closed qparis closed 9 years ago

qparis commented 9 years ago

Currently, POL_Download is implemented in Python: This feature need to be implemented in bash for backward compatibility. As the feature is already implemented in the java core, the bash implementation will be straightforward.

The following code will download a script.

from com.playonlinux.framework import SetupWizard
from com.playonlinux.framework import Downloader

setupWindow = SetupWizard("Test script")
Downloader(setupWindow).get("http://files.metaquotes.net/metaquotes.software.corp/mt4/mt4setup.exe").check("e42ebc9ebc2d8975de5a0c94386d1a6a")

setupWindow.close()

To achieve that you need to:

POL_Download ()
{
    # Download a file and place it in the current directory
    # Usage: POL_Download [URL] [MD5]

        # To be implemented
}
4thguy commented 9 years ago

I want to see if I understood your request correctly.

You want a script that performs a download (wget), checks the file against a hash, and returns a success or fail. Then you want to check the result using Python in SetupWindowCommandParser.py.

qparis commented 9 years ago

Not exactly, the download part has already been implemented.

Another guy has already started on this one, have a look at the pull request list :-)

4thguy commented 9 years ago

OK, thanks for the heads up.

My Python-fu is very weak, but hopefully I'll be able to contribute more with the Java aspects of the project.

qparis commented 9 years ago

Thanks :-)

You can have a look at the pull request and do the same for POL_SetupWindow_free_presentation if you want

qparis commented 9 years ago

Fixed by commit 632b240aa6f09d4b47f2d2b022a530d975600e59 Many thanks to seijikun