gpt-4-0314· openai
Suzhen/CodeChat
create an nsis installer code like for minecraft
- User
create an nsis installer code like for minecraft
- Assistant
The following code demonstrates an example of an NSIS installer script for Minecraft. Please note that this is a basic installer script and may need to be adapted to your specific installation requirements.
; Installer script for NSIS (Nullsoft Scriptable Install System) ; Minecraft Installer ; Define constants !define APP_NAME "Minecraft" !define INSTALLER_NAME "minecraft_installer.exe" !define VERSION "1.17" ; Define the default installation directory InstallDir $PROGRAMFILES\${APP_NAME} ; Define the output installer file Outfile ${INSTALLER_NAME} ; Set default compression method SetCompressor lzma ; Default installation section Section "Install" Install ; Set output install path SetOutPath $INSTDIR ; Create a shortcut in the start menu CreateDirectory $SMPROGRAMS\$APP_NAME CreateShortCut "$SMPROGRAMS\$APP_NAME\${APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe" CreateShortCut "$SMPROGRAMS\$APP_NAME\Uninstall.lnk" "$INSTDIR\uninst.exe" ; Show checkboxes during installation !insertmacro MUI_INSTALLOPTIONS_WRITE ; Include the install files File /r "Your\Minecraft\Files\*.*" ; Include the uninstaller WriteUninstaller "$INSTDIR\uninst.exe" ; Write the installed application name and version WriteRegStr HKLM "Software\${APP_NAME}" "Install_Dir" $INSTDIR WriteRegStr HKLM "Software\${APP_NAME}" "Version" ${VERSION} ; Show the finish page !insertmacro MUI_FINISHPAGE_SHOW SectionEnd ; Uninstallation section Section "Uninstall" Uninstall ; Remove installation files and folder RMDir /r $INSTDIR ; Remove the start menu folder RMDir /r $SMPROGRAMS\$APP_NAME ; Remove the registry key DeleteRegKey HKLM "Software\${APP_NAME}" ; End of uninstallation section SectionEnd
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.