#Trying Install Github Cli dependencies

9 messages · Page 1 of 1 (latest)

proud ermine
#

I am trying to do Github respo management app, which require github cli install, rather than having the user manually install the github cli by themselves, what if i can do it for them ?

My first method thinking why not use Winget to install github cli , i can use shell to command to winget install github-cli but i realize not all window computer has winget install, only window 11 has it pre install and then i have to think about how to download winget

My second method, is it possible to bundle winget and github cli with the installer? Just like some game installer will bundle directX to the installer

Or there are other methods?

any advise will be appreciated
cheers

feral rune
#

You could download and install the github cli for the operating system during your installer or at runtime. Github offers all releases as direct download https://github.com/cli/cli#installation - this would only be feasible if you are fine with your users interacting with the installer or you figuring out how to install silently. Bundling with the installer or as a sidecar (sidecar https://v2.tauri.app/develop/sidecar/) would also be okay but since your are targeting developers why not ask them to install it themselves first?

proud ermine
#

thank you for reply,
unfortunately, i am not targeting developer , yes i could ask them to download it
nevertheless, i am interest on bundling with the installer
I read https://tauri.app/v1/guides/building/windows#webview2-installation-options
I saw WiX installer , so WiX installer (https://wixtoolset.org/docs/intro/) can bundle the all installer together right ?
I also saw WebView2 and NSIS Installer , what window installer do u recommand?

meanwhile, sidecar i have very little understand about it, i google about it, so it is a app running beside an app, i guess, i assuming you can run some bash command beside my app??? i guess
i am self taught web dev , if i misunderstood it, i apologies,

feral rune
#

Do you build your app for windows only?

proud ermine
#

no actually, you have rise another concern, linux and mac does not have intaller like window do

feral rune
#

I think the simplest solution where you do not install the github cli for the user and have it only as a file in your application folder would be using the sidecar https://tauri.app/v1/guides/building/sidecar. I would make it part of your build process to download the latest github cli release (https://github.com/cli/cli/releases) for the operating systems you are going to support. And then use this binary as a sidecar of your application.

#

You just need to make sure to only bundle the right binary instead of all possible ones (for example when you build for windows you should only bundle the windows amd64 or windows arm64 ) depending on the target you are compiling your tauri app for.

#

A binary with the same name and a -$TARGET_TRIPLE suffix must exist on the specified path. For instance, "externalBin": ["binaries/my-sidecar"] requires a src-tauri/binaries/my-sidecar-x86_64-unknown-linux-gnu executable on Linux.