pfirsich / makelove

A build tool for löve games
MIT License
144 stars 12 forks source link

Odd Löve version not handled gracefully #5

Closed hollunder closed 4 years ago

hollunder commented 4 years ago

Apparently this particular Windows build was named 11.0.0 and makelove didn't handle it too gracefully. For AppImage it offered 11.3 instead.

$ ~/.local/bin/makelove --version-name 4
Loading config from default path 'makelove.toml'
Guessed löve version from conf.lua: 11.0
Building version '4'
Building targets: win32, win64, appimage
Assembling game directory..
Warning: Pattern './makelove-build//*' does not match any files
Created ./makelove-build/4/love/Blind Wumpus World.love
>> Building target win32
No love binaries specified for target win32
Downloading love binaries to: '/home/murks/.cache/makelove/love-binaries/11.0/win32'
Traceback (most recent call last):
  File "/home/murks/.local/bin/makelove", line 8, in <module>
    sys.exit(main())
  File "/home/murks/.local/lib/python3.8/site-packages/makelove/makelove.py", line 316, in main
    build_windows(config, version, target, target_directory, love_file_path)
  File "/home/murks/.local/lib/python3.8/site-packages/makelove/windows.py", line 177, in build_windows
    download_love(config["love_version"], target)
  File "/home/murks/.local/lib/python3.8/site-packages/makelove/windows.py", line 45, in download_love
    with urlopen(get_download_url(version, platform)) as response:
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
pfirsich commented 4 years ago

Hey hollunder, thank you so much for your contributions! I am happy someone starts using this thing :) For AppImages I just used the latest minor version, because I can't be bothered to build an AppImage for every minor version. I added a special case for just this version, as it seems to be the only one were the file name differs from the version. I also saw it as an invitation to move the download URL to GitHub!

hollunder commented 4 years ago

I want to make AppImages for all of my (mostly gamejam) games anyway, so makelove being able to do that for me is very welcome. I'm taking it slow, this was the most basic usage, but I expect to find a couple more bugs before I'm through with all of my games.

The latest minor for each major version should be fine I guess.

I don't know what you mean by moving the download URL.

pfirsich commented 4 years ago

Previously the löve binaries were downloaded from bitbucket, but since the löve repository moved to GitHub now, I changed the download links to download from GitHub now.

I'm thankful someone finds these bugs. Whatever you find, let me know! I still have a post-it reminding me to implement the Mac builds on my screen and if I hadn't spend most of the evening on other makelove stuff, I finally would have done it, but I hope I'll get to it soon.

hollunder commented 4 years ago

Ah, thanks for the explanation. It seems love2d.org still refers to the bitbucket though.

Finding bugs is something I enjoy, so don't worry^^

Also don't worry about that Mac stuff, it's really nice-to-have and nothing more. Apple really likes to make things unnecessarily difficult, so if that leads to stuff not being available on Mac then so be it.

Thanks for makelove and all the effort you put into it!