Beispiel #1
0
    public static void OneKeyBuildAll(bool pForMobile, bool displayDialog, bool rebuild)
    {
        ScriptRecompileHelper.CheckBeforeUsing();
        ScriptRecompileHelper.WaitIfCompiling(CodeManagerTool.ChangeToJSB);
        ScriptRecompileHelper.WaitIfCompiling <bool>(CSGenerator.GenerateJSCSBindings, displayDialog);
        ScriptRecompileHelper.WaitIfCompiling <bool>(GenerateJsTypeInfo, displayDialog);
        ScriptRecompileHelper.WaitIfCompiling(GenerateJsInfoConfig);
        if (pForMobile || IsRealEnvironment())
        {
            ScriptRecompileHelper.WaitIfCompiling <bool, bool>(BuildJsCode, displayDialog, rebuild);
        }
        else
        {
            ScriptRecompileHelper.WaitIfCompiling <bool, bool>(BuildEditorJsCode, displayDialog, rebuild);
        }

        if (IsRealEnvironment())
        {
            ScriptRecompileHelper.WaitIfCompiling <bool>(MinifyJsCode, displayDialog);
        }

        if (!displayDialog)
        {
            ScriptRecompileHelper.WaitIfCompiling(() => { EditorHelper.DisplayResultDialog(); });
        }
    }
Beispiel #2
0
    public static void OneKeyBuildMobileAndMinify()
    {
        var rebuild       = IsRebuild();
        var displayDialog = false;

        ScriptRecompileHelper.WaitIfCompiling <bool>(GenerateJsTypeInfo, displayDialog);
        ScriptRecompileHelper.WaitIfCompiling(GenerateJsInfoConfig);
        ScriptRecompileHelper.WaitIfCompiling <bool, bool>(BuildJsCode, displayDialog, rebuild);
        if (IsRealEnvironment())
        {
            ScriptRecompileHelper.WaitIfCompiling <bool>(MinifyJsCode, displayDialog);
        }
    }