| | |
| | | set { LocalSave.SetInt("ClientPackageIndex", value); }
|
| | | } |
| | | |
| | | public static void BuildPublishers(string _assetBundlePath, string _output, string _publisherString, bool _development, bool _replace)
|
| | | public static void BuildPublishers ( string _sdkPath, string _assetBundlePath, string _output, string _publisherString, bool _development, bool _replace)
|
| | | {
|
| | | var publisherIds = new List<string>();
|
| | | var tempStrings = _publisherString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries);
|
| | |
| | | for (int i = 0; i < halfPackages.Count; i++)
|
| | | {
|
| | | #if UNITY_ANDROID
|
| | | BuildApk(_output, halfPackages[i], _development);
|
| | | BuildApk(_sdkPath, _output, halfPackages[i], _development);
|
| | | #elif UNITY_IOS
|
| | | BuildIpa(halfPackages[i], _replace);
|
| | | #endif
|
| | |
| | | for (int i = 0; i < bigPackages.Count; i++)
|
| | | {
|
| | | #if UNITY_ANDROID
|
| | | BuildApk(_output, bigPackages[i], _development);
|
| | | BuildApk(_sdkPath, _output, bigPackages[i], _development);
|
| | | #elif UNITY_IOS
|
| | | BuildIpa(bigPackages[i], _replace);
|
| | | #endif
|
| | |
| | | packageIndex++;
|
| | | }
|
| | | |
| | | public static void BuildApk(string _output, string _publisher, bool _development)
|
| | | public static void BuildApk(string _sdkPath, string _output, string _publisher, bool _development)
|
| | | {
|
| | | PreBuild(_publisher);
|
| | |
|
| | |
| | | Directory.Delete(ANDROID_PLUGIN_PATH, true);
|
| | | }
|
| | |
|
| | | Debug.LogFormat("执行Android SDK 文件拷贝,from:{0};to:{1}", StringUtility.Contact(SDK_PLUGIN_PROJECT, "/Android/", versionConfig.appId), ANDROID_PLUGIN_PATH);
|
| | | FileExtersion.DirectoryCopy(StringUtility.Contact(SDK_PLUGIN_PROJECT, "/Android/", versionConfig.appId), ANDROID_PLUGIN_PATH); |
| | | Debug.LogFormat("执行Android SDK 文件拷贝,from:{0};to:{1}", StringUtility.Contact(_sdkPath, "/Android/", versionConfig.appId), ANDROID_PLUGIN_PATH);
|
| | | FileExtersion.DirectoryCopy(StringUtility.Contact(_sdkPath, "/Android/", versionConfig.appId), ANDROID_PLUGIN_PATH); |
| | | if (!versionConfig.appId.Equals("test"))
|
| | | {
|
| | | FileExtersion.DirectoryCopy(StringUtility.Contact(SDK_PLUGIN_PROJECT, "/渠道差异/", versionConfig.productName), ANDROID_PLUGIN_PATH);
|
| | | FileExtersion.DirectoryCopy(StringUtility.Contact(_sdkPath, "/渠道差异/", versionConfig.productName), ANDROID_PLUGIN_PATH);
|
| | | } |
| | | AssetDatabase.SaveAssets();
|
| | | AssetDatabase.Refresh();
|
| | |
| | | try |
| | | { |
| | | Debug.LogFormat("从命令行中解析出来的SDKPATH 是:{0}", parameters.sdkPath); |
| | | ClientPackage.SDK_PLUGIN_PROJECT = parameters.sdkPath; |
| | | ClientPackage.BuildPublishers(parameters.assetbundlePath, parameters.outputPath, parameters.publishers, false, false); |
| | | ClientPackage.BuildPublishers(parameters.sdkPath, parameters.assetbundlePath, parameters.outputPath, parameters.publishers, false, false); |
| | | } |
| | | catch (Exception ex) |
| | | { |