using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System.IO;
#if (UNITY_5 && UNITY_IOS) || UNITY_IPHONE
using UnityEditor.iOS.Xcode;
#endif

public static class IOSBuildPostprocess
{

    [PostProcessBuild(999)]
    public static void OnPostProcessBuild(BuildTarget buildTarget, string path)
    {
        
#if (UNITY_5 && UNITY_IOS) || UNITY_IPHONE
        Debug.Log ("Ios Build PostProcess");
        if (buildTarget == BuildTarget.iOS)
        {
            string projectPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";

            UnityEditor.iOS.Xcode.PBXProject pbxProject = new UnityEditor.iOS.Xcode.PBXProject();
            pbxProject.ReadFromFile(projectPath);
            string target = pbxProject.GetUnityFrameworkTargetGuid();

            //string targetMain = pbxProject.GetUnityMainTargetGuid();
            //pbxProject.AddBuildProperty(targetMain, "OTHER_LDFLAGS", "-ObjC");
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libxml2.tbd", "Libraries/libxml2.tbd", PBXSourceTree.Sdk));
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libresolv.9.tbd", "Libraries/libresolv.9.tbd", PBXSourceTree.Sdk));
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libz.tbd", "Libraries/libz.tbd", PBXSourceTree.Sdk));
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libc++.tbd", "Libraries/libc++.tbd", PBXSourceTree.Sdk));
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libc++abi.tbd", "Libraries/libc++abi.tbd", PBXSourceTree.Sdk));
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libz.tbd", "Libraries/libz.tbd", PBXSourceTree.Sdk));
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libsqlite3.tbd", "Libraries/libsqlite3.tbd", PBXSourceTree.Sdk));
            //pbxProject.AddFileToBuild(target, pbxProject.AddFile("", "Libraries/Bugly.framework", PBXSourceTree.Sdk));
            pbxProject.AddFileToBuild(target, pbxProject.AddFile("usr/lib/libbz2.1.0.tbd", "Libraries/libbz2.1.0.tbd", PBXSourceTree.Sdk));


            pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
            pbxProject.SetBuildProperty(target, "GCC_ENABLE_OBJC_EXCEPTIONS", "YES");
            pbxProject.SetBuildProperty(target, "GCC_C_LANGUAGE_STANDARD", "gnu99");

            pbxProject.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC");
            pbxProject.AddBuildProperty(target, "OTHER_LDFLAGS", "-fobjc-arc");
            pbxProject.AddBuildProperty(target, "OTHER_LDFLAGS", "-lz");   //-lz->libz.
            pbxProject.AddBuildProperty(target, "OTHER_LDFLAGS", "-lc++");//-lc++->libc++.
            pbxProject.AddBuildProperty(target, "OTHER_LDFLAGS", "-liconv.2");//-liconv.2->libiconv.2.




            var plistPath = Path.Combine(path, "Info.plist");
            PlistDocument plist = new PlistDocument();
            plist.ReadFromFile(plistPath);
            plist.root.SetString("NSPhotoLibraryAddUsageDescription", "是否允许此APP保存资源到相册");
            plist.root.SetString("NSPhotoLibraryUsageDescription", "需要相册权限");
            plist.root.SetString("NSCalendarsUsageDescription", "需要日历权限");
            plist.root.SetString("NSMicrophoneUsageDescription", "录制屏幕需要麦克风权限");
            plist.root.SetString("NSCameraUsageDescription", "需要相机权限");
            plist.root.SetString("NSLocationWhenInUseUsageDescription", "需要定位权限");
            plist.root.SetString("NSUserTrackingUsageDescription", "请放心，开启权限不会获取你在其他站点的隐私信息，仅用于标识设备并保障服务安全与提升浏览体验");
            //plist.root.SetString("GADApplicationIdentifier", "ca-app-pub-5184379547015809~5171488591");
            //plist.root.SetBoolean("GADIsAdManagerApp", true);
            plist.root.CreateArray("LSApplicationQueriesSchemes").AddString("mqqapi");

            //// 添加 CFBundleURLTypes 字段
            //PlistElementArray bundleURLTypesArray = new PlistElementArray();
            //PlistElementDict bundleURLTypesDict = bundleURLTypesArray.AddDict();
            //PlistElementArray bundleURLSchemesArray = new PlistElementArray();

            //bundleURLTypesDict.SetString("CFBundleTypeRole", "Editor");
            //bundleURLTypesDict.SetString("CFBundleURLName", "taptap");
            //bundleURLSchemesArray.AddString("tttjssizk1ice8n5bngg");
            //bundleURLTypesDict["CFBundleURLSchemes"] = bundleURLSchemesArray;

            //plist.root["CFBundleURLTypes"] = bundleURLTypesArray;

            // 添加 LSApplicationQueriesSchemes 字段
            PlistElementArray appQueriesSchemesArray ;
            if (plist.root.values.ContainsKey("LSApplicationQueriesSchemes"))
            {
                appQueriesSchemesArray = plist.root.values["LSApplicationQueriesSchemes"].AsArray();
            }
            else
            {
                appQueriesSchemesArray = plist.root.CreateArray("LSApplicationQueriesSchemes");
            }
            //appQueriesSchemesArray.AddString("tapiosdk");
            //appQueriesSchemesArray.AddString("tapsdk");
            string[] schemes = new string[]
           {
                "mqqapi",
                "tapiosdk",
                "tapsdk",

                "openapp.jdmobile",
                "vipshop",
                "tbopen",
                "suning",
                "qunariphone",
                "imeituan",
                "dianping",
                "lianjia",
                "xhsdiscover",
                "baiduhaokan",
                "bdminivideo",
                "baiduboxlite",
                "baiduboxmission",
                "com.baidu.tieba",
                "zhihu",
                "wireless1688",
                "iqiyi",
                "weixin",
                "qihooloan",
                "weishi",
                "travelguide",
                "wbmain",
                "taobaotravel",
                "kwai",
                "ksnebula",
                "sinaweibo",
                "alipays",
                "youku",
                "openjdlite",
                "com.360buy.jdpingou",
                "cainiao",
                "kaola",
                "OneTravel",
                "lianjiabeike",
                "iosamap",
                "com.taobao.taobao4iphone",
                "com.360buy.jdmobile",
                "com.meituan.imeituan",
                "com.vipshop.iphone",
                "com.meituan.itakeaway",
                "com.taobao.tmall",
                "com.xiaojukeji.didi",
                "com.jiangjia.gif",
                "me.ele.ios.eleme",
                "com.ss.iphone.ugc.Aweme",
                "com.alipay.iphoneclient",
                "com.autonavi.amap",
                "com.xunmeng.pinduoduo",
                "com.kuaishou.nebula",
                "com.sina.weibo",
                "com.jd.jinrong",
                "com.ucweb.iphone.lowversion",
                "com.jindidata.SkyEyes",
                "com.baidu.BaiduMobile",
                "com.dianping.dpscope"
           };

            foreach (string scheme in schemes)
            {
                appQueriesSchemesArray.AddString(scheme);
            }


            PlistElementArray elementArray_SKAdNetworkItems = plist.root.CreateArray("SKAdNetworkItems");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "v72qych5uu");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "5lm9lj6jb7");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "4fzdc2evr5");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "x44k69ngh6");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "lr83yxwka7");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "9rd848q2bz");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "5l3tpt7t6e");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "hs6bdukanm");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "8s468mfl3y");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "2u9pt9hc89");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "c6k4g5qg8m");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "a2p9lx4jpn");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "cstr6suwn9");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "5tjdwbrq8w");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "glqzh8vgby");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "7ug5zh24hu");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "9t245vhmpl");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "a8cz6cu7e5");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "6yxyv74ff7");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "f73kdq92p3");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "9nlqeag3gk");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "t38b2kh725");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "5a6flpkh64");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "238da6jt44");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "4pfyvq9l8r");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "yclnxrl5pm");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "4w7y6s5ca2");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "m8dbw4sv7c");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "3rd42ekr43");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "wzmmz9fp6w");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "294l99pt4k");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "3sh42y64q3");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "f38h382jlk");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "3qy4746246");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "kbd757ywx3");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "32z4fx6l9h");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "mp6xlyr22a");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "zq492l623r");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "av6w8kgt66");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "s39g8k73mm");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "578prtvx9j");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "488r3q3dtq");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "4468km3ulz");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "wg4vff78zm");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "44jx6755aq");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "prcb7njmu6");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "w9q455wk68");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "tl55sbb4fm");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "k6y4y55b64");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "4dzt52r2t5");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "ppxm28t8ap");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "22mmun2rn5");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "424m5254lk");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "zmvfpc5aq8");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "ydx93a7ass");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "k674qkevps");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "v79kvwwj4g");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "mlmmfzh3r3");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "f7s53z58qe");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "mls7yz5dvl");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "cg4yq2srnc");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "p78axxw29g");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "737z793b9f");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "6xzpu9s2p8");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "ludvb6z3bs");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "523jb4fst2");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "ggvn48r87g");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "24t9a8vw3c");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "cj5566h2ga");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "7rz58n8ntl");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "feyaarzu9v");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "ejvt5qm6ak");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "n9x2a789qt");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "klf5c3l5u5");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "dzg6xy7pwj");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "y45688jllp");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "hdw39hrw9y");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "uw77j35x4d");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "mtkv5xtk9e");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "gta9lk7p23");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "g28c52eehv");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "su67r6k2v3");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "rx5hdcabgc");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "2fnua5tdw4");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "xy9t38ct57");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "54nzkqm89y");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "9b89h5y424");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "pwa73g5rt2");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "79pbpufp6p");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "kbmxgpxpgc");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "275upjj5gd");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "rvh3l7un93");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "qqp299437r");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "74b6s63p6l");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "44n7hlldy6");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "6p4ks3rnbw");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "e5fvkxwrpn");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "97r2b46745");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "3qcr597p9d");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "n6fk4nfna4");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "b9bk5wbcq9");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "84993kbrcf");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "24zw6aqk47");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "pwdxu55a5a");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "cs644xg564");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "6964rsfnh4");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "9vvzujtq5s");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "a7xqa6mtl2");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "r45fhb6rf7");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "c3frkrj4fj");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "6g9af3uyq4");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "u679fj5vs4");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "g2y4y55b64");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "dbu4b84rxf");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "cp8zw746q7");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "v4nxqhlyqp");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "vutu7akeur");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "y5ghdn5j9k");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "v9wttpbfk9");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "n38lu8286q");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "47vhws6wlr");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "eh6m2bh4zr");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "ecpz2srf59");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "8c4e2ghe7u");
            elementArray_SKAdNetworkItems.AddDict().SetString("SKAdNetworkIdentifier", "r3y5dwb26t");





            plist.WriteToFile(plistPath);

            //string targetGuid = pbxProject.TargetGuidByName(UnityEditor.iOS.Xcode.PBXProject.GetUnityTargetName());
            string targetGuid = pbxProject.GetUnityFrameworkTargetGuid();
            //pbxProject.AddFrameworkToProject(targetGuid, "Bugly.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "Foundation.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "UIKit.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "JavaScriptCore.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "WebKit.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "CoreFoundation.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "CoreTelephony.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "Security.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "SystemConfiguration.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "AdSupport.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "VideoToolbox.framework", false);
            pbxProject.AddFrameworkToProject(targetGuid, "AppTrackingTransparency.framework", false);
           

            pbxProject.WriteToFile(projectPath);
        }
#endif
    }
}
