---- -- File:: rpf6_build.rbs -- Description:: Build RPF6 file for testing. -- -- Author:: David Muir -- Date:: 27 September 2010 -- ----------------------------------------------------------------------------- -- Uses ----------------------------------------------------------------------------- -- None ----------------------------------------------------------------------------- -- File Globals ----------------------------------------------------------------------------- local compress = false local in_filename = "x:\\gta5\\build\\dev\\independent\\levels\\gta5\\test.txt" local out_filename = "x:\\gta5\\build\\dev\\independent\\levels\\gta5\\vehicles.copy.rpf" local temp_dir = "c:\\temp\\" local mount_point = "pack:/" ----------------------------------------------------------------------------- -- Functions ----------------------------------------------------------------------------- -- -- Parse any unit test option command line parameters. -- function set_parameters( ) in_compress = get_param( "compress" ) if ( in_compress ~= nil ) then compress = ( "true" == in_compress ) end print( "Test Parameters" ) if ( compress ) then print( "compress = true" ) else print( "compress = false" ) end end -- -- Build test RPF6 file. -- function build_rpf( filename ) -- Build local build_start = os.clock() if ( compress ) then start_pack() else start_uncompressed_pack() end add_to_pack( in_filename ) save_pack( out_filename ) close_pack() local build_duration = ( os.clock() - build_start ) return build_duration end ----------------------------------------------------------------------------- -- Entry-Point ----------------------------------------------------------------------------- set_parameters() create_leadingpath( temp_dir .. "blah.txt" ) build_rpf( rpf_filename ) -- rpf6_build.rbs