Skip to content
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

nsis help #8170

Open
ZadgeIsCool opened this issue Apr 10, 2024 · 5 comments
Open

nsis help #8170

ZadgeIsCool opened this issue Apr 10, 2024 · 5 comments

Comments

@ZadgeIsCool
Copy link

i just have a .7z file with some files and i wanna make it exe with nsis the same way electron does it i just dont know how to

@MaximKalinin
Copy link

Do you mean creating NSIS installer without using electron-builder? If that is the case, there's an official website with some examples and tutorials: https://nsis.sourceforge.io/Main_Page.

@ZadgeIsCool
Copy link
Author

ZadgeIsCool commented Apr 18, 2024 via email

@ZadgeIsCool
Copy link
Author

ZadgeIsCool commented Apr 18, 2024 via email

@MaximKalinin
Copy link

i stumbled upon this: https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7z but it seems like its not it since its detected by avast antivirus

Yes, I think this is what electron-builder uses:

return getBinFromUrl("nsis", "3.0.4.1", "VKMiizYdmNdJOWpRGz4trl4lD++BvYP2irAXpMilheUP0pc93iKlWAoP843Vlraj8YG19CVn0j+dCo/hURz9+Q==")
export function getBinFromUrl(name: string, version: string, checksum: string): Promise<string> {
const dirName = `${name}-${version}`
let url: string
if (process.env.ELECTRON_BUILDER_BINARIES_DOWNLOAD_OVERRIDE_URL) {
url = process.env.ELECTRON_BUILDER_BINARIES_DOWNLOAD_OVERRIDE_URL + "/" + dirName + ".7z"
} else {
const baseUrl =
process.env.NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR ||
process.env.npm_config_electron_builder_binaries_mirror ||
process.env.npm_package_config_electron_builder_binaries_mirror ||
process.env.ELECTRON_BUILDER_BINARIES_MIRROR ||
"https://github.com/electron-userland/electron-builder-binaries/releases/download/"
const middleUrl =
process.env.NPM_CONFIG_ELECTRON_BUILDER_BINARIES_CUSTOM_DIR ||
process.env.npm_config_electron_builder_binaries_custom_dir ||
process.env.npm_package_config_electron_builder_binaries_custom_dir ||
process.env.ELECTRON_BUILDER_BINARIES_CUSTOM_DIR ||
dirName
const urlSuffix = dirName + ".7z"
url = `${baseUrl}${middleUrl}/${urlSuffix}`
}
return getBin(dirName, url, checksum)

There's quite a few things going on, the main directory containing the source code seems to be https://github.com/electron-userland/electron-builder/tree/fa6fc16040a93c6ee751a7a27ab6eeb1dbdd31a7/packages/app-builder-lib/src/targets/nsis and the one containing .nsh, .nsi templates is https://github.com/electron-userland/electron-builder/tree/fa6fc16040a93c6ee751a7a27ab6eeb1dbdd31a7/packages/app-builder-lib/templates/nsis.

What I believe can help you is git history: you could go through it searching for commits containing "nsis" or "windows installer". For example, here is the commit containing the early nsis implementation: 1779ac5.

@ZadgeIsCool
Copy link
Author

ZadgeIsCool commented Apr 19, 2024 via email

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

No branches or pull requests

2 participants