// This is the install script. You can edit it while the test window is opened,
// an the test window will be update while you're writing
//
// Create:
// A list of elements shown for setup components
// available elements:
// -------------------
// check <flag>
//     displays an check element; flag 1 sets bold, flag 2 sets checked;
//     flag 3 (1+2) sets bold AND checked
//
// !!! Not yet working: !!!
// icon <filename>
//     displays a 16x16 icon (must be converted as v6p)
//     the icon does not go to the next line.
//     Use an intended elements to be displayed next to the icon,
//     or use the break command to manually advance
//     use 'setup\icon.v6p' to use the same icon as defined as default setup
//     icon
//
// label [<flag>]
//     flag 1 sets bold font
// option <flag>
//     displays an option element; flag 1 sets bold, flag 2 sets checked;
//     flag 3 (1+2) sets bold AND checked
//
// !!! Still looking like an option element
// combo <count> <default>
//     displayes an dropdown element;
//     the dropdown list will have <count> items;
//     the <default> flag sets the item to be selected on startup
// 
// Other commands:
// ---------------
// break <1/2 lines>
//     spaces x/2 lines for next element(s)
// lpos <line>
//     defines new line as x/2
// strjump <position>
//     set current string id (1 by default)

[Create]
// Icon myapp.v6p  // Display an icon (not yet working)
Label 1            // Display a text next to the icon
  Check 2          // Display a checkbox, which is checked
                   // This element gets ID 1
                   // We use the checkbox instead of the option element, because
                   // it fits better than an option (both look currently the
                   // same but in future releases, the option element will look
                   // different) and for demonstation events

// Events:
// -------
// When a user changes components/..., an event occurs:
//   [Event_<ElementID>_<Value>]
// Events occur for option, check and select only
// See the Test component / installation script menu to see which ID your
// element has
// <Values>
//   check elements:
//       0   user has unchecked
//       1   user has checked
//   option elements:
//           the option element has only one event, (1), '<Value>' must not
//           be specified
//   combo elements:
//           the combo element has as many events as items, starting with 1
//
// Commands within events:
// -----------------------
// Please note that dropdown elements cannot (yet) be modified.
//
// Add    <expression>    selects specified item(s)
// Clear [<expression>]   deselects all items except those specified
// Fill  [<expression>]   selects all items except those specified
// Rem    <expression>    deselects specified item(s)
//    <expression> is a list of element IDs, or a single element ID (for clear/
//    fill command optional)
//
// Within this short demoscript, we'll have nothing to do, except ensure our
// checkbox cannot be unselected
//

[Event_1_0]  // user unchecks our checkbox
Add 1        // We re-check it
// A standard checkbox element could be unchecked. When this occures, we check
// it again, because the program should always be installed.



// Install script:
// ---------------
// The install script tells which files to install upon the selected items
// {<expression>} defines an logical expression for the following item(s) to be
// processed
//    if <expression> 'is' 1, the following item(s) will be installed
//    expression can use:
//       or, and, xor, eqv, not, >=, <=, =, <>, |
// <Command> [<InternalFileName>],<BaseDir>,[<SubDir>],<FileName>[,<ShortCuts>,<???>,<FileVersion>,<CommandLineOptions>,<.......???>
// <Command>s:
//    Check
//        Check ,<BaseDir>,[<SubDir>],<FileName>[,,,<FileVersion>
//            Will not install if the specified file allready exists and is equal or newer then <FileVersion>
//            In that case, the user will be prompted to install to another directory
//    Copy
//        Copy [<InternalFileName>],<BaseDir>,[<SubDir>],<FileName>[,<ShortCuts>,<???>,<FileVersion>,<CommandLineOptions>,<.......???>
//            Will not copy if the specified file allready exists and is equal or newer then <FileVersion>
//    Del
//        Del ,<BaseDir>,[<SubDir>],<FileName>[[[,<ShortCuts>]]]
//            <ShortCuts> will remove existing shortcuts, but is not yet supported
//    Link    Creates additional shortcut
//        Link ,<BaseDir>,[<SubDir>],<FileName>,<ShortCuts>,<???>,,<CommandLineOptions>,<.......???>
// <BaseDir>s:
//
//
// <SortCuts>:

[Install]
{1} // Always
Check ,1,,MyApp.exe,,,1.0
Del ,1,,MyApp.log         // Delete old logfile
Copy MyApp.exe,1,,MyApp.exe,ADQS 4
