
下载地址:https://download.csdn.net/download/liutietuo/86511410
- cocos creator script decrypt version 1.0
-
- D:\Users\Administrator\Desktop\main_bundle\1ss442.jsc
- decrypt success
- Press Enter Exit

偶尔会出现编译后的jsc无法运行,或者某些jsb自定义的函数找不到,
最好将require("jsb.js")的全部内容整合到一个文件,然后编译jsc
具体方法:
cat 文件a,文件b,,> xxx.js
python 命令行路径/cocos2d.py jscomplie -s 源文件目录 -d 输出目录;
- private void getdir(string path, string extName ="")
- {
-
- string[] dir = Directory.GetDirectories(path); //文件夹列表
- DirectoryInfo fdir = new DirectoryInfo(path);
- FileInfo[] file = fdir.GetFiles();
- //FileInfo[] file = Directory.GetFiles(path); //文件列表
- if (file.Length != 0 || dir.Length != 0) //当前目录文件或文件夹不为空
- {
- foreach (FileInfo f in file) //显示当前目录所有文件
- {
- if (extName.Length == 0 || extName.ToLower().IndexOf(f.Extension.ToLower()) >= 0)
- {
- FileAllList.Add(f);
- }
- }
- foreach (string d in dir)
- {
- getdir(d, extName);//递归
- }
- }
-
- }
-
-
- private Process exep = null;
- public async Task doPrs(string fullname, string newName)
- {
-
- exep = new System.Diagnostics.Process();
- exep.StartInfo.FileName = "etcpack.exe";
- exep.StartInfo.Arguments = " " + fullname + " " + newName + "";
- exep.StartInfo.CreateNoWindow = true;
- exep.StartInfo.UseShellExecute = false;
- exep.Start();
- exep.WaitForExit();//关键,等待外部程序退出后才能往下执行
-
- FileInfo fnew = new FileInfo(newName);
- if (!fnew.Exists)
- {
- WriteErrorLine("===失败....." + fullname);
-
- }
- else
- {
- File.Delete(fullname);
- WriteSuccessLine("===成功....." + fullname);
- }
-
- }
