Overview
If your license allows it, gmStudio can be operated in a batch mode. You will typically do this using the sample batch files we provide. This section describes the gmStudio command line.
gmStudio Command Line Syntax
The form of the gmStudio command line is as shown below:
gmStudio /AUTOBATCH = ["YES"|"NO"] /CFG="cfgpath" /MIG="migpath" /TOOLS="tool_list" /TASKS="task_list" /REPORTS="report_list" [/IGNOREMRU] [/LOGSTART] [/LOGALL] where:
/AUTOBATCH = "YES|NO"
If AutoBatch=YES then the command list specified in the migration project file (.gmproj) will be performed. Otherwise, the set of task/tools specified on the command line will be performed.
/CFG = "cfgpath" sets the path to an application config file (gmstudio.cfg) /MIG = "migpath" sets path to a migration project file (.gmproj)
or
/MIG = a migration project specification string: one of more of the following semicolon delimited list of project creation parameters:
Parameter | Description | Status/Default |
Name=name; | name is the name of new upgrade project | optional, default=NewUpgrade |
Source=source; | source is the name of the folder containing the source codes | required |
NetLang=lang; | lang is the target .NET language (csh|vbn) | optional, default=csh |
SendTo=sendto; | sendto is the name of the folder to store the project workspace | required |
SourceFilter=pattern; | pattern is *.vbp|*.asp|fully qualified path to a single file | optional=*.vbp |
UseExtensions=yes|no; | 'yes' indicates to use extension methods (aka. the lightweight object oriented coding style) and 'no' indicates to standard dialect | optional, default=yes |
UseStubs=yes|no; | 'yes' indicates to generate a stub framework for COM and 'no' indicates to use interop | optional, default=yes |
VSVersion=VSnnnn; | VSnnnn is a VSversion name (e.g. VS2010, VS2010, VS2015) | optional, default=VS2013 |
OverWrite=yes|no; | 'yes' means to replace a pre-existing gmProj silently and 'no' indicates to promot the user | optional, default="no"
|
See sample listing below:
/FILTER = "sourcelist" restricts processing to the source tasks listed. Multiple tasks indicated using '+'. Wildcard using '*'.
/TOOLS = "tool_list" specifies a comma delimited list of the following tools (iterate over all migration units for each tool)
Apply Task Filter, Author Interop Assemblies, Author Interface Descriptions, Set Build Order, Author Resx Files,
Generate Visual Studio Solution,
Update Project Metalang File
/TASKS = "task_list" specifies a comma-delimited list of the following tasks (iterate over list of all tasks for each migration unit)
Validate Source,
Build VB6,
Snapshot a Baseline,
Reset Task Status,
Run Translation,
Deploy Translation,
Build Translation,
Run Functional Test
/REPORTS = "report_list" specifies a comma-delimited list of reports (See Reports Article for more information)
Source Structure, Source References, Source Members, Source GUI Scan, Source Code Scan, Iceberg, Project Summary, Metrics Summary, Migration Set, Interface File Headers, Interface File ProgIds, Code Bundles, .NET Build Logs, Translation Logs, All Logs, Semantic References, Semantic Definitions, Semantic Symbols, Semantic Audit,
Generate Visual Studio Solution,
Migration Project List,
Target Code Scan,
Note that tools are processed before tasks.
/IGNOREMRU: do not reload most recently used project
/LOGSTART: create a diagnostic log of startup information. The file will be written to C:\Users\<NAME>\AppData\Roaming\GreatMigrations\gmstartup.*.log
/LOGALL: create a diagnostic log of session information. The file will be written to C:\Users\<NAME>\AppData\Roaming\GreatMigrations\gmstartup.*.log
Sample Command Script
- RunGmStudio.cmd: allows running gmStudio for a specific project from the command line
- RunGmStudio.cmd: allows running gmStudio for a specific project from the command line
Sample for using Command Line Project Creation
C:\gmSamples\_Testing>gmStudio.exe /MIG="Name=FileExplorer;Source=C:\gmTestBed\FileExplorer\src;SendTo=C:\gmTestBed\NewProj\FileExplorer;netLang=csh;VSVersion=VS2013;OverWrite=yes" /AUTOBATCH="YES" Counting LOC: C:\gmTestBed\FileExplorer\src\FileExplorer.vbp Computing Project Summary for C:\gmTestBed\NewProj\FileExplorer\FileExplorer.gmProj Creating Project ------------------------------------------------------------------- User Settings or Defaults ------------------------------------------------------------------- Name =FileExplorer Source =C:\gmTestBed\FileExplorer\src NetLang =csh SendTo =C:\gmTestBed\NewProj\FileExplorer Filter =*.vbp UseExtensions =True UseStubs =True VSVersion =VS2013 ------------------------------------------------------------------- Computed Parameters ------------------------------------------------------------------- txtMigName = FileExplorer txtProjFolder = C:\gmTestBed\NewProj\FileExplorer txtgmProjPath = C:\gmTestBed\NewProj\FileExplorer\FileExplorer.gmProj txtJobTag = std totLoc = 590 txtDeployFolder = %ProjFolder%\deploy txtVirtualRoot = C:\gmTestBed\FileExplorer\src txtTlbSearchPath = C:\Windows\system32 isNew = True optStyleExtensions = True optCOMtoInterop = False askReplacegmProj = False cmbMigType = VBP jobType = jobVbp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Project Settings (as of 3/10/2017 5:50:10 PM) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Name = [FileExplorer] Upgrade Type = [VBP] Target IDE = [VS2013] TaskFilter = [*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*|*] Batch Commands = [Apply Task Filter,Set Build Order,Author Interface Descriptions,Run Translation,Deploy Translation,Build Translation,] Project Folder = [C:\gmTestBed\NewProj\FileExplorer] Deployment Folder = [%ProjFolder%\deploy] Virtual Root Folder = [C:\gmTestBed\FileExplorer\src] Project License = [] COM Search Paths = [C:\Windows\system32] .NET Language = [csh] ~~~~~~~~~~~~~~~ Project Metrics ~~~~~~~~~~~~~~~ Task Tag = [std=1] .NET Language = [csh=1] VB6 Build Status = [?=1] Source Lines = [SUM=590] LOC Translation Script = [tran.FileExplorer_std.xml=1] Task Command Script = [UserCmds.cmd=1] Dependencies Status = [?=1] Translation Status = [?=1] .NET Lines = [SUM=?] LOC .NET Build Status = [?=1] Build Type = [Exe=1] ~~~~~~~~~~~~~~~~~~~~~~~~~ Project Files and Folders ~~~~~~~~~~~~~~~~~~~~~~~~~ Migration Project Path FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\FileExplorer.gmProj] COM TypeLib Search FOUND 2017-Feb-24 14:29:53 [C:\Windows\system32] Source Root FOUND 2017-Mar-09 15:20:06 [C:\gmTestBed\FileExplorer\src] Workspace Folder FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer] User Configuration Folder FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\usr] Working Folder FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\log] Deployment Root Folder FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\deploy] Report Folder FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\report] Session Log Folder FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\log] Runtime Assemblies FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\deploy\bin] IDFs From COM FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\idf\FromIdl] IDFs from Code FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\idf\FromCode] Resx Folder FOUND 2017-Mar-10 17:50:10 [C:\gmTestBed\NewProj\FileExplorer\resx] **** gmStudio Batch Session Start = 3/10/2017 5:50:10 PM Project = C:\gmTestBed\NewProj\FileExplorer\FileExplorer.gmProj **** Starting Batch... TOOLS: Apply Task Filter,Set Build Order,Author Interface Descriptions, TASKS: Run Translation,Deploy Translation,Build Translation, Apply Task Filter Set Build Order No Build Order Needed; only 1 tasks selected. Author Interface Descriptions Loading Interface Cache Scanning References: C:\gmTestBed\FileExplorer\src\FileExplorer.vbp Generating Interface Description for: stdole2.tlb Generating Interface Description for: scrrun.dll Generating Interface Description for: MSCOMCTL.OCX Generating Interface Description for: richtx32.ocx Updating Interface Cache Validating: C:\gmTestBed\FileExplorer\src\FileExplorer.vbp Validation Complete (0 unresolved types) Run Translation Translating C:\gmTestBed\FileExplorer\src\FileExplorer.vbp Deploy Translation Deploying: C:\gmTestBed\NewProj\FileExplorer\log\FileExplorer-FileExplorer-std-csh.bnd Build Translation Building: C:\gmTestBed\NewProj\FileExplorer\deploy\FileExplorer\FileExplorer.csproj Batch Complete. Elapsed Time= 00:00:01.934 C:\gmSamples\_Testing>