Exemple #1
0
parser.add_argument('-al', '--additional-libdir', default=None,
 help="""Directory or path to a file with library paths to append to the additional library directories
 of the modified external-vcproj. The paths in the file can be separated by line
 or by semicolon.""")

parser.add_argument('-ad', '--additional-dependencies', default=None,
 help="""Path to a file with a list of libraries to add to the project's additional dependencies.
Only applicable if the configuration type is 'exe'.
The library names can be separated by line or semicolon.""")

parser.add_argument('-pl', '--platform', default='Win32',
 help="""If specified, the resulting VS projects will use
 the specified platform. Default is "Win32". Note that this option does not affect
 any settings introduced by the build configuration specified with the -b or
 --bconf option.""")
parser.add_argument('--legacy-compiling-mod', action='store_true', help='Enables legacy COMPILING_MOD_<MODULENAME> preprocessor defines which may be needed to build code which relied on this previous behaviour (in Contexo 0.8.0 and earlier).')

parser.add_argument('-o', '--output', default=os.getcwd(),
 help="The output directory for the export.")

parser.add_argument('-ct', '--configuration-type', default='lib',
 help="""Type of project, whether the project generates a lib, dll or an exe. Default value is 'lib'.
Accepted values are 'dll, 'exe', or 'lib'.
""")

#parser.add_argument('-ld','--libdir', default="", help=standard_description['--libdir'])
#parser.add_argument('-l', '--lib', help="if the build operation results in a single library, this option sets its name")

args = parser.parse_args()
args.func(args)
Exemple #2
0
parser_export.add_argument('-nra', '--no-remote-repo-access', action='store_true', help=standard_description['--no-remote-repo-access'])
parser_export.add_argument('--tolerate-missing-headers',  action='store_true',  help = standard_description['--tolerate-missing-headers'])
parser_export.add_argument('--fail-on-missing-headers',  action='store_true',  help = standard_description['--fail-on-missing-headers'])
parser_export.add_argument('--legacy-duplicate-sources', action='store_true', help=standard_description['--legacy-duplicate-sources'])

#
#

parser_view = subparsers.add_parser( 'view', help="View operations" )
view_subparsers = parser_view.add_subparsers()

parser_view_update = view_subparsers.add_parser('update', help="Update/synchronize a view")
parser_view_update.set_defaults(func=cmd_updateview)
parser_view_update.add_argument('view', nargs='?', default=os.getcwd(), help="Relative or absolute path to a view directory. If omitted, current working directory is used.")
parser_view_update.add_argument('-co', '--checkouts-only', action='store_true', help="Checkout missing repositories only. Don't update existing repositories.")
parser_view_update.add_argument('-uo', '--updates-only', action='store_true', help="Update existing repositories only. Don't checkout missing repositories.")
parser_view_update.add_argument('-nra', '--no-remote-repo-access', action='store_true', help="DEPRECATED: will emit a warning..")

parser_view_validate = view_subparsers.add_parser('validate', help="Validate consistency of view structure")
parser_view_validate.set_defaults(func=cmd_validateview)
parser_view_validate.add_argument('view', nargs='?', default=os.getcwd(), help="Relative or absolute path to a view directory. If omitted, current working directory is used.")
parser_view_validate.add_argument('-nra', '--no-remote-repo-access', action='store_true', help="DEPRECATED: will emit a warning.")

###############################################################################

# Parse cmdline
argsa=parser.parse_args()
argsa.func(argsa)
infoMessage("Contexo " + ctx_sysinfo.CTX_DISPLAYVERSION + " finished successfully.", 1)