ê°� 화면 vs ê´€ë ¨ 코드 ¶
~cpp ; ì�¸ìŠ¤í†¨ëŸ¬ 프로그램 ì�´ë¦„ Name "Example2" ; ì�¸ìŠ¤í†¨ëŸ¬ í™”ì�¼ ì�´ë¦„ OutFile "example2.exe" ; 기본 ì�¸ìŠ¤í†¨ ë””ë ‰í† ë¦¬ InstallDir $PROGRAMFILES\Example2 ; ë””ë ‰í† ë¦¬ ì²´í�¬ë¥¼ 위한 ë ˆì§€ìŠ¤íŠ¸ë¦¬ ; (ë§Œì�¼ ì�¸ìŠ¤í†¨ì�„ 다시 í• ê²½ìš° ; ì˜ˆì „ì�˜ ë ˆì§€ìŠ¤íŠ¸ë¦¬ë¥¼ ìž�ë�™ìœ¼ë¡œ overwrite í• ê²ƒìž„) InstallDirRegKey HKLM SOFTWARE\NSIS_Example2 "Install_Dir" ; ì�¸ìŠ¤í†¨í™”ë©´ì‹œ 문구들 ComponentText "This will install the less simple example2 on your computer. Select which optional things you want installed." ; The text to prompt the user to enter a directory DirText "Choose a directory to install in to:" ; ì�¸ìŠ¤í†¨ í• Section 들 ê´€ë ¨ Section "Example2 (required)" ; Set output path to the installation directory. SetOutPath $INSTDIR ; ì�¸ìŠ¤í†¨ í• í™”ì�¼ File "C:\winnt\notepad.exe" ; ì�¸ìŠ¤í†¨ë�œ path를 ë ˆì§€ìŠ¤íŠ¸ë¦¬ì—� ì €ìž¥ WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR" ; 윈ë�„우를 위한 Uninstall key를 ë ˆì§€ìŠ¤íŠ¸ë¦¬ì—� ì €ìž¥ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "DisplayName" "NSIS Example2 (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "uninstall.exe" SectionEnd ; optional section Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\Example2" CreateShortCut "$SMPROGRAMS\Example2\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\Example2\Example2 (notepad).lnk" "$INSTDIR\notepad.exe" "" "$INSTDIR\notepad.exe" 0 SectionEnd
~cpp ; ì�¸ìŠ¤í†¨ëŸ¬ 프로그램 ì�´ë¦„ Name "Example2" ; 기본 ì�¸ìŠ¤í†¨ ë””ë ‰í† ë¦¬ InstallDir $PROGRAMFILES\Example2 ; The text to prompt the user to enter a directory DirText "Choose a directory to install in to:"
~cpp ; ì�¸ìŠ¤í†¨ë�œ path를 ë ˆì§€ìŠ¤íŠ¸ë¦¬ì—� ì €ìž¥ WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR" ; 윈ë�„우를 위한 Uninstall key를 ë ˆì§€ìŠ¤íŠ¸ë¦¬ì—� ì €ìž¥ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "DisplayName" "NSIS Example2 (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "uninstall.exe"
~cpp ; ì–¸ì�¸ìŠ¤í†¨ ê´€ë ¨ 처리 UninstallText "This will uninstall example2. Hit next to continue."
~cpp ; ì–¸ì�¸ìŠ¤í†¨ Section Section "Uninstall" ; ë ˆì§€ìŠ¤íŠ¸ë¦¬ 키 ì œê±° DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" DeleteRegKey HKLM SOFTWARE\NSIS_Example2 ; í™”ì�¼ë“¤ ì œê±° Delete $INSTDIR\notepad.exe ; 반드시! unstaller ë�„ ì œê±°í• ê²ƒ. Delete $INSTDIR\uninstall.exe ; shortcut ì�´ 있으면 ì œê±°í• ê²ƒ. Delete "$SMPROGRAMS\Example2\*.*" ; 사용했ë�˜ ë””ë ‰í† ë¦¬ë“¤ ì œê±°. RMDir "$SMPROGRAMS\Example2" RMDir "$INSTDIR" SectionEnd
ì „ì²´ 소스 ¶
~cpp ; example2.nsi ; ; adds uninstall support ; and (optionally) start menu shortcuts. ; ; It will install notepad.exe into a directory that the user selects, ; ; ì�¸ìŠ¤í†¨ëŸ¬ 프로그램 ì�´ë¦„ Name "Example2" ; ì�¸ìŠ¤í†¨ëŸ¬ í™”ì�¼ ì�´ë¦„ OutFile "example2.exe" ; 기본 ì�¸ìŠ¤í†¨ ë””ë ‰í† ë¦¬ InstallDir $PROGRAMFILES\Example2 ; ë””ë ‰í† ë¦¬ ì²´í�¬ë¥¼ 위한 ë ˆì§€ìŠ¤íŠ¸ë¦¬ ; (ë§Œì�¼ ì�¸ìŠ¤í†¨ì�„ 다시 í• ê²½ìš° ; ì˜ˆì „ì�˜ ë ˆì§€ìŠ¤íŠ¸ë¦¬ë¥¼ ìž�ë�™ìœ¼ë¡œ overwrite í• ê²ƒìž„) InstallDirRegKey HKLM SOFTWARE\NSIS_Example2 "Install_Dir" ; ì�¸ìŠ¤í†¨ 문구 ComponentText "This will install the less simple example2 on your computer. Select which optional things you want installed." ; The text to prompt the user to enter a directory DirText "Choose a directory to install in to:" ; The stuff to install Section "Example2 (required)" ; Set output path to the installation directory. SetOutPath $INSTDIR ; ì�¸ìŠ¤í†¨ í• í™”ì�¼ File "C:\winnt\notepad.exe" ; ì�¸ìŠ¤í†¨ë�œ path를 ë ˆì§€ìŠ¤íŠ¸ë¦¬ì—� ì €ìž¥ WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR" ; 윈ë�„우를 위한 Uninstall key를 ë ˆì§€ìŠ¤íŠ¸ë¦¬ì—� ì €ìž¥ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "DisplayName" "NSIS Example2 (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteUninstaller "uninstall.exe" SectionEnd ; optional section Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\Example2" CreateShortCut "$SMPROGRAMS\Example2\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\Example2\Example2 (notepad).lnk" "$INSTDIR\notepad.exe" "" "$INSTDIR\notepad.exe" 0 SectionEnd ; ì–¸ì�¸ìŠ¤í†¨ ê´€ë ¨ 처리 UninstallText "This will uninstall example2. Hit next to continue." ; ì–¸ì�¸ìŠ¤í†¨ Section Section "Uninstall" ; ë ˆì§€ìŠ¤íŠ¸ë¦¬ 키 ì œê±° DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" DeleteRegKey HKLM SOFTWARE\NSIS_Example2 ; í™”ì�¼ë“¤ ì œê±° Delete $INSTDIR\notepad.exe ; 반드시! unstaller ë�„ ì œê±°í• ê²ƒ. Delete $INSTDIR\uninstall.exe ; shortcut ì�´ 있으면 ì œê±°í• ê²ƒ. Delete "$SMPROGRAMS\Example2\*.*" ; 사용했ë�˜ ë””ë ‰í† ë¦¬ë“¤ ì œê±°. RMDir "$SMPROGRAMS\Example2" RMDir "$INSTDIR" SectionEnd ; eof
컴파ì�¼ ê³¼ì • ¶
~cpp ---------- makensis ---------- MakeNSIS v1.95 - Copyright 1999-2001 Nullsoft, Inc. Portions Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler (zlib). Contributors: nnop@newmail.ru, Ryan Geiss, Andras Varga, Drew Davidson, Peter Windridge, Dave Laundon, Robert Rainwater, Yaroslav Faybishenko, et al. Processing config: Processing script file: "example2.nsi" Name: "Example2" OutFile: "example2.exe" InstallDir: "$PROGRAMFILES\Example2" InstallRegKey: "HKLM\SOFTWARE\NSIS_Example2\Install_Dir" ComponentText: "This will install the less simple example2 on your computer. Select which optional things you want installed." "" "" DirText: "Choose a directory to install in to:" "" "" Section: "Example2 (required)" SetOutPath: "$INSTDIR" File: "NOTEPAD.EXE" [compress] 21719/50960 bytes WriteRegStr: HKLM\SOFTWARE\NSIS_Example2\Install_Dir=$INSTDIR WriteRegStr: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2\DisplayName=NSIS Example2 (remove only) WriteRegStr: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2\UninstallString="$INSTDIR\uninstall.exe" WriteUninstaller: "uninstall.exe" SectionEnd Section: "Start Menu Shortcuts" CreateDirectory: "$SMPROGRAMS\Example2" CreateShortCut: "$SMPROGRAMS\Example2\Uninstall.lnk"->"$INSTDIR\uninstall.exe" icon:$INSTDIR\uninstall.exe,0, showmode=0x0, hotkey=0x0 CreateShortCut: "$SMPROGRAMS\Example2\Example2 (notepad).lnk"->"$INSTDIR\notepad.exe" icon:$INSTDIR\notepad.exe,0, showmode=0x0, hotkey=0x0 SectionEnd UninstallText: "This will uninstall example2. Hit next to continue." "" Section: "Uninstall" DeleteRegKey: HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2 DeleteRegKey: HKLM\SOFTWARE\NSIS_Example2 Delete: "$INSTDIR\notepad.exe" Delete: "$INSTDIR\uninstall.exe" Delete: "$SMPROGRAMS\Example2\*.*" RMDir: "$SMPROGRAMS\Example2" RMDir: "$INSTDIR" SectionEnd Processed 1 file, writing output: Output: "F:\NSIS\example2.exe" Install: 2 sections (1 required). Install: 11 instructions (264 bytes), 941 byte string table. Uninstall: 8 instructions (192 bytes), 345 byte string table. EXE header size: 35328 / 35328 bytes Install code+strings: 769 / 1513 bytes Install data: 21723 / 50974 bytes Uninstall code+data+strings: 624 / 1106 bytes CRC (0x7C511ED3): 4 / 4 bytes Total size: 58448 / 88925 bytes (65.7%) Normal Termination















