示例#1
0
    private static void CopyOtherFiles(string pathToBuiltProject)
    {
        if (!MsdkUtil.isUnityEarlierThan("5.0"))
        {
            return;
        }

        string destDir = pathToBuiltProject + "/MSDK";

        if (!Directory.Exists(destDir))
        {
            Directory.CreateDirectory(destDir);
        }

        //MsdkUtil.CopyDir(env.PATH_ADAPTER_IOS + "/oc", destDir + "/oc", true);
        MsdkUtil.CopyDir(env.PATH_BUGLY + "/iOS", destDir + "/bugly", true);
    }
示例#2
0
    public static void Deploy()
    {
        if (Directory.Exists(env.PATH_TEMP))
        {
            Directory.Delete(env.PATH_TEMP, true);
        }
        Directory.CreateDirectory(env.PATH_TEMP);

        /* 1) MSDKLibrary */
        DeployLibrary();

        /* 2) assets */
        if (!Directory.Exists(env.PATH_PUGLIN_ANDROID + "/assets"))
        {
            Directory.CreateDirectory(env.PATH_PUGLIN_ANDROID + "/assets");
        }
        MsdkUtil.CopyDir(DIR_ASSETS, env.PATH_PUGLIN_ANDROID + "/assets", true);

        /* 3) libs */
        MsdkUtil.CopyDir(DIR_LIBS, env.PATH_PUGLIN_ANDROID + "/libs", true);
        #if UNITY_5
        // Editor目录处的jar包不需要到 Android/libs 下
        #else
        MsdkUtil.CopyDir(env.PATH_BUGLY + "/Android/libs", env.PATH_PUGLIN_ANDROID + "/libs", true);
        #endif

        /* 4) files */
        MsdkUtil.CopyFile(FILE_PROPERTY, env.PATH_PUGLIN_ANDROID + "/project.properties", true);
        string manifestFile = MsdkUtil.CopyFile(FILE_MANIFEST,
                                                env.PATH_PUGLIN_ANDROID + "/AndroidManifest.xml", true);
        MsdkUtil.ReplaceTextWithRegex(manifestFile, manifestRules);
        MsdkUtil.ReplaceText(manifestFile, "com.example.wegame", game.BundleId);

        /* 5) adapter.jar */
        GenerateAdapter();

        // 更新Config
        ConfigSettings.Instance.Update();
    }