如何在安装过程中运行依赖的exe安装程序。

huangapple go评论63阅读模式
英文:

How to run a dependency exe installer during setup process

问题

我需要在我的Electron NSIS安装程序中集成Libre Office便携式安装程序,并在Electron应用程序安装过程中运行它。我已经按照建议进行了操作,现在我有这个自定义的NSIS脚本,它将调用便携式安装程序。

!macro customInstall
    Exec '$INSTDIR/dependencies/LibreOfficePortable.exe -Path $INSTDIR'
!macroEnd

我可以构建我的Electron应用程序的NSIS安装程序,但是当我运行它并调用自定义的NSIS脚本时,Libre Office安装失败,因为它会要求我关闭所有已打开的Libre Office实例。有没有办法让它正确安装?

我需要它来运行使用carbone库进行docx转pdf转换的操作。

谢谢。

英文:

I need to integrate Libre Office portable installer inside my electron NSIS setup and run it during the electron app installation process. I've followed thi suggestion and now I have this custom NSIS script that will call the portable instaler.

!macro customInstall
    Exec '$INSTDIR/dependencies/LibreOfficePortable.exe -Path $INSTDIR'
!macroEnd

I'm able to build the NSIS setup for my electron app but when I run it and it will call the custom nsis script, Libre Office will fail to install because it will ask me to close all the instances of Libre Office that are opened. Is there a way to let it installed correctly?

I will need it to run docx to pdf conversion using carbone library for node.js

Thank you.

答案1

得分: 1

来自LibreOffice Portable Support

> LibreOffice Portable无法启动并坚持另一个版本正在运行:
> 在文本编辑器中(如记事本)中打开以下文件:LibreOfficePortable\App\AppInfo\Launcher\LibreOfficePortable.ini 在第一部分“[Launch]”的底部添加以下行:SingleAppInstance=false 保存并关闭文件,程序将加载。

我理解这意味着您必须自己重新编译便携式LibreOffice,但我不确定是否百分之百正确。

英文:

From LibreOffice Portable Support:

> LibreOffice Portable don't start and insists another version is running:
> Open the following file in a text editor (like notepad): LibreOfficePortable\App\AppInfo\Launcher\LibreOfficePortable.ini At the bottom of the first section "[Launch]" add the following line: SingleAppInstance=false save and close the file and the program will load.

I assume this means you have to re-compile the portable Libre Office yourself but I'm not 100% sure.

huangapple
  • 本文由 发表于 2023年7月17日 16:53:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76702847.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定