...
ShellToolExe = "%SystemFolder%\deploy.exe" ' the 'deploy' sub-command passed to the Shelltool will run shell commands such as rmdir/mkdir/execute otherwise only the cat commands run. DeployCmd = "cmd.exe /C pushd '%LogFolder%' && '%ShellToolExe%' '%BndPath%' verbose replace > '%LogPath%' 2>&1 %UserCmd% && popd" %LogFolder% is the workspace\log folder where gmStudio does almost all of its batch operations %ShellToolExe% is the path to deploy.exe %BndPath% is the path to the code bundle to be processed verbose is a command line flag that tells deploy.exe to report progress replace is a command line flag that tells deploy.exe to replace files with the ones in the bundle. %Logpath% is a file that will capture the deployment log %UserCmd% is a place-holder for a user batch command script
Warning | ||
---|---|---|
| ||
By default, the deployment step will replace files in the deploy folder. If you have made hand changes to the code in that folder and have not captured those changes in the tool configuration, they will be lost. The rationale behind this is that the translation tuning process is iterative. We expect you to translate and re-translate your code -- each time improving the translation configuration to improve the quality of the generated code. Your fixes should be implemented in your Migration Configuration File so that they can be applied systematically and repeatedly in future iterations. |
The deploy tool is actually a command processor that can remove and create folders, and execute external programs. For example, the deploy.exe utility is used to deploy and build to binary (by running MSBuild) all the prototype assemblies generated in a prototype translation.
Default VB6 Deployment
Translating a VB6 migration unit produces a set of files that correspond to the ones referenced by the source VBP:
...
[WorkspaceRoot]\[MigName]\deploy\[TaskName]_[TaskTag]_[Lang] where: [WorkspaceRoot] is the workspace root folder [MigName] is the migration project name [TaskName] is the original VBP file [TaskTag] is the task tag assigned to the task when it was added [Lang] is 'csh' or 'vbn' if the target language is C# or VB.Net respectively.
Tip |
---|
Select [Open .NET Project Folder] on the migration unit context menu open the deployment folder for that unit. Select [View\Deploy Folder] to open the deploy folder for your migration project. |
Example
The Interop2_csh.gmproj ScanTool sample has the following settings
In the project file header: ProjFolder = "C:\GMS\samples\workspace\DemoScanTool" DeployFolder = "%ProjFolder%\deploy" On the task records: TaskTag = "iop2mgd" Lang = "csh" SrcName = "ScanToolUI" or "ScanToolLib"
The Thus, the full path to the csproj files produced for each migration unit is:
- C:\GMS\samples\workspace\DemoScanTool\deploy\ScanToolUI_iop2mgd_csh\ScanToolUI.csproj]
- C:\GMS\samples\workspace\DemoScanTool\deploy\ScanToolLib_iop2mgd_csh\ScanToolLib.csproj]
gmStudio communicates the deployment folder to the translation process using a select DeployLocationDeployLocation command in the Translation Script. For example the tran.Interop2_csh.xml script template contains the following statement
<Select DeployLocation ="%NetProjFolder%" />
gmStudio uses information in the Configuration Files to set %NetProjFolder% to the correct value when you run the translation.
<Select DeployLocation ="C:\GMS\samples\workspace\DemoScanTool\deploy\ScanToolUI_iop2_csh" />
OR
<Select DeployLocation ="C:\GMS\samples\workspace\DemoScanTool\deploy\ScanToolLib_iop2_csh" />
This ultimately ends up in the bundle file and directs the physical deployment of files to disk. Deploying a bundle file produces a log file. In the case of this example, the path of the log is
C:\GMS\samples\workspace\DemoScanTool\log\Interop2_csh-ScanToolLib-iop2-csh.bnd.log
The contents of the file look like this:
...