Skip to content

[FEAT]添加构建参数 #986

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

Open
AdySnowflake opened this issue Mar 7, 2025 · 2 comments · Fixed by #987
Open

[FEAT]添加构建参数 #986

AdySnowflake opened this issue Mar 7, 2025 · 2 comments · Fixed by #987
Labels
enhancement New feature or request

Comments

@AdySnowflake
Copy link
Contributor

Is your feature request related to a problem? / 你想要的功能和什么问题相关?

我的平台是Windows x64
当我参考readme中的命令进行构建时:

Build

Build for your current platform:

npm run electron:build

发现他默认构建的是ia32,32位版本。查询资料发现可能是electron框架的默认行为

使用以下命令也无法构建出64位版本:

npm run electron:build --win --x64
npm run electron:build --win --x64 --arm

这两个命令均会指向electron:build,无法构建对应的版本

PS C:\dev\ChatALL> npm run xxxxx

> chatall@1.83.108 xxxxx
> vue-cli-service electron:build

也无法显式传参:--arch=x64
最后查看github-action的配置文件,通过使用

npm run release-windows

构建了Windows上的所有版本,得以解决

PS C:\dev\ChatALL> npm run release-windows

> chatall@1.83.108 release-windows
> vue-cli-service electron:build --win --x64 --arm64

因此希望在package.json文件中新增一些构建命令,能够实现单独在本地构建x64版

Describe the solution you'd like. / 你想要的解决方案是什么?

package.json文件中新增一些构建命令
electron:build --win --x64, electron:build --x64等等
或者在build字段中增加一些限定如arch: x64
感谢~

Describe alternatives you've considered. / 你考虑过的其他方案是什么?

No response

Additional context / 其他信息

No response

@AdySnowflake AdySnowflake added the enhancement New feature or request label Mar 7, 2025
@AdySnowflake
Copy link
Contributor Author

我发现这个默认行为好像是因为vue.config.js中限定是ia32,https://github.com/ai-shifu/ChatALL/blob/main/vue.config.js#L29
晚点我修改以后再重新构建看看

@AdySnowflake
Copy link
Contributor Author

AdySnowflake commented Mar 7, 2025

我发现这个默认行为好像是因为vue.config.js中限定是ia32,https://github.com/ai-shifu/ChatALL/blob/main/vue.config.js#L29 晚点我修改以后再重新构建看看

我fork了这个项目并将ia32修改为了x64进行测试,发现本地构建默认是64位版本了🥰
原本是arch=ia32

PS C:\dev\ChatALL> npm install

……

> chatall@1.83.108 postinstall
> electron-builder install-app-deps

  • electron-builder  version=25.1.8
  • executing @electron/rebuild  electronVersion=33.4.2 arch=x64 buildFromSource=false appDir=./
  • installing native dependencies  arch=x64
  • completed installing native dependencies

> chatall@1.83.108 prepare
> husky install

husky - Git hooks installed

added 2035 packages, and audited 2036 packages in 8m

……

PS C:\dev\ChatALL> npm run electron:build

> chatall@1.83.108 electron:build
> vue-cli-service electron:build

……

 INFO  Building app with electron-builder:
  • electron-builder  version=25.1.8 os=10.0.20348
  • writing effective config  file=dist_electron\builder-effective-config.yaml
  • executing @electron/rebuild  electronVersion=33.4.2 arch=x64 buildFromSource=false appDir=dist_electron\bundled
  • installing native dependencies  arch=x64
  • completed installing native dependencies
  • packaging       platform=win32 arch=x64 electron=33.4.2 appOutDir=dist_electron\win-unpacked
  • updating asar integrity executable resource  executablePath=dist_electron\win-unpacked\ChatALL.exe
  • signing with signtool.exe  path=dist_electron\win-unpacked\ChatALL.exe
  • no signing info identified, signing is skipped  signHook=false cscInfo=null
  • building        target=nsis file=dist_electron\ChatALL-1.83.108-win-x64.exe archs=x64 oneClick=false perMachine=false
  • signing with signtool.exe  path=dist_electron\win-unpacked\resources\elevate.exe
  • no signing info identified, signing is skipped  signHook=false cscInfo=null

……

#987

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

Successfully merging a pull request may close this issue.

1 participant