• Home
  • Category: Wine

Fix for winetricks bug – Invalid download URL

I was trying to install irfanview on Kubuntu.

This was the bug description:

Executing w_do_call irfanview
Executing load_irfanview
Executing mkdir -p /home/droidzone/.cache/winetricks/irfanview
------------------------------------------------------
Checksum for /home/droidzone/.cache/winetricks/irfanview/iview428_setup.exe did not match, retrying download
------------------------------------------------------
Downloading http://www.software.com/files/iview428_setup.exe to /home/droidzone/.cache/winetricks/irfanview
--2012-04-26 22:21:50-- http://www.software.com/files/iview428_setup.exe
Resolving www.software.com... 204.51.130.11
Connecting to www.software.com|204.51.130.11|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-04-26 22:21:51 ERROR 404: Not Found.[/code]

------------------------------------------------------
Downloading http://www.software.com/files/iview428_setup.exe failed
------------------------------------------------------

First do a:
grep -n 'iview428_setup.exe' `which winetricks`

This is to find out the location (line) which we have to edit. After all, winetricks is just a script!

Find the sha1sum of the downloaded file:

sha1sum ~/downloads/iview433_setup.exe
79a7ebe2325ad204712761aa3c3a072025b07784[/code]

Then, do a which winetricks to find the location of winetricks and edit it.
That is, do:

sudo kate `which winetricks`[/code]

Copy the file to /var/www/

cp ~/downloads/iview433_setup.exe /var/www/[/code]

Edit winetricks:

w_metadata irfanview apps
title="Irfanview"
publisher="Irfan Skiljan"
year="2011"
media="download"
file1="iview433_setup.exe"
installed_file1="$W_PROGRAMS_X86_WIN/IrfanView/i_view32.exe"
homepage="http://www.irfanview.com/"[/code]

load_irfanview()
{
#w_download http://www.software.com/files/iview428_setup.exe
# a51c3f5fbb651c4c00f13c59d3de9d0f0552ea46
w_download http://files.brothersoft.com/photograph_graphics/image_viewers/iview433_setup.exe
79a7ebe2325ad204712761aa3c3a072025b07784

Note the change from iview428_setup.exe to iview433_setup.exe at the first location,
and the url change from http://www.software.com/files/iview428_setup.exe which is broken to http://localhost/iview433_setup.exe.

Of course this works only if you have LAMP installed. If you don't, just use the correct url from brothersoft. The one for iview433_setup.exe is

http://files.brothersoft.com/photograph_graphics/image_viewers/iview433_setup.exe[/code]