-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkaijuu.html
234 lines (191 loc) · 9.1 KB
/
kaijuu.html
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
<html>
<head>
<title>kaijuu User Manual</title>
<style type="text/css">
body {
background: #fff;
color: #000;
font-family: arial, helvetica;
font-size: 0.9em;
}
h1, h2, h3, h4, h5, h6 {
margin: 0em;
}
h2 {
background: #eef;
font-size: 1.2em;
margin-bottom: 0.25em;
padding: 0.25em;
}
h3 {
border-bottom: 2px solid #eee;
font-size: 0.9em;
margin-bottom: 0.25em;
}
h4 {
border-bottom: 1px dashed #ccc;
font-size: 0.9em;
font-weight: normal;
}
p {
margin: 0em;
margin-bottom: 1em;
}
pre {
background: #fee;
margin-top: 0.5em;
padding: 0.5em;
white-space: pre-line;
}
</style>
</head>
<body>
<h1>kaijuu v06r03</h1>
Original Author: byuu<br>
Current Maintainer: hex_usr<br>
License: ISC<br>
<br>
<h2>Overview</h2>
<p>kaijuu is a Windows context menu shell extension. The context
menu is the list you see when you right-click on a file or folder.
kaijuu allows you to add your own custom actions to this menu.</p>
<p>Think of opening an unknown file type: Windows will ask you to
associate a program with the file type. From there forward,
double-clicking the file will open the file with that program.</p>
<p>kaijuu is a far more powerful version of this same concept. With
kaijuu, you can assign as many rules as you want. You can apply the
same rule to multiple file patterns. You can have more complex
pattern matching for names. You can apply rules to folders. You can
specify rules about how to handle single-file versus multi-file
selection. You can send custom command-line parameters to the
program. You can have rules on a per-user basis. And you can do all
of this from an easy-to-use GUI.</p>
<h2>Installation</h2>
<p>If you wish to compile kaijuu, you will need to install
<a href="http://tdm-gcc.tdragon.net/">TDM-GCC</a>. Visual Studio does
not support some of the features used in kaijuu's source code.</p>
<p>kaijuu has been tested only on 64-bit Windows. MinGW support
for 32-bit Windows is somewhat poor, so it will take some effort
to prepare a 32-bit MinGW installation to compile kaijuu.</p>
<p>Place the appropriate kaijuu EXE and DLL files into a folder
where you intend to keep them. The DLL cannot be moved after
installation, otherwise Explorer will not be able to locate the
shell extension. C:\Program Files\kaijuu would be a recommended
location.</p>
<p>Now run the kaijuu EXE, and click on <i>Install</i>. You must
have administrator access to use the kaijuu EXE, as this is
necessary to install and uninstall shell extensions.</p>
<h2>Removal and Upgrading</h2>
<p>To remove or upgrade kaijuu, you must first uninstall the shell
extension. Run the kaijuu EXE, and click on <i>Uninstall</i>. You
must now close all open instances of Windows Explorer, in order for
the DLL to be completely unloaded. In the worst case, restart the
computer.</p>
<p>If you intend to upgrade kaijuu, I recommend using the
<i>Reset</i> button to erase all saved settings. There is no
guarantee of backward-compatibility between kaijuu revisions.</p>
<p>kaijuu's rules are stored in the following registry key:</p>
<pre>HKEY_CURRENT_USER\Software\Kaijuu</pre>
<h2>Configuration</h2>
<p>The kaijuu EXE not only handles installation and removal, it also
handles modifying the rules.</p>
<p>kaijuu stores a unique list of rules for every user account.
You are free to modify rules even while kaijuu is installed. They
will take immediate effect.</p>
<p>The main interface lists all rules, sorted in order of their
priority. For instance, if two rules match and both are marked as
the default action; the item higher in the list will be marked as
the default. You can also quickly determine if the extension is
currently installed.</p>
<p><i>Append</i> will add new rules, <i>Modify</i> will edit an
existing rule, <i>Move Up</i> and <i>Move Down</i> can be used to
modify the priority ordering, and <i>Remove</i> will delete the
selected rule.</p>
<p><i>Import</i> will overwrite all rules with ones imported from
a file named "rules.bml", <i>Export</i> will export all rules to
"rules.bml", and <i>Reset</i> will delete all rules.</p>
<h2>Rules</h2>
<p>You can have a maximum of 1000 rules. You will see every matched
rule in the context menu when you right-click on files or folders.</p>
<p><i>Name</i> is the string that will show up in the context menu.
It would be wise to name the rule something like "Open with X" or
"Edit with Y"</p>
<p><i>Pattern</i> is a semicolon-separated list of patterns to test
the selected file or folder names against. You must specify one or
more patterns.</p>
<p><b>Example 1:</b> <i>*.txt;*.doc</i> will match anything ending
in <i>.txt</i> <i>or</i> in <i>.doc</i>.</p>
<p><b>Example 2:</b> <i>*</i> will match everything always.</p>
<p><b>Example 3:</b> <i>Manifest</i> will only match items named
<i>Manifest</i>.</p>
<p><b>Example 4:</b> <i>*.??</i> will match any two-letter
extension, such as <i>.gb</i></p>
<i>Command</i> is the program to be executed when a rule is
activated. You can use the <i>Select</i> button to quickly navigate
to a program to use.</p>
<p>Note the way the program name is typically quoted, for instance
<i>"c:\my program.exe"</i>. If there is a space in the path, this is
required to differentiate the program name from its arguments. If
you were to type your own rule, you could take advantage of two
things: first, the <i>PATH</i> command-line variable allows
specifying system programs without the full path. For instance,
<i>"cmd"</i> will invoke the command-prompt; and second, if the
program path contains no spaces, the quotes are no longer necessary.
So you could say <i>cmd</i> to invoke the command-prompt.</p>
<p>After the program name, you can specify the program arguments.
kaijuu has many special identifiers built-in, that are replaced with
the file and/or folder names that were selected. When using the
<i>Select</i> button, <i>{file}</i> is automatically appended for
convenience, which should be sufficient for most cases. You can of
course customize the rule afterward with the following identifiers:
</p>
<pre>
{name} = c:\path\file.txt
{pathname} = c:\path
{filename} = file.txt
{basename} = file
{extension} = txt
{path} = "c:\path"
{file} = "c:\path\file.txt"
{paths} = "c:\path1" "c:\path2"
{files} = "c:\path1\file1.txt" "c:\path2\file2.txt"
</pre>
<p>Note that if you use the first group, you must add your own
quotes around the identifiers, eg <i>notepad "{name}"</i>.</p>
<p>If the command includes <i>{files}</i> or <i>{paths}</i> within
the string, then kaijuu will match this rule when one or more files
are selected. If neither of these patterns are found, then kaijuu
will only check the rule if a single file is selected.</p>
<p>You will want to use <i>{file}</i> and <i>{path}</i> for programs
that can only open a single item a a time; and <i>{files}</i> and
<i>{paths}</i> for programs that can open multiple items at the same
time, such as music players.</p>
<p><i>Default Action</i>, when checked, will mark this rule as the
default action to take when a file or folder is double-clicked on.
</p>
<p><i>Match Files</i> will allow selections with files in them to
be valid. If a file is selected without this checked, the rule will
fail.</p>
<p><i>Match Folders</i> will allow selections with folders in them
to be valid. If a file is selected without this checked, the rule
will fail.</p>
<p><i>Assign</i> will create the new rule or modify an existing
rule, depending upon which button you clicked from the main window.
</p>
<p><b>Caution:</b> be very careful when using a pattern of <i>*</i>
along with <i>Default Action</i> checked. For instance, you could
find that double-clicking executables no longer opens then, and
requires you to use the right-click context menu. In the worst case,
you will have to reboot into safe mode and delete the rule or kaijuu
DLL.</p>
<h3>Rule Examples</h3>
<table>
<tr><th>Name</th><th>Default</th><th>Match</th><th>Pattern</th><th>Command</th></tr>
<tr><td>Open terminal here</td><td>No</td><td>Folders</td><td>*</td><td>cmd /k cd /d {path}</td></tr>
<tr><td>Make</td><td>Yes</td><td>Files</td><td>GNUmakefile</td><td>mingw32-make</td></tr>
<tr><td>Edit Makefile</td><td>No</td><td>Files</td><td>GNUmakefile</td><td>notepad {file}</td></tr>
<tr><td>Play song(s)</td><td>No</td><td>Files</td><td>*.mp3</td><td>"c:\winamp.exe" {files}</td></tr>
<tr><td>Load as Game Folder</td><td>Yes</td><td>Folders</td><td>*.fc;*.sfc;*.gba</td><td>"c:\higan.exe" {path}</td></tr>
</table>
</body>
</html>