HansWessels / gup

the GUP source code (ARJ mode 7 and all the rest)
GNU General Public License v2.0
8 stars 2 forks source link

let application name (exe) determine the action (argv0) rather than using commandline options #7

Closed HansWessels closed 1 year ago

HansWessels commented 1 year ago

Use case:

users who drag&drop files on executables, rather than using the command line.

Example

HansWessels commented 1 year ago

The accepted application name format is:

BASE_OPT_OPT...

where the initial base name must be non-empty and is otherwise ignored, while the desired ADD options can be separated by space, dash '-' or underscore '_'.

Example:

 do-r_m7-e.exe ...

which is equivalent to:

 gup.exe a -r -m7 -e ...
HansWessels commented 1 year ago

Feedback: it's meant for drag&drop, hence we won't be seeing any archive name either!


(TODO)

--> use the initial part for the output format (bindump, etc.) and generate the output filepath from the first file / directory in the drag&drop list.

(TODO)

GerHobbelt commented 1 year ago

SHA-1: fe3a1343b31094a760705c7b6df4a202c5f131b8

Now the archive type is determined by the first part of the GUP executable name: default = ARJ, but when the GUP exe name 'base' has the format X2A, where X is zero or more arbitrary characters and A is any char of the set {A,L,Z,B,C,S} (case insensitive), then these will make GUP produce an archive type {ARJ,LZH,GZIP,BINDUMP,CDUMP,ASMDUMP}. Example: p2b_n0.exe used as a drag&drop target will produce a BINDUMP ('base name' is p2b --> B type), using -n0 compression, i.e. Ni!Packer Mode 0.

(See also commit SHA-1: 29ab4a1ab77b3fe8e259294801160fe080e76c31 for previous work, i.e. the _n0 --> -n0 bit.)