예제 #1
0
        public static void BuildIOSFull()
        {
            BuildIOSRes();
            Version v = Version.LoadVersionFromStreamingAsset();

            FileUtilTool.DeleteFolder("Assets/StreamingAssets/");

            //写入Version文件和写入fullApkIdentify文件
            Version.SaveVersion2StreamingAsset(v);

            //写入配置信息
            WriteIOSConfig();

            //拷贝除apk以外的资源
            ResTool.CopyResToStreaming();

            BuildIOSProject(v);


            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();

            //上传资源
            //ResTool.UploadRes();
        }
예제 #2
0
        static void ShowScriptDiff(List <string> datas)
        {
            string content = "程序差异清单:\r\n";

            foreach (string s in datas)
            {
                content += s + "\r\n";
            }

            content += "资源清单:\r\n";
            string rescontent = GetDiffRes();

            content += rescontent;

            CustomDialog.Show("打包", content, "继续", "取消", () =>
            {
                UpgradeAPKVer();

                Version.SaveVersion2StreamingAsset(versionRes);

                BuildAPK();

                SaveLastBuildLog();

                MarkTool.SaveLog();
            }, () =>
            {
            });
        }
예제 #3
0
        public static void BuildApkMiniNoGenRes()
        {
            Version v = Version.LoadVersionFromStreamingAsset();

            byte[] bytes = FileUtils.ReadBytesFromStreaming("Audio/GeneratedSoundBanks/Android/Init.bnk", false);

            FileUtilTool.DeleteFolder("Assets/StreamingAssets/");

            //写入Version文件和写入fullApkIdentify文件
            Version.SaveVersion2StreamingAsset(v);

            //写入配置信息
            //WriteApkConfig();

            //写入其他文件
            FileUtils.WriteFile(Application.streamingAssetsPath + "/Audio/GeneratedSoundBanks/Android/Init.bnk", bytes, false);
            string movePath = string.Format("{0}/{1}", ResSetting.build_root_path, v);

            FileUtilTool.CopyFolder(movePath + "/Movie", "Assets/StreamingAssets/Movie");


            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();

            string outputPath = string.Format("{0}/{1}/{2}", ResSetting.AssetBundlesOutputPath, ResSetting.GetChannelRes(), v);
            string location   = string.Format("{0}/{1}", outputPath, "TankGirl.apk");

            BuildApk(v, location);


            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();
        }
예제 #4
0
        public static void BuildStandaloneRes()
        {
            FileUtilTool.CopyFile("IOS_Build/appleversion.dat", Application.streamingAssetsPath + "/appleversion.dat");
            Version v = BuildTool.versionRes;

            Version.SaveVersion2StreamingAsset(v);
            BuildTool.SwitchActiveBuildTarget(BuildTarget.StandaloneWindows64);
            ResTool.BuildLocalRes();
        }
예제 #5
0
        static void BuildQuietResources()
        {
            UpgradeResVer();

            Version.SaveVersion2StreamingAsset(versionRes);

            BuildAPK();

            SaveLastBuildLog();

            MarkTool.SaveLog();
        }
예제 #6
0
        static void BuildQuietScriptDiff()
        {
            UpgradeAPKVer();

            Version.SaveVersion2StreamingAsset(versionRes);

            BuildAPK();

            SaveLastBuildLog();

            MarkTool.SaveLog();
        }
예제 #7
0
        public static void BuildIOSRes()
        {
            //AndroidOneKeyTool.UpdateStreaming();
            FileUtilTool.CopyFile("IOS_Build/appleversion.dat", Application.streamingAssetsPath + "/appleversion.dat");
            Version v = BuildTool.versionRes;

            //v.UpgradeLittleVersion();
            Version.SaveVersion2StreamingAsset(v);
            //AndroidOneKeyTool.CallShellCommandForVersionRes();
            BuildTool.SwitchActiveBuildTarget(BuildTarget.iOS);

            ResTool.BuildLocalRes();
        }
예제 #8
0
        public static void BuildApkNoGenRes()
        {
            Version v = BuildTool.versionRes;

            FileUtilTool.DeleteFolder("Assets/StreamingAssets/");

            //写入Version文件和写入fullApkIdentify文件
            Version.SaveVersion2StreamingAsset(v);

            //写入配置信息
            //WriteApkConfig();

            //拷贝除apk以外的资源
            ResTool.CopyResToStreaming();


            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();

            //打包
            string apkPath  = string.Format("{0}/{1}", ResSetting.AssetBundlesOutputPath, ResSetting.GetChannelRes());
            string location = "";

            if (BuildTool.type == BuildTool.BuildType.APK)
            {
                location = string.Format("{0}/{4}/TankGirl{1}({2}).res{3}.apk", apkPath, PlayerSettings.bundleVersion, PlayerSettings.Android.bundleVersionCode, v,
                                         string.Format("{0:yyyyMMddHHmm}", System.DateTime.Now));
            }
            else
            {
                location = string.Format("{0}/TankGirl_AndroidProject/", apkPath);

                string path = location.Replace(@"\", "/");
                if (path.Contains("/"))
                {
                    string dir = path.Substring(0, path.LastIndexOf("/"));
                    DeleteADirectory(dir);
                }
            }

            BuildApk(v, location);


            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();
        }
예제 #9
0
        public static void BuildStandaloneWithoutRebuiltRes()
        {
            Version v = Version.LoadVersionFromStreamingAsset();

            FileUtilTool.DeleteFolder("Assets/StreamingAssets/");

            //写入Version文件和写入fullApkIdentify文件
            Version.SaveVersion2StreamingAsset(v);

            //写入配置信息
            WriteStandaloneConfig();

            //拷贝除apk以外的资源
            ResTool.CopyResToStreaming();

            BuildStandaloneProject(v);


            AssetDatabase.Refresh();
            AssetDatabase.SaveAssets();
        }
예제 #10
0
        public static void CheckResources()
        {
            string rescontent = GetDiffRes();

            if (rescontent != "")
            {
                CustomDialog.Show("资源更新", rescontent, "继续", "取消", () =>
                {
                    UpgradeResVer();

                    Version.SaveVersion2StreamingAsset(versionRes);

                    BuildAPK();

                    SaveLastBuildLog();

                    MarkTool.SaveLog();
                },

                                  () =>
                {
                });
            }
            else
            {
                if (EditorUtility.DisplayDialog("打包", "本次无更新,仍要出资源?", "是", "否"))
                {
                    UpgradeResVer();

                    Version.SaveVersion2StreamingAsset(versionRes);

                    BuildAPK();

                    SaveLastBuildLog();

                    MarkTool.SaveLog();
                }
            }
        }