POL_innoextract

Informations

Creator Message
Yepoleb Anonymous

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 12262
Wine: System

Feedbacks

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.

 

Source code

Contributions

Filters:

Contribute
Member Message
Yepoleb Sunday 3 January 2016 at 1:13
Yepoleb Anonymous

Information

This update has been approved by the team.

Message

TIL about the difference between single and double quotes.

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

Differences

New source code

Replies

Yepoleb Wednesday 23 December 2015 at 5:22
Yepoleb Anonymous

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

  • 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

New source code

Replies

Saturday 26 December 2015 at 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...
Saturday 26 December 2015 at 15:53
or rather in this case if ! innoextract --version >/dev/null 2>&1; then ...
Anonymous
Saturday 26 December 2015 at 15:59
I know, but it's very hard to read, that's why I did it this way.
Yepoleb Monday 21 December 2015 at 5:38
Yepoleb Anonymous

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

New source code

Replies

Tuesday 22 December 2015 at 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
Wednesday 23 December 2015 at 1:47
1. Thanks, I didn't know about local variables.
Anonymous
Wednesday 23 December 2015 at 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