Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github demo iOS平台编译 PAGViewer.xcworkspace 失败 #2179

Closed
tgitpushping opened this issue Mar 6, 2024 · 3 comments
Closed

github demo iOS平台编译 PAGViewer.xcworkspace 失败 #2179

tgitpushping opened this issue Mar 6, 2024 · 3 comments
Assignees

Comments

@tgitpushping
Copy link

下载github最新代码,按md文件配置了环境,node信息如下,依然报错

~ % node
Welcome to Node.js v21.6.2.

Developer/Xcode/DerivedData/PAGViewer-hkrcmotjtonydkepmfylcxescutt/Build/Intermediates.noindex/PAG.build/Debug-iphoneos/tgfx-vendor.build/Script-D1066797E77D21E0E6E78929.sh: line 5: node: command not found

【版本信息】

master分支最新代码

【平台信息】

iOS 原生

【预期的表现】

编译 PAGViewer.xcworkspace 可以正常编译通过

【实际的情况】

失败

@kevingpqi123
Copy link
Collaborator

这部分已经很成熟了,请严格按照步骤来,不要放过每一个报错,将操作步骤和第一个报错信息发出来

@tgitpushping
Copy link
Author

tgitpushping commented Mar 6, 2024

操作步骤如下:

【电脑环境】
Apple M3 Pro 14.1 (23B2073)

Xcode Version 15.1 (15C65)
gcc version 15.0.0
nodejs v21.6.2

【执行步骤】

1、执行./sync_deps.sh,使用sudo + ./sync_deps.sh 命令执行 -- 无异常

2、执行 sudo npm install -g depsync 命令,提示如下:

changed 4 packages in 101ms

1 package is looking for funding
run npm fund for details

3、执行depsync 无异常

4、使用CLion 编译项目,可以编译成功。提示如下:
-- Configuring done (1.9s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/yanzi/Documents/Project/PAG/libpag/cmake-build-debug
此目录底下有libpag.framework 的产物

5、cd到iOS目录 ,执行./gen_ios 生成了,PAGViewer.xcworkspace 文件

6、点击PAGViewer.xcworkspace 文件, 并配置 bundleid 及 pp描述文件进行编译,报错(此步骤选择的target是PAGViewer)。报错内容如上,并配置了本地的node.js的访问路径。设置了 ~/.bashrc 和 ~/.zshrc

@kevingpqi123
Copy link
Collaborator

这里没那么麻烦,对于 iOS,在 macOS 平台上 git 拉取仓库源码后:
1、image
执行脚本看是否有报错

npm install -g depsync 是其它平台的,不需要执行

2、1 无报错,在 ios 目录下
image
然后修改相关配置运行 PAGViewer.xcworkspace 即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants