rewise(1)

NAME
rewise - Extract files from Wise installers without executing them.

SYNOPSIS
rewise OPERATION [OPTIONS] INPUT_FILE

DESCRIPTION
rewise Reverse Engineering Wise - The aim of this project is to extract assets from old game installers made with Wise installer without executing the PE/NE file (.exe), so they can be used with free software implementations of the game engine. The known working Wise installers are released from 1999 to 2004, the PE build date of those installers are between 1998 and 2001. Filtering files by language or components is still experimental.

OPERATION
Specifying an OPERATION is mandatory. Exactly one operation is allowed per execution. All files that REWise does output will be overwritten when they exist!

-x --extract <OUTPUT_PATH>
    Extract files. Existing files in the OUTPUT_PATH will be overwritten!

-r --raw <OUTPUT_PATH>
    Extract all files in the overlay data. Filename format will be `EXTRACTED_%09u`. The extra files are files only used by the installer and would not be installed normally. This operation is for debugging purposes. Existing files in the OUTPUT_PATH will be overwritten!

-l --list
    This will list all files that would be installed by the installer, TMP installer files are not listed. It will also print the total size of the listed files at the end.

-V --verify
    Run extract without actually outputting files, CRC32s will be checked.

-0 --raw-verify
    Run raw extract without actually outputting files, CRC32s will be checked.

-Z --script-debug
    Print parsed WiseScript.bin, this is only available when compiled with REWISE_DEBUG.

-v --version
    Print version and exit.

-h --help
    Print help and exit.

OPTIONS (--list)

-e --extended
    Also print language and component per file. Use this to see what language indexes and components names are available.

OPTIONS (--extract, --list, --verify)

-f --filter <FILTER>
    Filter files based on their filepath. Multiple of these filters may be set. '*' will match anything, use ' to escape. The matching will be case sensitive and non greedy.

-F --file-filter <FILTER_FILE>
    Read file filters from a file. One filter per line, the format is the same as `--filter` so the match all character '*' is also allowed. Line should end with only '\n'. The maximum line length is `WIN_PATH_MAX * 2`, where `WIN_PATH_MAX` is `260`. The `* 2` is to support `UTF-8`, so in most cases the line would be no longer then `260`. When FILTER_FILE is a empty file, it won't do any filtering!

-g --language <INDEX>
    Filter files by language index, files that have not set a language will be included nonetheless.

-c --components <NAME>
    Filter files by components name, files that are not part of a component will be included nonetheless.

OPTIONS (--list, --script-debug)

-n --no-extract
    Don't extract anything. Use WiseScript.bin at the given TMP_PATH, it won't delete it.

OPTIONS (any)

-p --preserve
    Don't delete WiseScript.bin from TMP_PATH

-t --tmp-path <TMP_PATH>
    Set temporary path. Run `rewise --help` to find the default TMP_PATH (it should be in the description of -t --tmp-path).

-d --debug
    Print debug info. This is only available when compiled with REWISE_DEBUG.

-s --silent
    Be silent, don't print anything.

INPUT_FILE
The Wise installer file (.exe), this is is mandatory.

EXIT STATUS
The exit status is 0 on success, greater then zero on error. See `/src/errors.h` for specifics.

NOTES

•   Path to directory OUTPUT_PATH and TMP_PATH should exist, be writable and of-course there should be enough free-space. There should be at-least 1 MiB of free-space at the TMP_PATH, for the OUTPUT_PATH with the use of --extract, you can use --list fist to determine the required free-space.

•   REWise is only tested on Little Endian systems. Did you try REWise on a Big- Endian system then please report your results by opening a new issue at <https://codeberg.org/CYBERDEV/REWise/issues>

•   REWise will not delete/cleanup extracted files when the process fails somehow, TMP files however will be deleted unless --preserve is given.

EXAMPLES
Extracting files as the installer would have:
    rewise -x /path/to/extract/files/to/ /path/to/Setup.exe
List files:
    rewise -l /path/to/Setup.exe
Extended list files:
    rewise -le /path/to/Setup.exe
Extended list files with only the first language and components 'A', note that default files (without language or components set) will always be included:
    rewise -le -g0 -c"A" /path/to/Setup.exe
List only *.pk3 for the first language:
    rewise -g0 -f"*.pk3" -l /path/to/Setup.exe
Extracting files for language index `1`:
    rewise -g1 -x /path/to/extract/files/to/ /path/to/Setup.exe

LICENSE
REWise is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. REWise is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

BUGS
For known issues and reporting new issues: see <https://codeberg.org/CYBERDEV/REWise/issues>.

HOMEPAGE
https://codeberg.org/CYBERDEV/REWise