1 <!doctype html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 2 <html> 3 <head> 4 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> 5 <meta http-equiv="content-style-type" content="text/css"> 6 <link rel="stylesheet" type="text/css" href="style.css"> 7 <title>ProGuard GUI</title> 8 </head> 9 <body> 10 11 <h2>Graphical User Interface</h2> 12 13 You can find the ProGuard GUI jar in the <code>lib</code> directory of the 14 ProGuard distribution. To run the ProGuard graphical user interface, just type: 15 <p class="code"> 16 <code><b>java -jar proguardgui.jar</b> [-nosplash] </code>[<i>configuration_file</i>] 17 </p> 18 The GUI will pop up in a window. With the <code>-nosplash</code> option, you 19 can switch off the short opening animation. If you have specified a ProGuard 20 configuration file, it will be loaded. The GUI works like a wizard. You can 21 edit the configuration and execute ProGuard through a few tabs: 22 <p> 23 24 <table cellspacing="5" cellpadding="5"> 25 <tr><td class="button"><a href="#proguard">ProGuard</a></td> 26 <td>Optionally load an existing configuration file.</td></tr> 27 <tr><td class="button"><a href="#inputoutput">Input/Output</a></td> 28 <td>Specify the program jars and library jars.</td></tr> 29 <tr><td class="button"><a href="#shrinking">Shrinking</a></td> 30 <td>Specify the shrinking options.</td></tr> 31 <tr><td class="button"><a href="#obfuscation">Obfuscation</a></td> 32 <td>Specify the obfuscation options.</td></tr> 33 <tr><td class="button"><a href="#optimization">Optimization</a></td> 34 <td>Specify the optimization options.</td></tr> 35 <tr><td class="button"><a href="#information">Information</a></td> 36 <td>Specify some options to get information.</td></tr> 37 <tr><td class="button"><a href="#process">Process</a></td> 38 <td>View and save the resulting configuration, and run ProGuard.</td></tr> 39 </table> 40 <p> 41 42 In addition, there is a tab to execute ReTrace interactively: 43 <p> 44 45 <table cellspacing="5" cellpadding="5"> 46 <tr><td class="button"><a href="#retrace">ReTrace</a></td> 47 <td>Set up and run ReTrace, to de-obfuscate stack traces.</td></tr> 48 </table> 49 <p> 50 51 You can freely toggle between the tabs by means of the buttons on the 52 left-hand side of the window, or by means of the <b>Previous</b> and 53 <b>Next</b> buttons at the bottom of the tabs. Tool tips briefly explain the 54 purpose of the numerous options and text fields, although a basic 55 understanding of the shrinking/optimization/obfuscation/preverification 56 process is assumed. Please refer to the <a 57 href="introduction.html">Introduction</a> of this manual. 58 <p> 59 60 <a name="proguard"> </a> 61 <h2>The ProGuard Tab</h2> 62 63 The <i>ProGuard</i> tab presents a welcome message and one important button at 64 the bottom: 65 <p> 66 67 <table cellspacing="5" cellpadding="5"> 68 <tr><td class="button">Load configuration...</td> 69 <td>opens a file chooser to load an existing ProGuard configuration 70 file.</td></tr> 71 </table> 72 <p> 73 74 If you don't want to load an existing configuration, you can just continue 75 creating a new configuration from scratch. 76 <p> 77 78 <a name="inputoutput"> </a> 79 <h2>The Input/Output Tab</h2> 80 81 The <i>Input/Output</i> tab contains two lists, respectively to specify the 82 program jars (or wars, ears, zips, or directories), and the library jars (or 83 wars, ears, zips, or directories). 84 85 <ul> 86 <li>The list of program jars contains input entries and output entries. Input 87 entries contain the class files and resource files to be processed. Output 88 entries specify the destinations to which the processed results will be 89 written. They are preceded by arrows, to distinguish them from input 90 entries. The results of each consecutive list of input entries will be 91 written to the subsequent consecutive list of output entries. 92 93 <li>The library jars are not copied to the output jars; they contain class 94 files that are used by class files in the program jars and that are 95 necessary for correct processing. This list typically at least contains the 96 targeted Java runtime jar. 97 </ul> 98 <p> 99 100 Each of these lists can be edited by means of a couple of buttons on the 101 right-hand side: 102 <p> 103 104 <table cellspacing="5" cellpadding="5"> 105 <tr><td class="button">Add input...</td> <td>opens a file chooser to add an 106 input entry to the list of program jars.</td></tr> 107 <tr><td class="button">Add output...</td> <td>opens a file chooser to add an 108 output entry to the list of program jars.</td></tr> 109 <tr><td class="button">Add...</td> 110 <td>opens a file chooser to add an entry to the list of library 111 jars.</td></tr> 112 <tr><td class="button">Edit...</td> 113 <td>opens a file chooser to edit the selected entry in the list.</td></tr> 114 <tr><td class="button">Filter...</td> 115 <td>opens a text entry field to add or edit the filters of the selected 116 entries in the list.</td></tr> 117 <tr><td class="button">Remove</td> 118 <td>removes the selected entries from the list.</td></tr> 119 <tr><td class="button">Move up</td> 120 <td>moves the selected entries one position up the list.</td></tr> 121 <tr><td class="button">Move down</td> 122 <td>moves the selected entries one position down the list.</td></tr> 123 <tr><td class="button">Move to libraries</td> 124 <td>moves the selected entries in the list of program jars to the list of 125 library jars.</td></tr> 126 <tr><td class="button">Move to program</td> 127 <td>moves the selected entries in the list of library jars to the list of 128 program jars.</td></tr> 129 </table> 130 <p> 131 132 Filters allow to filter files based on their names. One can specify filters 133 for class file names and resource file names, for jar file names, for war file 134 names, for ear file names, and for zip file names. Multiple entries in the 135 program list only make sense when combined with filters; each output file is 136 written to the first entry with a matching filter. 137 <p> 138 139 Input entries that are currently not readable are colored red. 140 <p> 141 142 The order of the entries in each list may matter, as the first occurrence of 143 any duplicate entries gets precedence, just as in conventional class paths. 144 <p> 145 146 Corresponding configuration options: 147 <ul type="none"> 148 <li>-<a href="usage.html#injars">injars</a> 149 <li>-<a href="usage.html#outjars">outjars</a> 150 <li>-<a href="usage.html#libraryjars">libraryjars</a> 151 <li><a href="usage.html#classpath"><i>class_path</i></a> 152 <li><a href="usage.html#filters"><i>filters</i></a> 153 </ul> 154 <p> 155 156 <a name="shrinking"> </a> 157 <h2>The Shrinking Tab</h2> 158 159 The <i>Shrinking</i> tab presents a number of options that affect the 160 shrinking step. The basic options are followed by a few lists of classes and 161 class members (fields and methods) that must be protected from shrinking (and 162 implicitly from obfuscation as well). 163 <p> 164 165 The fixed lists contain predefined entries that are typically useful for many 166 applications. Each of these entries can be toggled by means of a check box. 167 The text field following each entry allows to constrain the applicable classes 168 by means of a comma-separated list of wildcarded, fully-qualified class 169 names. The default is "*", which means that all input classes of the 170 corresponding type are considered. 171 <p> 172 173 For example, checking the <b>Applications</b> entry and filling in 174 "myapplications.**" after it would mean: keep all classes that have main 175 methods in the "myapplications" package and all of its subpackages. 176 <p> 177 178 The variable list at the bottom allows to define additional entries 179 yourself. The list can be edited by means of a couple of buttons on the 180 right-hand side: 181 <p> 182 183 <table cellspacing="5" cellpadding="5"> 184 <tr><td class="button">Add...</td> 185 <td>opens a window to add a new entry to the list.</td></tr> 186 <tr><td class="button">Edit...</td> 187 <td>opens a window to edit the selected entry in the list.</td></tr> 188 <tr><td class="button">Remove</td> 189 <td>removes the selected entries from the list.</td></tr> 190 <tr><td class="button">Move up</td> 191 <td>moves the selected entries one position up the list.</td></tr> 192 <tr><td class="button">Move down</td> 193 <td>moves the selected entries one position down the list.</td></tr> 194 </table> 195 <p> 196 197 The interface windows allow to specify classes, fields, and methods. They 198 contain text fields and check boxes to constrain these items. They have 199 <b>Ok</b> and <b>Cancel</b> buttons to apply or to cancel the operation. 200 <p> 201 202 For example, your application may be creating some classes dynamically using 203 <code>Class.forName</code>. You should then specify them here, so they are kept 204 by their original names. Press the <b>Add...</b> button to open the class 205 window. Fill out the fully-qualified class name in the <b>Code</b> text field, 206 and press the <b>Ok</b> button. Repeat this for all required classes. Wildcards 207 can be helpful to specify a large number of related classes in one go. If you 208 want to specify all implementations of a certain interface, fill out the 209 fully qualified interface name in the <b>Extends/implements class</b> instead. 210 <p> 211 212 For more advanced settings, it is advisable to become familiar with ProGuard's 213 configuration options through the <a href="usage.html">Usage section</a> and 214 the <a href="examples.html">Examples section</a>. We'll suffice with a brief 215 overview of the three dialogs provided by the GUI. 216 <p> 217 218 The <i>keep class</i> dialog appears when adding or editing new special keep 219 entries. It has text fields and selections for specifying and constraining 220 classes and class members to keep. The <b>Advanced options</b> / <b>Basic 221 options</b> button at the bottom of the dialog allows to toggle showing the 222 advanced options. 223 224 <ul> 225 <li>The <b>Comments</b> text field allows to add optional comments to this 226 entry. The comments will identify the entry in the list and they will 227 appear as comments in the configuration file. 228 229 <li>The <b>Keep</b> selection allows to specify whether you want to protect 230 the specified classes and their specified class members, or just the 231 specified class members from the specified classes, or the specified 232 classes and the specified class members, if the class members are present. 233 Note that class members will only be protected if they are explicitly 234 specified, even if only by means of a wildcard. 235 236 <li>The <b>Allow</b> selection allows to specify whether you want to allow the 237 the specified classes and their specified class members to be shrunk, 238 optimized and/or obfuscated. 239 240 <li>The <b>Access</b> selections allows to specify constraints on the class or 241 classes, based on their access modifiers. 242 243 <li>The <b>Annotation</b> text field takes the fully-qualified name of an 244 annotation that is required for matching classes. The annotation name can 245 contain wildcards. This is an advanced option for defining <i>keep</i> 246 annotations. 247 248 <li>The <b>Class</b> text field takes the fully-qualified name of the class or 249 classes. The class name can contain wildcards. 250 251 <li>The <b>Annotation</b> text field takes the fully-qualified name of an 252 annotation that is required for the class or interface that the above 253 class must extend. The annotation name can contain wildcards. This is an 254 advanced option for defining <i>keep</i> annotations. 255 256 <li>The <b>Extends/implements class</b> text field takes the fully-qualified 257 name of the class or interface that the above classes must extend. 258 259 <li>The <b>Class members</b> list allows to specify a list of fields and 260 methods to keep. It can be edited by means of a list of buttons on the 261 right-hand side. 262 </ul> 263 <p> 264 265 The <i>keep field</i> dialog appears when adding or editing fields within the 266 above dialog. It has text fields and selections for specifying and 267 constraining fields to keep. Again, the <b>Advanced options</b> / <b>Basic 268 options</b> button at the bottom of the dialog allows to toggle showing the 269 advanced options. 270 271 <ul> 272 <li>The <b>Access</b> selections allows to specify constraints on the field or 273 fields, based on their access modifiers. 274 275 <li>The <b>Annotation</b> text field takes the fully-qualified name of an 276 annotation that is required for matching fields. The annotation name can 277 contain wildcards. This is an advanced option for defining <i>keep</i> 278 annotations. 279 280 <li>The <b>Return type</b> text field takes the fully-qualified type of the 281 field or fields. The type can contain wildcards. 282 283 <li>The <b>Name</b> text field takes the name of the field or fields. The field 284 name can contain wildcards. 285 </ul> 286 <p> 287 288 Similarly, the <i>keep method</i> dialog appears when adding or editing 289 methods within the keep class dialog. It has text fields and selections for 290 specifying and constraining methods to keep. Again, the <b>Advanced 291 options</b> / <b>Basic options</b> button at the bottom of the dialog allows 292 to toggle showing the advanced options. 293 294 <ul> 295 <li>The <b>Access</b> selections allows to specify constraints on the method or 296 methods, based on their access modifiers. 297 298 <li>The <b>Annotation</b> text field takes the fully-qualified name of an 299 annotation that is required for matching methods. The annotation name can 300 contain wildcards. This is an advanced option for defining <i>keep</i> 301 annotations. 302 303 <li>The <b>Return type</b> text field takes the fully-qualified type of the method or methods. The type can contain wildcards. 304 305 <li>The <b>Name</b> text field takes the name of the method or methods. The 306 method name can contain wildcards. 307 308 <li>The <b>Arguments</b> text field takes the comma-separated list of 309 fully-qualified method arguments. Each of these arguments can contain 310 wildcards. 311 </ul> 312 <p> 313 314 Corresponding configuration options: 315 <ul type="none"> 316 <li>-<a href="usage.html#dontshrink">dontshrink</a> 317 <li>-<a href="usage.html#printusage">printusage</a> 318 <li>-<a href="usage.html#keep">keep</a> 319 <li>-<a href="usage.html#keepclassmembers">keepclassmembers</a> 320 <li>-<a href="usage.html#keepclasseswithmembers">keepclasseswithmembers</a> 321 </ul> 322 <p> 323 324 <a name="obfuscation"> </a> 325 <h2>The Obfuscation Tab</h2> 326 327 The <i>Obfuscation</i> tab presents a number of options that affect the 328 obfuscation step. The basic options are followed by a few lists of classes and 329 class members (fields and methods) that must be protected from obfuscation 330 (but not necessarily from shrinking). 331 <p> 332 333 The lists are manipulated in the same way as in the <a 334 href="#shrinking">Shrinking Tab</a>. 335 <p> 336 337 Corresponding configuration options: 338 <ul type="none"> 339 <li>-<a href="usage.html#dontobfuscate">dontobfuscate</a> 340 <li>-<a href="usage.html#printmapping">printmapping</a> 341 <li>-<a href="usage.html#applymapping">applymapping</a> 342 <li>-<a href="usage.html#obfuscationdictionary">obfuscationdictionary</a> 343 <li>-<a href="usage.html#classobfuscationdictionary">classobfuscationdictionary</a> 344 <li>-<a href="usage.html#packageobfuscationdictionary">packageobfuscationdictionary</a> 345 <li>-<a href="usage.html#overloadaggressively">overloadaggressively</a> 346 <li>-<a href="usage.html#useuniqueclassmembernames">useuniqueclassmembernames</a> 347 <li>-<a href="usage.html#dontusemixedcaseclassnames">dontusemixedcaseclassnames</a> 348 <li>-<a href="usage.html#keeppackagenames">keeppackagenames</a> 349 <li>-<a href="usage.html#flattenpackagehierarchy">flattenpackagehierarchy</a> 350 <li>-<a href="usage.html#repackageclasses">repackageclasses</a> 351 <li>-<a href="usage.html#keepattributes">keepattributes</a> 352 <li>-<a href="usage.html#renamesourcefileattribute">renamesourcefileattribute</a> 353 <li>-<a href="usage.html#adaptclassstrings">adaptclassstrings</a> 354 <li>-<a href="usage.html#adaptresourcefilenames">adaptresourcefilenames</a> 355 <li>-<a href="usage.html#adaptresourcefilecontents">adaptresourcefilecontents</a> 356 <li>-<a href="usage.html#keepnames">keepnames</a> 357 <li>-<a href="usage.html#keepclassmembernames">keepclassmembernames</a> 358 <li>-<a href="usage.html#keepclasseswithmembernames">keepclasseswithmembernames</a> 359 <li><a href="usage.html#classspecification"><i>class_specification</i></a> 360 </ul> 361 <p> 362 363 <a name="optimization"> </a> 364 <h2>The Optimization Tab</h2> 365 366 The <i>Optimization</i> tab presents a number of options that affect the 367 optimization step. The basic options are followed by a few lists of class 368 method calls that can be removed if ProGuard can determine that their results 369 are not being used. 370 <p> 371 372 The lists are manipulated in much the same way as in the <a 373 href="#shrinking">Shrinking Tab</a>. 374 <p> 375 376 Corresponding configuration options: 377 <ul type="none"> 378 <li>-<a href="usage.html#dontoptimize">dontoptimize</a> 379 <li>-<a href="usage.html#optimizations">optimizations</a> 380 <li>-<a href="usage.html#optimizationpasses">optimizationpasses</a> 381 <li>-<a href="usage.html#allowaccessmodification">allowaccessmodification</a> 382 <li>-<a href="usage.html#mergeinterfacesaggressively">mergeinterfacesaggressively</a> 383 <li>-<a href="usage.html#assumenosideeffects">assumenosideeffects</a> 384 <li><a href="usage.html#classspecification"><i>class_specification</i></a> 385 </ul> 386 <p> 387 388 <a name="information"> </a> 389 <h2>The Information Tab</h2> 390 391 The <i>Information</i> tab presents a number of options for preverification 392 and targeting, and for the information that ProGuard returns when processing 393 your code. The bottom list allows you to query ProGuard about why given 394 classes and class members are being kept in the shrinking step. 395 <p> 396 397 Corresponding configuration options: 398 <ul type="none"> 399 <li>-<a href="usage.html#dontpreverify">dontpreverify</a> 400 <li>-<a href="usage.html#microedition">microedition</a> 401 <li>-<a href="usage.html#target">target</a> 402 <li>-<a href="usage.html#verbose">verbose</a> 403 <li>-<a href="usage.html#dontnote">dontnote</a> 404 <li>-<a href="usage.html#dontwarn">dontwarn</a> 405 <li>-<a href="usage.html#ignorewarnings">ignorewarnings</a> 406 <li>-<a href="usage.html#dontskipnonpubliclibraryclasses">dontskipnonpubliclibraryclasses</a> 407 <li>-<a href="usage.html#dontskipnonpubliclibraryclassmembers">dontskipnonpubliclibraryclassmembers</a> 408 <li>-<a href="usage.html#keepdirectories">keepdirectories</a> 409 <li>-<a href="usage.html#forceprocessing">forceprocessing</a> 410 <li>-<a href="usage.html#printseeds">printseeds</a> 411 <li>-<a href="usage.html#printconfiguration">printconfiguration</a> 412 <li>-<a href="usage.html#dump">dump</a> 413 <li>-<a href="usage.html#whyareyoukeeping">whyareyoukeeping</a> 414 </ul> 415 <p> 416 417 <a name="process"> </a> 418 <h2>The Process Tab</h2> 419 420 The <i>Process</i> tab has an output console for displaying the configuration 421 and the messages while processing. There are three important buttons at the 422 bottom: 423 <p> 424 425 <table cellspacing="5" cellpadding="5"> 426 <tr><td class="button">View configuration</td> 427 <td>displays the current ProGuard configuration in the console.</td></tr> 428 <tr><td class="button">Save configuration...</td> 429 <td>opens a file chooser to save the current ProGuard 430 configuration.</td></tr> 431 <tr><td class="button">Process!</td> 432 <td>executes ProGuard with the current configuration.</td></tr> 433 </table> 434 <p> 435 436 <a name="retrace"> </a> 437 <h2>The ReTrace Tab</h2> 438 439 The <i>ReTrace</i> tab has a panel with a few settings, an input text area for 440 the obfuscated stack trace, and an output console to view the de-obfuscated 441 stack trace: 442 443 <ul> 444 <li>The <b>Verbose</b> check box in the settings panel allows to toggle between 445 normal mode and verbose mode. 446 447 <li>The <b>Mapping file</b> text field takes the name of the required mapping 448 file that ProGuard wrote while processing the original code. The file name 449 can be entered manually or by means of the <b>Browse...</b> button that 450 opens a file chooser. 451 452 <li>The <b>Obfuscated stack trace</b> text area allows to enter the stack 453 trace, typically by copying and pasting it from elsewhere. Alternatively, 454 it can be loaded from a file by means of the load button below. 455 </ul> 456 457 There are two buttons at the bottom: 458 <p> 459 460 <table cellspacing="5" cellpadding="5"> 461 <tr><td class="button">Load stack trace...</td> 462 <td>opens a file chooser to load an obfuscated stack trace.</td></tr> 463 <tr><td class="button">ReTrace!</td> 464 <td>executes ReTrace with the current settings.</td></tr> 465 </table> 466 <p> 467 468 <hr> 469 <address> 470 Copyright © 2002-2009 471 <a href="http://www.graphics.cornell.edu/~eric/">Eric Lafortune</a>. 472 </address> 473 </body> 474 </html> 475