tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[feat] Can provide an "afterBundleCommand" hook function?

Open muwoo opened this issue 9 months ago • 4 comments

Describe the problem

Sometimes, I need to run some custom scripts after building the installer application ({appname}-setup.exe) and before generating the update package(such as setup.nsis.zip or setup.nsis.zip.sign).

This is because I need to manually sign the {appname}-setup.exe file, and without this afterBundleCommand hook, I won't be able to complete this before generating the update package.

Describe the solution you'd like

Can you provide a hook "afterBundleCommand" to execute after the installer application is generated?

Alternatively, are there any alternative solutions?

Thanks alot!

Additional context

No response

muwoo avatar May 13 '24 10:05 muwoo

how and why do you need to manually sign installer? if you have setup the signing configurations correctly, we sign the installer for you.

amrbashir avatar May 13 '24 15:05 amrbashir

@amrbashir Thank you very much for your reply!

I configured it correctly, and I see that tauri will sign the packaged exe application, but I still need to sign the generated NSIS setup.exe installation package.

But I'm not sure if Tauri will continue to sign this setup.exe. If it can be signed, then I don't need this requirement, if not, then I want to be able to customize the script to continue signing setup.exe after the bundle produces setup.exe.

muwoo avatar May 13 '24 16:05 muwoo

It does sign the -setup.exe file, can you show the ouput of tauiri build --verbose

amrbashir avatar May 13 '24 16:05 amrbashir

It does sign the -setup.exe file, can you show the ouput of tauiri build --verbose

I know, thank you very much for your reply, but I still wish Tauri could add more hooks to the build process, similar to Electron, so the developer's freedom would be much better. For example, in electron-builder, we can set these hooks:

beforePack
afterPack
afterSign
afterAllArtifactBuild
onNodeModuleFile
AfterPackContext
BuildResult

muwoo avatar May 13 '24 16:05 muwoo