This is my first script and could use a good proof-reading from you all. Constructive criticism welcome.
Let's do that then ;)
That will have to match the script name in the repository, so just "OCTGN" is better.
# Get user input on prefix name
POL_SetupWindow_textbox "Please select a simple name for the winebottle? (octgn is fine)" "$TITLE"
I see no point in having the user choose the prefix name, if "octgn" is fine, just use that. It's also strange to ask questions even before script presentation.
Either add support for automated download, or drop this statement: asking the user to choose between one option will feel a bit silly...
POL_SetupWindow_browse "Please select the installation file to run." "$TITLE"
All user-oriented messages should have support for localization, see http://www.playonlinux.com/en/dev-documentation-10.html
for the explanation of eval_gettext usage.
POL_SetupWindow_wait "Installation in progress." "$TITLE"
POL_Wine start /unix "$APP_ANSWER"
You can use POL_Wine_WaitBefore "$TITLE" instead of this POL_SetupWindow_wait call, it will display the standard waiting message.
"start /unix" is usually not required (needs testing, but true 95% of the time).
POL_Wine_WaitBefore and POL_Wine_WaitExit shouldn't be both necessary around a single instruction, as one is useful if the instruction is blocking and the other if it is asynchronous. I suspect that after removing "start /unix" the installation will become blocking, and that POL_Wine_WaitBefore will be sufficient.
# Have user modify settings.json to turn hardware acceleration off.
POL_SetupWindow_message "IMPORTANT! On the next screen notepad will open with a config file. You MUST edit UseHardwareAcceleration to false in order for Octgn to function without crashing. When finished just save and exit and the script will finish processing." "$TITLE"
POL_Wine start "notepad.exe c:/users/$USER/My Documents/OCTGN/Config/settings.json"
That's what computers are for, it must be possible to automate that using sed, perl or even awk.
Some more informations about the file format would help.
Edité par petch