I've been trying now to make scripts for several different games, the install/uninstall functionality and so on and I've got some issues / suggestions / looking for best practises.
1. My first issue is that applications don't uninstall cleanly. Even though the wineprefix directory is deleted, many games install application icons to the desktop or the wine start menu that will not be removed if you use PlayOnLinux's "Remove" command. This is due to the desktop integration (winecfg -> Desktop Integration -> Shell Folder).
a) Run the application's uninstaller before deleting the prefix itself.
b) Delete these manually as part of some uninstall script.
c) Disable the integration during install and just install our own shortcuts.
2. My second issue is that applications often install some support tools like Acrobat reader, which will get installed and reinstalled from different wine prefixes overwriting each other. In particular, some people would like Acrobat reader installed in their main .wine install and PlayOnLinux apps/games will overwrite the links. These should really remain unlinked only to be run if the game launches a pdf manual or such.
a) Try to disable installation of these tools from POL scripts
b) Disable the integration during install and just install our own shortcuts.
3. My third issue is that many applications seem to come with their icon embedded in the exe file, and there's no easily available/stable download location with the icon in a Linux-compatible format. It seems these icons are displayed properly when the shortcut is created inside WINE by the installer itself, but I can't find an easy way to make use of them in POL scipts. What I have found is that you can extract them using wrestool from the iconutils package and convert them to png using convert from the imagemagick package, but you can't assume everyone have those installed (I didn't).
a) Convert once, try to upload somewhere on free hosting
b) Modify the script to complain and make users install these packages
c) Use some other/no icon
4. My forth issue is regarding using common utility scripts. For now, several of my scripts download the winetricks script, sets it as executable (chmod +x) and runs it to install directx, .NET and various other dlls a game might need. Some of those options require a Windows license etc. and I hope that's ok, it's nothing like cracks/no-cds or such but it's still legally a bit in the gray.
Another question on whether this is an acceptable practise, if anyone were able to replace that script it gets run without any checks. Though I suppose that'd be the same with POL scripts, it might be safer and easier to include it as some sort of standard script in POL. As far as I can tell POL pretty much drops you in a bash script and you must do everything yourself.
5. This is more of an enhancement, I've noticed that winetricks does optional checksum verification on downloads and this may also be a good idea for POL. It would add a layer of extra security that the file downloaded is the same as the one the script creator used, so if it gets replaced by a hacker or something the script will no longer run it.
Apart from that, I must say PlayOnLinux for the most part works great and is an easy way to keep multiple apps in their own wine sandbox. I think you can expect more scripts from me in the future...