henrikstengaard / hstwb-installer

A set of scripts to automate installation of Amiga OS, Kickstart roms and packages to new or existing Amiga HDF files
https://hstwb.firstrealize.com
MIT License
100 stars 7 forks source link

Linux/macOS compatibility fixes #34

Open renaudguerin opened 4 years ago

renaudguerin commented 4 years ago

This PR has 2 changes that should fix issue #28 :

  1. Modify hstwb_image_setup.py so that it parses Windows-style newlines correctly (the included FS-UAE config file is in Windows format) even when run on Linux/macOS. This is done by opening the config files with the "universal newlines" option (see https://docs.python.org/2/library/functions.html#open) A cleaner way to do this would be to just convert the scripts to Python 3, which understands all types of newlines (also unicode) by default. It should be easy to do with a tool like : https://docs.python.org/2/library/2to3.html )

  2. Add missing newlines at the end of FS-UAE config files (otherwise the floppy_image_0 entry ends up on the same line as the theme, causing a syntax error)

renaudguerin commented 3 years ago

Hello, any feedback on this ? :)

renaudguerin commented 3 years ago

Hey, I hope this can be merged for the next 1.5 release ?

henrikstengaard commented 3 years ago

I have upgraded the python scripts from 2 to 3 part of release v1.5.x and as far as I know this should fix it as well, but I have to verify it on Linux/macOS.

But I'm missing the newline fix for floppy images. I will take this part of next release v1.5.2.