TOP/拡張スクリプト/ビルド中に処理を実行

ビルド中に処理を実行

概要

ビルドする際に各タイミングで処理を実行する例を提示します。

記述はプロジェクト設定のその他タブの拡張スクリプトで指定したスクリプトファイルに記述します。

各タイミングで文字列を出力する。

Developer.current_structure.build_functions.first = function ()
{
  print( "first\n" );
}

Developer.current_structure.build_functions.last = function ( exist_error )
{
  print( "last\n" );
}

Developer.current_structure.build_functions.before_compile = function ( target )
{
  print( target + " before_compile\n" );
}

Developer.current_structure.build_functions.after_compile = function ( target, exit_code )
{
  print( target + " after_compile\n" );
}

Developer.current_structure.build_functions.before_build = function ()
{
  print( "before_build\n" );
}

Developer.current_structure.build_functions.after_build = function ( exit_code )
{
  print( "after_build\n" );
}

Developer.current_structure.build_functions.before_clean = function ()
{
  print( "before_clean\n" );
}

Developer.current_structure.build_functions.after_clean = function ( exit_code )
{
  print( "after_clean\n" );
}

ビルド終了時に正常に終了した場合、作成したファイルを特定の場所にコピーする

Developer.current_structure.build_functions.after_build = function ( exit_code )
{
  if ( exit_code == 0 ) {
    local str = "copy /Y \"";
    str += Developer.target_file_path;
    str += "\" \"";
    str += Developer.project_directory_path + "\\" + "copy_folder";

    print( str );
    print( "\n" );
    Developer.system( str );
  }
}

TOP/拡張スクリプト/ビルド中に処理を実行