How To: Add Permanent "Sticky Folder" Option in SF8
This tutorial requires editing some of the core files in Setup Factory 8. It will allow you to start a new project with the options and code for sticky folders already in place and ready to go.
In this tutorial I will refer to the installation folder for your install of Setup Factory as "root" without quotes. All edits are done with a text editor. I use EditPlus, use whatever you like. I recommend making a backup of your file(s) before editing just incase.
The code will update/append the Sticky Folder Name on the browse/edit box when the end user selects a new install location making it much clearer where the final path will be.
---------
Open: root\Data\_default_session_vars.xml
Find in File:
Above found code add:
Save the Edited File: File > Save
Open: root\Includes\Scripts\_SUF70_Global_Functions.lua
Find in File:
Below found code/comment add:
Save the Edited File: File > Save
---------
All done! These changes take effect in new and existing projects. The default setting is set to false to not use Sticky Folders. The default name for the Sticky Folder is your %ProductName% value. The settings can be easily changed from within your project. No additional code etc.. needed!
Usage:
- Start a New Project or Open an Existing Project
- Go to Settings > Session Variables
- Set the option for %UseStickyFolders% to true to enable use of Sticky Folders
- Edit the value for %StickyFolderName% to whatever you like or leave as %ProductName% to simply use the product name as the Sticky Folder.
~ Enjoy!
This tutorial requires editing some of the core files in Setup Factory 8. It will allow you to start a new project with the options and code for sticky folders already in place and ready to go.
In this tutorial I will refer to the installation folder for your install of Setup Factory as "root" without quotes. All edits are done with a text editor. I use EditPlus, use whatever you like. I recommend making a backup of your file(s) before editing just incase.
The code will update/append the Sticky Folder Name on the browse/edit box when the end user selects a new install location making it much clearer where the final path will be.
---------
Open: root\Data\_default_session_vars.xml
Find in File:
Code:
</SUF7SessionVars>
Code:
<!-- Begin Sticky Folder Modification --> <SessionVar> <Name>%UseStickyFolders%</Name> <Value>false</Value> <Type>2</Type> </SessionVar> <SessionVar> <Name>%StickyFolderName%</Name> <Value>%ProductName%</Value> <Type>2</Type> </SessionVar> <!-- End Sticky Folder Modification -->
Open: root\Includes\Scripts\_SUF70_Global_Functions.lua
Find in File:
Code:
-- replace the contents of the edit field with the folder path that was selected
Code:
--[ Begin Sticky Folder Modification ]-- local StickyFoldersEnabled = SessionVar.Expand("%UseStickyFolders%"); if (StickyFoldersEnabled == "true") then local StickyFolder = SessionVar.Expand("%StickyFolderName%"); strTargetFolder = strTargetFolder .. "\\" .. StickyFolder; end --[ End Sticky Folder Modification ]--
---------
All done! These changes take effect in new and existing projects. The default setting is set to false to not use Sticky Folders. The default name for the Sticky Folder is your %ProductName% value. The settings can be easily changed from within your project. No additional code etc.. needed!
Usage:
- Start a New Project or Open an Existing Project
- Go to Settings > Session Variables
- Set the option for %UseStickyFolders% to true to enable use of Sticky Folders
- Edit the value for %StickyFolderName% to whatever you like or leave as %ProductName% to simply use the product name as the Sticky Folder.
~ Enjoy!
Comment