-
Notifications
You must be signed in to change notification settings - Fork 2
/
UnRAR.readme
executable file
·440 lines (333 loc) · 15.5 KB
/
UnRAR.readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
Short: UnRAR 6.11
Author: Alexander Roshal, Marcin Labenski (Amiga Port)
Uploader: [email protected]
Type: util/arc
Version: 6.11
Architecture: ppc-amigaos >=4.1; ppc-morphos >=3; m68k-amigaos >=2.0; i386-aros
Distribution: aminet
This is UnRAR port for MorphOS, AmigaOS, and AROS based on source code
version 6.1.6 (which is the code base for UnRAR 6.11).
UnRAR license is available in license.txt file in this archive.
This port uses also code from newlib 3.1.0, utf8proc, libnix, and iconv.
Newlib license is available in license_newlib.txt file in this archive.
Utf8proc license is available in license_utf8proc.txt file in this archive.
iconv license is available in license_libiconv.txt file in this archive.
libnix license is available in license_getpass.txt file in this archive.
Source code of this program is available on github:
https://github.com/mplpl/unrar_amiga
Polish locale made by Marcin Labenski.
Italian locale made by Samir Hawamdeh.
Russian locale made by Mikhail Malyshev.
Spanish locale made by Javier de las Rivas.
French locale made by Filipe BRANDÃO.
German translation comes from WinRAR with permission from win.rar GmbH.
Requirements
============
There are no special requirements for MorphOS and AmigaOS4. It should work on
any system provided that it has a relatively fresh version of the operating
system (I test on MorphOS 3.16 and AmigaOS 4.1 FE Update 1).
AROS version requires i386 and ABI-v0.
Classic AmigaOS version requires a system with:
* CPU Motorola 68000 - no FPU is needed
* Kickstart 2.04 or newer
* ixemul V48 (http://aminet.net/package/util/libs/ixemul-48.0)
* 4MB RAM (unrar needs 2.6MB on its own)
Exact memory utilization depends on the size of compressed files. For instance
my test archive with one 2.0GB file in it needs 32MB of RAM to unpack.
There is also one another version for the classic AmigaOS with the reduced
memory footprint. Size of this 'mini' version (the file name is
'unrar_aos_mini') is only ~330KB, it can run on systems with 2MB of RAM and
it does not need ixemul library. But there are also limitations:
* no support for national characters conversion
* no localization (runs in English only)
* no automatic stack size set
History:
========
6.11
* based on unrar source code 6.1.6
* 'mini' version added for classic Amiga OS with reduced memory footprint
* German translation added
6.02
* based on unrar source code 6.0.7
* French locale added
* unrar only load a catalog file when it has appropriate version set
5.90:
* based on unrar source code 5.9.2
* Russian locale added
* Spanish locale added
* stack size increased to 800KB to handle unpacks using recovery
volumes in rar3 format (it needs more memory)
* unrar prints a warning when it finds chars not present in a target encoding
* if Charset/CODEPAGE/RAR_CODEPAGE is not set, unrar tries to set encoding
based on Language variable
* fixed issue with expecting rar path in POSIX format on AmigaOS 2 and 3
* speed of display increased by optimizing iconv usage
5.80:
* based on unrar source code 5.8.5
* added support for AROS (i386), AmigaOS3 and AmigaOS2
* added support for large files (>4GiB) on MorphOS and AmigaOS4
* Italian locale added
5.70:
* based on unrar source code 5.7.3
* support for MorphOS and AmigaOS4
* national language support in file names and passwords
* support for symbolic (soft) and hard links
* English and Polish locale
Features:
=========
* support all the basic unrar commands and options, including listing,
unpacking (all or selected items), printing and testing archive files
* support national characters in archive name, names of files and directories
in the archive, passwords, comments and list files
* support restoring information about file modification date, owner and group
* support unpacking symbolic links and hard links stored in archives
* support unpacking multi-volume and SFX archives
* can read switches from configuration file s:rar.conf or RAR environment
variable
* large files support (>4GiB) on MorphOS and AmigsOS4
* support AmigaOS localization via locale.library
Content
=======
unrar_mos - unrar version for MorphOS 3
unrar_aos4 - unrar version for AmigaOS 4.1
unrar_aros - unrar version for AROS i386
unrar_aos - unrar version for AmigaOS3 and AmigaOS2
unrar_aos_mini - unrar version for AOS2/3 with reduced memory footprint
catalogs - unrar translations
license.txt - UnRAR license
license_newlib.txt - newlib license
license_utf8proc.txt - utf8proc license
UnRAR.readme - this readme file
Installation
============
MorphOS:
--------
copy unrar_mos to c:unrar
copy catalogs to locale:catalogs all
Note: MorphOS has its own unrar 3.90 in protected System:MorphOS/C direcory
that is used with higher priority than a file in c:unrar. And so if you want
to use the one from c: you need to call it explicitly, like this:
c:unrar l my_archive.rar
To avoid this, you can also copy unrar to c:unrar6, and then call it as unrar5:
copy unrar_mos to c:unrar6
unrar6 l my_archive.rar
AmigaOS4:
---------
copy unrar_aos4 to c:unrar
copy catalogs to locale:catalogs all
AROS:
-----
copy unrar_aros to c:unrar
copy catalogs to locale:catalogs all
AmigaOS3 and AmigaOS2.1:
------------------------
copy unrar_aos to c:unrar
copy catalogs to locale:catalogs all
NOTE: you may need RAR_CODEPAGE environment variable to the right value
to see national characters (read below).
AmigaOS2.0 (no support for locale):
-----------------------------------
copy unrar_aos to c:unrar
NOTE: on AmigaOS3 and AmigaOS2.1 Polish translation uses ISO-8859-2 encoding
(not AmigaPL!).
AmigaOS3 and AmigaOS2.1 - reduced memory footprint version:
------------------------
copy unrar_aos_mini to c:unrar
NOTE: 'mini' version does not automatically set the stack size - it must be
set using 'stack 600000' prior to running the command.
Detailed port description
=========================
Basic functions
---------------
All the basic functions like listing (verbose, base, technical),
unpacking (w/ or w/o path, selected files, or all), testing or printing
works fine. Note, that wherever a path is needed it has to be in amiga
format, not POSIX i.e. //test.rar not ../../test.rar.
National characters support
---------------------------
RAR stores data in UTF-8 in an archive file, then reads it into Unicode
(wchar_t) and finally, it uses it (print, create files, find files, ...)
in UTF-8. Unfortunately, no Amiga operating system supports UTF-8 today,
therefore to handle national characters in file names,
comments, etc. it needs to be converted to OS local encoding set in OS
prefs. Unrar reads what was set using environment variables:
* on MorphOS: CODEPAGE
* on AmigaOS4: Charset
* on AROS: CHARSET
* on AmigaOS3: there is no (read below)
Characters that cannot be converted, because are not present in selected
codepage, are replaced with '?'. That means that national characters are
fully supported but only for the selected locale, i.e. if I have Polish
locale with ISO-8859-2 encoding and have a rar archive with Spanish
characters, they will not appear and will be replaced by '?'. That in
turns mean that some files may have the same names even if they are
different files. In that case, only one will be unpacked. To deal with
this, you can use special environment variable RAR_CODEPAGE that allows
overriding codepage (for both MorphOS and AmigaOS4) without changing
system prefs. For the example above, if you set RAR_CODEPAGE, you will
still not see Spanish characters (unless you have the right font) but at
least you should get all the files unpacked.
On AmigaOS3 and AmigaOS2, since there is no built-in variable to determine
system character encoding, you have to always use RAR_CODEPAGE. To make it
slightly simpler, if RAR_CODEPAGE is not set, unrar tries to set encoding
based on 'Language' environment variable.
In addition to above, after each text conversion unrar checks if there were
any unconvertable characters (that is, characters not present in the target
encoding). If so, it will print a warning message, asking the user to
set RAR_CODEPAGE.
National characters in filenames
---------------------------------
National characters in filenames are handled as described above - this
covers:
* name of files, directories, and links in an archive
* targets for symbolic and hard links in an archive
* archive names that were given to unrar command
* names in list files (if -sc option is not used)
To see national characters in the shell or when browsing
unpacked files in Ambient/Workbench you need to have fonts with the
right encoding installed in OS and set as system font and/or as Ambient
fonts.
National characters in a password
-------------------------------
National characters are supported in passwords. A password can be given
in the following forms:
* from the shell when asked
* in command invocation using -p switch
* from RAR environment variable
* from rar.conf configuration file
In each of the case above, only passwords containing national characters
of the currently selected locale are supported and should be given using
locale encoding (as for file names described above). If the password is
not using current locale charset, RAR_CODEPAGE need to be used to select
it.
-sc switch
----------
Unrar has -sc<chr>[obj] switch described as "Specify the character set" that
is not very useful and not very well documented. From the source code I
read that <chr> can be one of:
* "a" for ANSI,
* "o" for OEM,
* "u" for Unicode and
* "f" for UTF-8.
For non-Windows systems, only "u" and "f" matter (BTW: "u" is UTF-16 not
UTF-32).
[obj] is one of:
* 'c' for comment - does not apply unrar, used only in 'full' rar utility
* 'r' for redirect - applies to Windows only
* 'l' for file lists - applies to file list to unpack (specified after "@"),
file list to exclude (specified after -x@) and filter file list
(specified after -n@).
When -sc switch is not used, unrar will try to autodetect UTF-16 and
UTF-8 and when it fails it will assume local encoding. The latter will
also happen when "a" or "u" was used.
All above is standard unrar behavior - I'm only documenting it here.
Wildcards
---------
Unrar supports wildcards in Windows style:
* "?" = any character
* "*" = any character sequence
Amiga style wildcards are not supported at this moment.
File modification dates
-----------------------
When unpacking, created files get modification date set as stored in RAR
archive. The date is set in the local time zone. As there is no special
attribute for the creation and access dates in AmigaOS, these values are
always ignored.
File owner and group
--------------------
When unpacking from RAR archive with option -ow, unrar will try to set
owner name and group. It will only succeed if a user with a given name and
a group with a given name is present in the local system. Otherwise,
an error will be printed. When -ow is not used, the owner/group is ignored.
Symbolic links in an archive
----------------------------
RAR can store symbolic links and this unrar port supports that. When
unpacking, targets for Unix symbolic links will be changed into Amiga
links (Makelink function) provided that filesystem into which unpack is
done supports that (SFS does). When the filesystem does not support
symbolic links, an error will be printed and the symbolic link will be
ignored.
As RAR stores symbolic link target in the form that is right on OS where
an archive was created, before making links in Amiga, the path needs to
be converted (for instance ../test.txt need to be changed to /test.txt).
This unrar port does such conversion.
Note: unrar checks if a link is safe to create and will skip links
targeting outside of unpacking directory. To make it create
them, you need to use -ola switch when unpacking.
Hard links in an archive
------------------------
Hard links are supported similarly as symbolic links. Again, they
will only work if the target filesystem supports hard links (SFS dos not).
Otherwise, an error will be printed and hard links will be ignored. There
is no option in unrar that would allow the user to unpack hard links as
regular files or symbolic links - so if target filesystem does not
support hard links it is not possible to get them unpacked.
Reference files in an archive
-----------------------------
RAR can pack identical files as references inside of an archive - that
reduces the size of the archive file. To make such archive -oi
switch should be used when packing. When unpacking, duplicates are
re-created as separate files. That is fully supported in this unrar
port.
NTFS Junction Points in an archive
----------------------------------
NTFS Junction Points are like symbolic links, but their target is always
an absolute path with a drive letter in front. In Unrar version 5.7 for
Unix-like systems (including Amiga) these kinds of links are always
skipped silently (!). While it is different behavior from how it was
in 5.0, I decided to keep it unchanged for Amiga. So, in practice,
junction points are always skipped when unpacking.
Configuration file
------------------
Unrar has a config file in which you can store switches that will always
be used when unrar command is called. To do that, "switches="
should be present in the file with all the switches to add (for instance
"switches=-ad -ola"). This port of unrar looks for the configuration file
in s:rar.conf.
There is also "RAR" environment variable that can have switches to use
(like a value of "switches=" in configuration file). The priority of
resolving switches to use is: directly given in the command, RAR environment
variable, the configuration file.
Support for localization
------------------------
This unrar port complies with localization rules of MorphOS and AmigaOS.
You can find cs/cd file for making additional translations on GitHub
in "locale" directory.
Large files support
-------------------
On MorphOS and AmigaOS4 large files are supported in the following way:
* a rar file can have size >4GiB
* a file expanded from a rar file may be bigger than 4GiB
The above is true provided that the file system used for unpacking supports
files with size >4GiB.
OFS, FFS, PFS3, SFS, and FAT32 do not support such files.
NTFS, exFAT, and ext2/3/4 (on MorphOS) and SFS2 (on AmigaOS4) support large
files.
Support for files >4GiB is currently not available on AROS, AmigaOS3 and
/AmigaOS2AmigaOS2.
Notes about porting
===================
This port is based directly on unrar source code version 6.1.6
(unrarsrc-6.1.6.tar.gz) from rarlab.com:
https://www.rarlab.com/rar/unrarsrc-6.1.6.tar.gz
For normalizing UTF, I used utf8proc. I did not need to port it to Amiga
- it compiles without any change:
https://juliastrings.github.io/utf8proc/
For vfwprintf-like functions and multiple other wide characters related
functions (wc*, mb*, bt*, wmem*) from libc, that are not implemented on
Amiga at all, I ported the code I took from newlib 3.1.0:
http://sourceware.org/newlib/
ftp://sourceware.org/pub/newlib/newlib-3.1.0.tar.gz
For getpass() function missing in AROS I took the code from libnix 3.0
by Diego Casorran:
https://github.com/diegocr/libnix
As libiconv is missing in AmigaOS3/AmigaOS2, I use one from Aminet ported by
Bruno Haible & Diego Casorran (LGPL):
http://aminet.net/package/dev/gg/libiconv-1.8
MorphOS version of unrar has been compiled using gcc 10.3.0 (part of SDK 3.16).
AmigaOS4 version of unrar has been compiled using gcc 4.2.4 (part of SDK 53.20).
AROS version of unrar has been compiled using gcc 4.6.4 (part of Icaros 2.2).
AmigaOS3/AmigaOS2 version of unrar has been compiled using gcc 3.3 (part of
Cubic IDE).
All AmigaOS versions can also be created by cross-compiling using the same
compile versions as above from AmiDevCpp package.