rewise.1 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. .TH rewise 1 "16 October 2024" "version 0.3.0"
  2. .SH NAME
  3. .B rewise
  4. - Extract files from Wise installers without executing them.
  5. .SH SYNOPSIS
  6. .B rewise
  7. .RB OPERATION
  8. .RB [OPTIONS]
  9. .RB INPUT_FILE
  10. .SH DESCRIPTION
  11. .B rewise
  12. Reverse Engineering Wise - The aim of this project is to extract assets from
  13. old game installers made with Wise installer without executing the PE/NE file
  14. (.exe), so they can be used with free software implementations of the game
  15. engine.
  16. The known working Wise installers are released from 1999 to 2004, the PE build
  17. date of those installers are between 1998 and 2001.
  18. Filtering files by language or components is still experimental.
  19. .SH OPERATION
  20. Specifying an OPERATION is mandatory. Exactly one operation is allowed per
  21. execution.
  22. All files that REWise does output will be overwritten when they exist!
  23. .TP
  24. .B -x --extract <OUTPUT_PATH>
  25. Extract files. Existing files in the OUTPUT_PATH will be overwritten!
  26. .TP
  27. .B -r --raw <OUTPUT_PATH>
  28. Extract all files in the overlay data. Filename format will be
  29. `EXTRACTED_%09u`. The extra files are files only used by the installer
  30. and would not be installed normally. This operation is for debugging
  31. purposes. Existing files in the OUTPUT_PATH will be overwritten!
  32. .TP
  33. .B -l --list
  34. This will list all files that would be installed by the installer, TMP
  35. installer files are not listed. It will also print the total size of the listed
  36. files at the end.
  37. .TP
  38. .B -V --verify
  39. Run extract without actually outputting files, CRC32s will be checked.
  40. .TP
  41. .B -0 --raw-verify
  42. Run raw extract without actually outputting files, CRC32s will be checked.
  43. .TP
  44. .B -Z --script-debug
  45. Print parsed WiseScript.bin, this is only available when compiled with
  46. REWISE_DEBUG.
  47. .TP
  48. .B -v --version
  49. Print version and exit.
  50. .TP
  51. .B -h --help
  52. Print help and exit.
  53. .SH OPTIONS (--list)
  54. .TP
  55. .B -e --extended
  56. Also print language and component per file. Use this to see what
  57. language indexes and components names are available.
  58. .SH OPTIONS (--extract, --list, --verify)
  59. .TP
  60. .B -f --filter <FILTER>
  61. Filter files based on their filepath. Multiple of these filters may
  62. be set. '*' will match anything, use '\*' to escape. The matching will
  63. be case sensitive and non greedy.
  64. .TP
  65. .B -F --file-filter <FILTER_FILE>
  66. Read file filters from a file. One filter per line, the format is the
  67. same as `--filter` so the match all character '*' is also allowed.
  68. Line should end with only '\\n'. The maximum line length is `WIN_PATH_MAX
  69. * 2`, where `WIN_PATH_MAX` is `260`. The `* 2` is to support `UTF-8`,
  70. so in most cases the line would be no longer then `260`. When FILTER_FILE
  71. is a empty file, it won't do any filtering!
  72. .TP
  73. .B -g --language <INDEX>
  74. Filter files by language index, files that have not set a language will
  75. be included nonetheless.
  76. .TP
  77. .B -c --components <NAME>
  78. Filter files by components name, files that are not part of a component
  79. will be included nonetheless.
  80. .SH OPTIONS (--list, --script-debug)
  81. .TP
  82. .B -n --no-extract
  83. Don't extract anything. Use WiseScript.bin at the given TMP_PATH, it
  84. won't delete it.
  85. .SH OPTIONS (any)
  86. .TP
  87. .B -p --preserve
  88. Don't delete WiseScript.bin from TMP_PATH
  89. .TP
  90. .B -t --tmp-path <TMP_PATH>
  91. Set temporary path. Run `rewise --help` to find the default TMP_PATH (it should
  92. be in the description of -t --tmp-path).
  93. .TP
  94. .B -d --debug
  95. Print debug info. This is only available when compiled with REWISE_DEBUG.
  96. .TP
  97. .B -s --silent
  98. Be silent, don't print anything.
  99. .SH INPUT_FILE
  100. The Wise installer file (.exe), this is is mandatory.
  101. .SH EXIT STATUS
  102. The exit status is 0 on success, greater then zero on error.
  103. See `/src/errors.h` for specifics.
  104. .SH NOTES
  105. .IP \[bu] 2
  106. Path to directory OUTPUT_PATH and TMP_PATH should exist, be writable and
  107. of-course there should be enough free-space. There should be at-least 1 MiB of
  108. free-space at the TMP_PATH, for the OUTPUT_PATH with the use of --extract, you
  109. can use --list fist to determine the required free-space.
  110. .IP \[bu]
  111. REWise is only tested on Little Endian systems. Did you try REWise on a Big-
  112. Endian system then please report your results by opening a new issue at
  113. <https://codeberg.org/CYBERDEV/REWise/issues>
  114. .IP \[bu]
  115. REWise will not delete/cleanup extracted files when the process fails somehow,
  116. TMP files however will be deleted unless --preserve is given.
  117. .SH EXAMPLES
  118. .B Extracting files as the installer would have:
  119. .RS 2
  120. rewise -x /path/to/extract/files/to/ /path/to/Setup.exe
  121. .RE
  122. .B List files:
  123. .RS 2
  124. rewise -l /path/to/Setup.exe
  125. .RE
  126. .B Extended list files:
  127. .RS 2
  128. rewise -le /path/to/Setup.exe
  129. .RE
  130. .B Extended list files with only the first language and components 'A',
  131. note that default files (without language or components set) will
  132. always be included:
  133. .RS 2
  134. rewise -le -g0 -c"A" /path/to/Setup.exe
  135. .RE
  136. .B List only *.pk3 for the first language:
  137. .RS 2
  138. rewise -g0 -f"*.pk3" -l /path/to/Setup.exe
  139. .RE
  140. .B Extracting files for language index `1`:
  141. .RS 2
  142. rewise -g1 -x /path/to/extract/files/to/ /path/to/Setup.exe
  143. .RE
  144. .SH LICENSE
  145. REWise is free software: you can redistribute it and/or modify
  146. it under the terms of the GNU General Public License as published by
  147. the Free Software Foundation, either version 3 of the License, or
  148. (at your option) any later version.
  149. REWise is distributed in the hope that it will be useful,
  150. but WITHOUT ANY WARRANTY; without even the implied warranty of
  151. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  152. GNU General Public License for more details.
  153. You should have received a copy of the GNU General Public License
  154. along with this program. If not, see <https://www.gnu.org/licenses/>.
  155. .SH BUGS
  156. For known issues and reporting new issues: see
  157. <https://codeberg.org/CYBERDEV/REWise/issues>.
  158. .SH HOMEPAGE
  159. https://codeberg.org/CYBERDEV/REWise