POL_innoextract

Informations

Créateur Messages
Yepoleb Anonymous

Information

Cet installateur a été accepté par l'équipe.

Informations

Plate-formes :
Téléchargements : 12197
Wine: System

Retours d'expérience

Description

Extracts an Inno Setup file and moves the files to an install directory. This is especially useful to work around the GOG installer. Uses the innoextract tool from http://constexpr.org/innoextract/

Usage

  1. Ask for a setup file using the builtin functions
  2. Create the Wine-prefix
  3. Create a temporary directory
  4. Set the install location to a folder inside the Wine-prefix.
  5. Call this script
  6. Apply your own registry patch, if necessary
  7. Clean up temp directory

Parameters

1
POL_innoextract <setup_file> <temp_dir> <install_path> [additional_args]
  • setup_file: Path of the setup file
  • temp_dir: Path to the temporary directory, usually created using POL_System_TmpCreate
  • install_path: Install location of the game as a native path (don't use "C:\something"). Example: "${WINEPREFIX}/drive_c/GOG Games/RollerCoaster Tycoon Deluxe/"
  • additional_args: Additional arguments for the innoextract process. May be usefull for installers with .bin files.

 

Code source

Contributions

Filters:

Contribuer
Membre Messages
Yepoleb Dimanche 3 Janvier 2016 à 1:13
Yepoleb Anonymous

Information

Cette mise à jour a été acceptée par l'équipe

Messages

TIL about the difference between single and double quotes.

  • Fixed issues where variables were not properly inserted
  • Added debug message at the bottom

Differences

Nouveau code source

Réponses

Yepoleb Mercredi 23 Décembre 2015 à 5:22
Yepoleb Anonymous

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Messages

  • Replaced all global variables with local
  • Replaced display_error with POL_Debug_Fatal
  • Added script name to error messages
  • Improved innoextract check
  • Removed the wait after the progress loop because all remaining threads should be killed automatically
  • Removed whitespace at line ends
  • Changed extraction error message

Differences

Nouveau code source

Réponses

Samedi 26 Décembre 2015 à 15:52
* Added script name to error messages
That one is actually interesting, because at first I thought that since POL_Debug_Fatal displays the name of the function calling it, it was redundant.
But POL_Calls are not just function calls, and what POL_Debug_Fatal displays is that the error comes from within "source" function; That makes sense, and yet is not what one would expect, I wonder if that could be improved...

innoextract --version >/dev/null 2>&1
if [ $? -ne 0 ]; then ...
You can also just use
if innoextract --version >/dev/null 2>&1; then ...
We're so used to use "if" with "test" that we sometimes forget it's just a special case of the way "if" works...
Samedi 26 Décembre 2015 à 15:53
or rather in this case if ! innoextract --version >/dev/null 2>&1; then ...
Anonymous
Samedi 26 Décembre 2015 à 15:59
I know, but it's very hard to read, that's why I did it this way.
Yepoleb Lundi 21 Décembre 2015 à 5:38
Yepoleb Anonymous

Warning

Cette mise à jour n'a pas été approuvée par l'équipe.
Utilisez-la à vos risques et périls

Differences

Nouveau code source

Réponses

Mardi 22 Décembre 2015 à 11:53
My review:

INSTALLER_FILE="$1"
TEMP_DIR="$2"
INSTALL_PATH="$3"
ADDITIONAL_ARGS="$4"
Function scripts are sourced, it's recommended to declare those as local variables (using "local") to avoid collisions with calling script variables.

display_error ()
{
POL_SetupWindow_message "$1"
POL_SetupWindow_Close
exit $EXIT_ERROR
}
What about using POL_Debug_Fatal instead?

if [! innoextract --version >/dev/null 2>&1 ]; then
Did you test this line? [! gives a syntax error; Actually I think you don't need the square brackets in this case.

POL_Debug_Message "Found innoextract"
Shouldn't that be a fatal error too? The remaining of the function script cannot work correctly without innoextract.

POL_SetupWindow_file "$(eval_gettext 'Failed to extract files. Check if innoextract is up to date and the input file is valid. Read logfile for more information:')" "$TITLE" "$INNO_LOGFILE"
POL_SetupWindow_Close
exit $EXIT_ERROR
You probably missed this last place to use display_error or POL_Debug_Fatal
Anonymous
Mercredi 23 Décembre 2015 à 1:47
1. Thanks, I didn't know about local variables.
Anonymous
Mercredi 23 Décembre 2015 à 2:00
Oops, forgot I can't press enter in the comment window. New try:

1. Thanks, I didn't know about local variables.
2. I thought POL_Debug_Fatal works like POL_Debug_Message and silently logs to the terminal without displaying the error.
3. Yes, that's a very ugly line, I should have expected it to break.
4. There's an else before that line, it only executes if innoextract was found.
5. I'm using POL_SetupWindow_file to show the logfile, display_error uses POL_SetupWindow_message.

Thanks for your detailed feedback :)

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com