<< Click to Display Table of Contents >> RayPack > 7.3 u6 > User Guide > PackDesigner > MSI / MST / RPP Based Projects > Visual Designer Mode > System Configuration > Files and Folders Add Files and Folders |
Within the Visual Designer mode, adding folders to a packaging project may be done by manually by creating new objects inside the existing structure or by importing existing objects from external resources, such as local volumes, network shares, or flash drives. However, for files it is only possible to import them via the Files and Folders view, they cannot be created from scratch here.
The default template for new projects creates a basic structure of directories to start from. The root of this base is [TARGETDIR], which is a so called predefined folder. The square brackets around the folder name indicate that the actual path and name of the folder on the target machine will be defined on run time. The TARGETDIR property specifies the root destination directory for the installation. Since there is a whole set of Windows Installer predefined system folders, RayPack users may choose to use one of those predefined folders or create custom folders at a specific location.
As outlined before, the Files and Folders view contains a package file browser, which is always visible and an optionally displayable system file browser.
1.Right above the package file browser, an Add or import... button is available, revealing a set of folder creation options on click.
2.From the list of options, select the Predefined folder... option to display the dialog with a listing of all predefined folders within the Special Installer Folders dialog.
Folders which are printed in a grey font style are already present within the directory structure of the current packaging project. They are presented in a view-only mode, since they cannot be added again or removed from the project by using the interface controls of this dialog.
3.The Special Installer Folders dialog contains the list of predefined folders in three columns:
•Use
This column indicates if a predefined folder has been marked for usage within the packaging project. Therefore, already existing folders show activated checkboxes in this column. Users have to activate the checkbox in this column to mark folders they want to add to the projects directory structure.
•Id
The predefined name of the folder.
•Resolved path
This is the actual path to the predefined folder target as it would be resolved for the packaging machine on Installer run time. Since the packaging machine may vary from the packages later target machine in operating system and architecture, the resolved path is just intended to give an example of the actual path. At run time, the actual path is resolved to match the target machines environment.
4.Once the desired set of predefined folders is marked with active checkboxes in the use column, they can be added to the project by either using the OK button, which immediately creates the folder(s) and closes the Special Installer Folders dialog or by clicking the Apply button, which also adds the folder(s), but keeps the Special Installer Folders dialog open for further activity.
When the Apply button is used, the newly added folders are automatically transferred into a view-only mode within the current dialog, since they cannot be removed from the packaging project via this dialog.
The Close button closes the Special Installer Folders dialog without applying any new changes to the folder structure of the packaging project.
5.As soon as the Special Installer Folders dialog is closed, the directory structure within the package file browser is updated with the newly added folders.
In order to customize the default choice of predefined folders, refer to the Customizing predefined folders section.
Note: 64-bit folders (for example ProgramFiles64Folder) are not shown if the target architecture of the current package is 32-bit (Intel). This setting can be changed in the Summary information view. |
Creating a new folder always starts by selecting the parent directory of the new folder within the left window of the package file browser. Once the parent is chosen, there are several methods to trigger folder creation:
•Right-click the parent directory and select New Folder
•Click the Add or import... button above the package file browser and select Folder from the options menu
•Hit insert on the keyboard
Each of the named methods creates a new, empty folder with the default name New folder. If a folder with that name is already present within the same parent directory, an automatically incremented index value is added (e. g. New folder (2))
The new folder is already focused for edition therefore immediately typing the actually desired name of the new folder and hitting Enter on the keyboard, the default name will be replaced. Please make sure to use a valid folder name by avoiding special characters or duplicate folder names within the same parent directory. Of course, the folder name cannot be empty.
However, since the new folder itself is empty after creation, it is displayed in a pale font and icon style. (see The directory tree color scheme)
The Files and Folders view generally offers three methods for importing files or folders:
•Drag and drop from a Windows explorer instance
•Transfer from system file browser interface
•Select from Windows system browser instance
When instances of RayPack and Windows explorer are open in parallel windows, it is possible to drag and drop files from the Windows explorer into any directory within the package file browser of the Files and Folders view.
To do so:
1.Select the target folder within the RayPack package file browser window (lower left window within Files & Folders)
2.Switch to the Windows explorer window
3.Mark one or more files
4.Drag the selection from the Windows explorer to RayPack
5.Drop the selection into the right window of the package file browser.
6.A copy of the selected files is created within the file stock of the packaging project.
Note: Due to consistency reasons, it is not possible to drag & drop folder objects to a packaging project. The dropped selection must be a collection of single files, otherwise RayPack ignores the drop attempt. The import attempt is also rejected when the selection is dropped inside the left window of the package file browser. Please make sure to keep drag source and drop target application window at UAC level (if UAC is active). |
To import files or folders from the system file browser, users have to display the system file browser first. To do so, click on the Show file browser button on the upper right corner of the Files and Folders view.
Within the left window of the system file browser, navigate to the folder that has to be imported into the packaging project. Select it with a mouse click.
RayPack loads the list of files which are stored within the selected folder into the adjacent right window.
Within the left window of the package file browser, navigate to the target folder for the import. Select it with a mouse click.
To import the whole folder and all its contents (sub-folders and files), use the arrow button below the left window of the system file browser. A copy of the selected folder is imported into the project and displayed within the left window of the package file browser.
If a selection of files has to be imported, use the right window of the system file browser. Select one or more files (if required, use the control key to multi-select files) and use the arrow button below the right window of the system file browser. A copy of the selected files is imported into the project and displayed within the right window of the package file browser.
Note: Due to consistency reasons, it is not possible to import several folders or a sub-selection of files from different folders in one single step. To do so, apply the procedure given above for all required folders in turn. |
The local browser provides full support of drag and drop operations. Files and folders can be imported by simply dragging a node from the local browser pane to the files view (to import files to currently selected folder) or to the folders view (to import files to a specific node).
Note: Due to consistency reasons it is not possible to import a folder into the files view of the currently selected folder. |
1.Within the left window of the package file browser, navigate to the target folder for the import. Select it with a mouse click.
2.Reveal the set of object creation options for package folders with a click on the Add or import... button above the package file browser.
3.From the displayed menu, select Import file(s)... to open a Windows system browser dialog.
4.Browse to the required folder within the Select files to be imported dialog.
5.Select one or more files from that folder and use the Open button to import them into the packages file stock.
A copy of the selected files is imported into the project and displayed within the right window of the package file browser. The windows system browser is closed automatically, and the Files and Folders view is updated to show the newly imported files within the right window of the package file browser.
Note: Due to consistency reasons, it is not possible to import several folders or a sub-selection of files from different folders in one single step. To do so, apply the procedure given above for all required folders in turn. |
Using Variables to Reference Source Paths
For advanced scenarios, variable paths can be used to determine the source of physical files. Refer to the following sections for more information: