//-------------------------------------------------------------------------
    void _initProject()
    {
        try
        {
            Directory.CreateDirectory(mPatchInfoTargetDirectory);
        }
        catch (Exception e)
        {
            _deleteDirectory(mPatchInfoTargetDirectory);
            Debug.LogError("EditorGfInitProjectInfo::CreateDirectory::Error::" + e.Message);
        }

        try
        {
            GFEditor.copyFile(mPatchInfoResouceDirectory, mPatchInfoTargetDirectory, mPatchInfoResouceDirectory);
        }
        catch (Exception e)
        {
            _deleteDirectory(mPatchInfoTargetDirectory);
            Debug.LogError("EditorGfInitProjectInfo::copyFile::Error::" + e.Message);
        }

        PlayerSettings.companyName = mComponyName;
        PlayerSettings.productName = mProductName;
        GFEditor.changeBundleData(mBundleVersion, true);
        GFEditor.changeDataData(mDataVersion, true);
    }
Beispiel #2
0
    static void AutoPatcher()
    {
        _checkPath();
        _initCurrentBuildTarget();

        if (!Directory.Exists(mABTargetPath))
        {
            GFEditorInitProjectInfo test = GetWindow <GFEditorInitProjectInfo>("初始化项目信息");

            test.copyPatchInfo(mABTargetPath,
                               mAssetPath + mABPathInfoResourceDirectory);
            return;
        }

        GFEditor dragon_pack = (GFEditor)EditorWindow.GetWindow(typeof(GFEditor));

        _getCurrentTargetPath();
        _checkPatchData();
        mMD5 = new MD5CryptoServiceProvider();
        mListNeedBuildPlatform  = new List <BuildTarget>();
        mQueueNeedBuildPlatform = new Queue <BuildTarget>();
    }