Hi horsemanoffaith,
I don't think the script can be made much shorter, so I'll just give some general comments:
POL_System_SetArch "x86"
I think this is the default, but ok
POL_SetupWindow_message "$(eval_gettext 'Warning- once installation is complete, please select the RETURN TO WINDOWS radio button and click OK. Nox WILL NOT run without the update patch. This patch will be applied after the NOX window is closed.')" "$TITLE"
Well, this is a general rule in PlayOnLinux not to run the program directly from the installer (and POL 4.1.x displays it one upon first installation), but ok
POL_Wine start /unix "autorun.exe"
POL_SetupWindow_message "$(eval_gettext 'Please click NEXT once Nox install is complete')" "$TITLE"
You should use POL_Wine_WaitExit "$TITLE" (one less click for the user), or even
POL_Wine_WaitBefore "$TITLE"
POL_Wine "autorun.exe"
if it works (recommended form).
cd "$HOME"
POL_SetupWindow_wait "$(eval_gettext 'Downloading NoxEng1.2 Update')" "$TITLE"
POL_Download "http://ubuntuone.com/7RYmf1uj6SAU7otuOIjwNZ"
- POL_Download will quickly overwrite the message, so it's mostly useless
- it's always recommended to specify a MD5 hash with POL_Download to validate it
- I guess it's your Ubuntuone account, is it ok to host this file there, and for how long will it be there?
- $HOME is not appropriate for temporary stuff, use $POL_USER_ROOT/tmp for that
cd "$HOME"
POL_SetupWindow_wait "$(eval_gettext 'Downloading NoxEng1.2 Update')" "$TITLE"
POL_Download "http://ubuntuone.com/7RYmf1uj6SAU7otuOIjwNZ"
- if you really want to change current display, use POL_SetupWindow_wait (non blocking). That said, mkdirs are fast, you could drop that altogether
- and again, $HOME is not the right place for temporary stuff
cp -R "$CDROM/install/music"/* "$HOME/nox/music"
cp -R "$CDROM/install/movies"/* "$HOME/nox/movies"
- Consider using POL_System_CopyDirectory, along with a POL_RequiredVersion "4.0.18" (to put right after POL_SetupWindow_Init) since it's only available starting from that version. Agree, it's not documented :/
- Why aren't you copying the files directly into the virtual drive without this intermediary temp location?
- How comes the installer doesn't copy those files over?
cp "$CDROM/install/nox.ico" "$REPERTOIRE/icones/32"
cp "$CDROM/install/nox.ico" "$REPERTOIRE/icones/full_size"
I think files should really be PNGs; Best (and standard) way is to prepare the icon files and to put them on the server, I'll help you with that if needed.
Also, $REPERTOIRE is deprecated, use $POL_USER_ROOT instead.
POL_SetupWindow_message "$(eval_gettext 'Regretfully, the NoxEng12.exe patch must be applied manually. Please navigate to your PlayOnLinux main screen and click CONFIGURE. On your PlayOnLinux configuration screen, please select Nox, then click on the MISCELLANEOUS tab. Click on the RUN A .EXE FILE IN THIS VIRTUAL DRIVE button and navigate to your home directory. Find the NoxEng12.exe file, select it, then click Open. This will install the patch for you. Please click NEXT when this step is complete.')" "$TITLE"
Really, what happens you if do POL_Wine NoxEng12.exe? I don't understand why it could be made to work, short of bugs.
POL_SetupWindow_message "$TITLE has been successfully installed!" "$TITLE"
Personally I don't like those "last messages", a matter of taste I suppose.
Regards, Pierre.
Editiert von: petch