53 Star 323 Fork 211

TopDiscover / QuickFramework

 / 详情

Mac 下引擎修正 路径问题

待办的
创建于  
2021-12-13 15:15

packages/fix_engine/src/main.js

get appPath() {
    if (this._path) {
      return this._path;
    }
    this._path = Editor.argv.$0.replace("/MacOS", '');
    //window : D:\CocosCreator\2.1.2\CocosCreator.exe --path
    //mac : Applications/CocosCreator.app/Contents/MacOS/CocosCreator --path
    let parser = path.parse(this._path);
    this._path = parser.dir;
    return this._path;
}

评论 (1)

flovel 创建了任务

packages/fix_engine/src/main.js 下面的修改会更好点,已经上传了

 /**@description creator 安所路径 */
    private _path : string | null = null;
    private get appPath(){
        if( this._path ){
            return this._path;
        }
        this._path = Editor.App.path;
        //D:\Creator\Creator\3.1.0\resources\app.asar
        let parser = path.parse(this._path);
        this._path = parser.dir;
        return this._path;
    }
```ts 

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
1636850 flovel 1578956553
TypeScript
1
https://gitee.com/top-discover/QuickFramework.git
git@gitee.com:top-discover/QuickFramework.git
top-discover
QuickFramework
QuickFramework

搜索帮助