Created 2013-01-09 21:13:21 by Nils G. Svedmyr on NILS-W510 [ Header and license information ]
Class List
Class cManifestSideBySide
Source: MANIFESTSIDEBYSIDE.PKG
Baseclass: cObject
Procedures
Functions
DoSetApplicationStrings String sManifestFullFileName - Procedure
Sets a series of properties for the current application manifest file
Pass an application manifest file with full pathing.
DoRunExeFile String sManifestFullFileName - Procedure
Runs the VDF program that is associated with the
selected application manifest file.
DoUpdateManifestFile String[] sFilesArray String[] sDuplicatesArray - Procedure
*** Main Procedure ***
It does the actual update of the application manifest file.
BackupFile String sPath String sFileName - Procedure
Creates a backup of a file and if it already exists, it creates a
copy with the current date & time in the filename, before the extension part.
Note: Military date format is used
CreateConsole Returns Handle - Function
If the function succeeds, the return value is nonzero,
and is a handle to the console.
FreeConsole Returns Boolean - Function
If the function succeeds, the return value is true.
AllTypeLibsAsArray String[] sFilesArray Returns tTypeLibs[] - Function
Reads all TypeLib declarations from the Manifest library folder.
Returns an array struct.
CompareTypeLibIDs tTypeLibs TypeLib1 tTypeLibs TypeLib2 Returns Integer - Function
Custom comparison function:
Returns (GT) if struct value in first parameter > struct value in second parameter.
Returns (LT) if struct value in first parameter < struct value in second parameter.
Otherwise returns (EQ).
Note: We only sort the first part of the typelib string, up to but not including
the version number.
DuplicateTypeLibs String[] sFilesArray Returns tTypeLibs[] - Function
Returns all dublicate typelib declarations.
CheckForDuplicateTypeLibs String[] sFilesArray Returns Integer - Function
Returns the number of typelib declarations
CheckIfDuplicateTypeLib String sFileName String[] sDuplicatesArray Returns Boolean - Function
Helper function that returns True if duplicate typelibs exists for the sFileName that is passed.
DateTimeStamp Returns String - Function
Creates a datetime stamp string in military date format (yyyymmdd-hhmmss)
Used by the BackupFile function.
AddProgramToStudioToolsMenu String sStudioVersion Returns Integer - Function
Adds the ManifestSideBySide program to the VDF Studio's Tools menu.
Pass the Studio version as a dot separated string. E.g. "17.0"
The Studio uses a registry string for the purpose.
Checks are made so that if the program already exists in the Studio's
tools menu - nothing will be changed. A check is also performed that
the Studio for the passed version is installed on the machine, in case
no changes are made to the registry.
Returns:
cx_RegKeyAlreadyExist, cx_RegKeyCreated, cx_RegkeyFailed or cx_RegKeyVDFKeyDoesNotExist
SelectedCOMComponents String[] sSelectedFileNames Returns tCOMComponents[] - Function
Pass an array with selected fragment files.
Returns a struc array with the COM component names and a boolean if it exists or not
in the application's Program folder.
IsCOMComponent String sFileName Returns tCOMComponents - Function
Pass: A manifest fragment filename (no path)
Returns: A struct with the name of the component and a True/False if the
component that it refers to exists in the application's Programs folder.
DownloadFile String sHost String sPage String sFileName Returns Boolean - Function
Function that downloads a filename from an Internet address.
Params:
sHost - The name of the site
sPage - the address at the sHost site
sFileName - The name and path for the localy saved downloaded filename to save to.
Returns:
True if success.
Sample usage:
Get DownloadFile CS_VdfGuidanceSVN CS_VdfGuidanceLibrary "c:\temp.htm" to bSuccess
DownloadNewFiles String[] sFilesArray Returns Boolean - Function
Sub function that downloads the files in the passed array
to the local Manifest Fragment Library.
ParseManifestLibraryHTMLPage String sHTMLFile Returns String[] - Function
Function that takes an html page (the manifest fragment library page)
as a parameter and returns all manifest fragment library text files as
a text string array.
It also deletes the passed sHTMLFile from disk after parsing complete.
FilesArrayDifference String[] sFilesArray String[] sManifestLibraryArray Returns String[] - Function
Function that takes a string array with manifest fragment files that has been selected by user
The second param is the total number of fragment files of the Manifest Fragment Library.
Returns a string array with the unique files from the sManifestLibraryArray that does not exists in sFilesArray.
AllManifestFragmentFiles Returns String[] - Function
Function returns all Manifest Fragment Library Text Files as a string array,
that exists in the "Manifest Fragment Library" of the current workspace.
It relies on that the ini-file resides in the Home folder.
CheckForNewManifestFragmentFiles Boolean ByRef bOk Returns String[] - Function
Function returns an array with new Manifest Fragment Files that exists
remotely on VDF-Guidance, but is missing from the local 'Manifest Fragment Library'.
Also returns True if the download went OK via a ByRef param.
CheckLocalManifestFragmentFiles String[] sFilesArray Returns Boolean - Function
Function takes an array with fragment files as parameter
Returns: True if all files in the array exists in the Manifest Fragment Library.
CopyCOMComponents String[] sFilesArray Returns Boolean - Function
The pathing can e.g. be: "C:\Program Files (x86)\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v13.4.2"
Pass an array with CodeJock components file names.
The function will copy all components in the array to the psTargetPath class property.
Returns True if successful.
ExtractCodeJockVersion String sFileName Returns String - Function
Only for CJ components. Pass a Fragment Library Filename and
function will return the CJ version of the COM component.
IsAppRunning String sFileName Returns Boolean - Function
Function takes an executable program name with full path as paremeter.
Returns: True if the program is running.
Header and license information
****************************************************************************
$Module type: Package
$Module name: ManifestSideBySide.pkg
$Author : Nils G. Svedmyr, RDC Tools International.
Copyright (c) 2012 RDC Tools International
E-mail : nils.svedmyr@rdctools.com
Web-site : http://www.rdctools.com
Created : 2012-09-20 @ 19:04 (Military date format - Year-Month-Day)
The code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is free software; you can redistribute it and/or modify it under the terms of the
GNU Lesser General Public License - see the "GNU Lesser General Public License.txt"
in the help folder for more details.
Contributors: Feedback was provided by Wil van Antwerpen, Peter H. van Wijk
Chuck Atkinson, Andrew Kennard.
Sponsors: Please SUPPORT this project by donating the amount what you think it is worth to have.
By donating you not only support the software, but -if you want- you also get to be
named as an official sponsor for the project.
Here is the page on VDF-Guidance:
http://www.VDF-Guidance.com/ContribPage.asp?Page=SOFTGENMANIFESTS&ContribRecId=131
Purpose: Please read the ManifestSideBySideManagerHelp.rtf in the Help folder.
Compatibility:Visual DataFlex 16.0 and up. The tool was developed with VDF 17,
but is backwards-compatable with VDF 16 and up.
However, there is no reason you can't use the program to generate manifest files
and embed the manifest data into older VDF programs than 16.0. In fact the program
can be used to create and embed manifest data into any executable that uses
COM components!
For the main view DbMergerView.vw and ManHds.sl the newer CodeJock grids are used.
All other code is compatable with VDF 14.0 and up. So if there is a strong
reason to run this program under an earlier VDF version than 16.0 the
DbMergerView.vw and ManHds.sl could be changed to use the older DbGrid class.
For the same reason some older syntax is used though the code. Such as:
Get Create U_Array...
instead of Get Create (Refclass(Array))..
Move (SortArray(AllTypeLibIdsArray, Self, get_CompareTypeLibIDs))..
instead of Move (SortArray(AllTypeLibIdsArray, Self, Reffunc(CompareTypeLibIDs)))..
Microsoft link:http://msdn.microsoft.com/en-us/library/dd408052(v=VS.85).aspx
******************************************************************************