SwiftPamphletApp icon indicating copy to clipboard operation
SwiftPamphletApp copied to clipboard

编译方式

Open powenn opened this issue 3 years ago • 12 comments

方式一:本地编译

  • 拉代码。
  • 在 SwiftPamphletAppConfig.swift 里 gitHubAccessToken 加入你的 GitHub Access Token。GitHub Access Token 在 Personal Access Tokens 这里获取。记得scope 勾上 repo 和 user。
  • 使用Xcode编译生成这个手册程序或是连点两下compile.command。

Xcode 和 macOS 都需要升到最新版。如果遇到 swift package 下载不下来的情况,参看这个议题来解决:Issue #88

方式二:云编译

无需 Xcode 设置开发人员帐号编译

  • 可使用 compile.command 编译手册程序,无需开启 Xcode 设置个人开发帐号,只需在 SwiftPamphletAppConfig.swift 里 gitHubAccessToken 加入你的 GitHub Access Token,完成后连点 compile.command 两下等待作业完成。
  • 或使用 Github action workflow 编译(感谢@powenn),无需在本地操作、也无需开启 Xcode 设置个人开发帐号,只需设置 personal access token(PAT) 在 repository 设定中 action secrets,并命名为 PAT。Fork 此 repository,设置 PAT,手动启用 action,等候约3分钟即可下载档案,往后专案更新时,只需 fetch and merge,action 会自动进行。

英文说明: Requires storaging PAT to actions secrets and name it to PAT

  • Fork this repository.
  • Go to get a Personal Access Token(PAT) if you haven't done it yet.(GitHub Access Token in Personal Access Tokens,scope checked repo and user)
  • Set your token in action secrets ,and name it to PAT.
  • Get the compiled app package after Github action complete.

While project update ,you won't need to compile it manually in local, only need to fetch and merge commits and wait for about 3 minutes then download it

image image

powenn avatar Dec 20 '21 13:12 powenn

image 用Actions 也不行啊

VictDog avatar Jan 07 '22 02:01 VictDog

image

用Actions 也不行啊

你沒設定PAT吧

powenn avatar Jan 07 '22 03:01 powenn

image 用Actions 也不行啊

你沒設定PAT吧

设置过了

VictDog avatar Jan 07 '22 03:01 VictDog

image

用Actions 也不行啊

你沒設定PAT吧

设置过了

能讓我看看嗎,我剛看了自己的沒問題

powenn avatar Jan 07 '22 04:01 powenn

@VictDog @powenn 我看好像是打成功了

ming1016 avatar Jan 07 '22 06:01 ming1016

@VictDog @powenn 我看好像是打成功了

??

powenn avatar Jan 07 '22 06:01 powenn

@VictDog @powenn 我看好像是打成功了

??

我設定PAT設置為空時會退出 他那個只執行34秒,大概是設置錯誤或沒設置

powenn avatar Jan 07 '22 06:01 powenn

@VictDog @powenn 我看好像是打成功了

??

ming1016 avatar Jan 07 '22 06:01 ming1016

image

用Actions 也不行啊

你沒設定PAT吧

设置过了

能讓我看看嗎,我剛看了自己的沒問題

应该是之前没设置成功,后来又设置了一次编译成功了,忘记回复您了,谢谢了

VictDog avatar Jan 07 '22 06:01 VictDog

@VictDog @powenn 我看好像是打成功了

??

瞭解了,我只看他傳的那個,那個確實是失敗的,因為剛fork 時還沒設置

powenn avatar Jan 07 '22 06:01 powenn

@VictDog @powenn 我看好像是打成功了

??

是的,之前没配置好,后来又设置了一次就编译成功了,忘记回复了,谢谢了

VictDog avatar Jan 07 '22 06:01 VictDog

The following build commands failed:
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'SwiftPamphletApp' from project 'SwiftPamphletApp')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'SwiftPamphletApp' from project 'SwiftPamphletApp')
	CompileSwift normal arm64 (in target 'SwiftPamphletApp' from project 'SwiftPamphletApp')
(3 failures)
Error: Process completed with exit code 65.

编译出错, 我使用main和tag5.0 两个分支都试了一下, 都是上面这个报错提示

xiiiiye avatar Jul 01 '22 07:07 xiiiiye