Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

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='startup log path'"] "[/FILTER='source filter']" 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 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

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 restricts processing to the source tasks listed. Multiple tasks indicated using '+'. Wildcard using '*'.

/TOOLS 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 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  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 Bundle Metrics,
      .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: specify that startup diagnostics should be logged to a file.  If filepath is blank, 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 

Sample for using Command Line Project Creation

:: this script may be used to run gmStudio in batch
@echo off

set GmStudioExe="C:\Program Files (x86)\GreatMigrations\gmStudio\gmStudio.exe"

::-----------------------------------------------------------------
:: mig is the gmStudio project to process
::-----------------------------------------------------------------

set mig=C:\gmTestBed\ScanTool\proj_csh\ScanTool_csh.gmproj

::-----------------------------------------------------------------
:: Filter may contain a string specifying one or more migration
:: tasks to include in processing.  Multiple tasks can be joined
:: by '+', wildcard = '*'.  This string should not be quoted.
:: if blank, all tasks in tasks list are processed.
::-----------------------------------------------------------------
set filter=%1
:: remove double quotes
set filter=%filter:~1,-1%

::-----------------------------------------------------------------
:: If AutoBatch=YES then  the tasks/tools specified in the
:: migrationSet file (.gmproj) will be performed.  Otherwise, the 
:: set of task/tools specified below will be performed.
:: must be =NO for reports to run.
::-----------------------------------------------------------------

set autobatch="/AUTOBATCH='no'"


::-----------------------------------------------------------------
:: Select Migration Tasks (only used when AUTOBATCH=NO)
::-----------------------------------------------------------------
set tasks=
::set tasks=%tasks%Validate Source,
::set tasks=%tasks%Build VB6,
::set tasks=%tasks%Snapshot a Baseline,
::set tasks=%tasks%Reset Task Status,
set tasks=%tasks%Run Translation,
set tasks=%tasks%Deploy Translation,
::set tasks=%tasks%Build Translation

::-----------------------------------------------------------------
:: Select Migration Tools (only used when AUTOBATCH=NO)
::-----------------------------------------------------------------

set tools=
::set tools=%tools%Apply Task Filter,
::set tools=%tools%Author Interop Assemblies,
::set tools=%tools%Author Interface Descriptions,
::set tools=%tools%Run Assessment Wizard,
::set tools=%tools%Set Build Order,
::set tools=%tools%Create BuildSet,
::set tools=%tools%Author Resx Files,

::-----------------------------------------------------------------
:: Select Reports
::-----------------------------------------------------------------

set rprts=
::-----------------------------------------------------------------
:: Code Scans
::-----------------------------------------------------------------
::set rprts=%rprts%Source Structure,
::set rprts=%rprts%Source References,
::set rprts=%rprts%Source Members,
::set rprts=%rprts%Source GUI Scan,
::set rprts=%rprts%Source Code Scan,
::set rprts=%rprts%Iceberg,
::-----------------------------------------------------------------
:: Project Reports
::-----------------------------------------------------------------
set rprts=%rprts%Project Summary,
::set rprts=%rprts%Metrics Summary,
::set rprts=%rprts%Migration Set,
::set rprts=%rprts%Interface File Headers,
::set rprts=%rprts%Interface File ProgIds,
::set rprts=%rprts%Code Bundle Metrics,
::set rprts=%rprts%.NET Build Logs,
::set rprts=%rprts%Translation Logs,
::set rprts=%rprts%All Logs,
::-----------------------------------------------------------------
:: Semantic Model Reports
::-----------------------------------------------------------------
::set rprts=%rprts%Semantic Definitions,
::set rprts=%rprts%Semantic References,
::set rprts=%rprts%Semantic Audit,
::-----------------------------------------------------------------
:: Utility Reports
::-----------------------------------------------------------------
::set rprts=%rprts%Migration Project List,
::set rprts=%rprts%Target Code Scan,
::set rprts=%rprts%Generate Visual Studio Solution,

echo running %GmStudioExe%

set logstart="/logstart='\temp\gmStudioStartUp.log'"
set      mig="/MIG='%mig%'"
set    tasks="/TASKS='%tasks%'"
set    tools="/TOOLS='%tools%'"
set    rprts=/REPORTS='%rprts%'" 
set      cfg=
::"/CFG='%wrk%\batch\gmStudioBatch.cfg'"
set   filter="/FILTER='%filter%'"

%GmStudioExe% %autoBatch% %filter% %mig% %tasks% %tools% %rprts% %cfg% %logstart%

 

 
  • No labels