NSISをインストールするといくつかのサンプルスクリプトも一緒にインストールされますが、今回僕が参考にしたのは、${NSIS}\Examples\Modern UI\MultiLanguage.nsi です。
なお、このまま使うとWindows2000では問題ないのですが、Windows98等で日本語UIが文字化けしてしまいます。
これは途中でincludeしている ${NSISDIR}\Contrib\Modern UI\System.nsh で MS Shell Dlg等のWindows98系では日本語が表示できないフォントを指定している部分があるからです。
ちなみにこれらのフォントWindows2000では日本語表示できるけど、実際にはレジストリ上で他のフォントをマッピングしているのだそうで...(そんなことできるのね)
では、どうすればよいかというと、そのままですが、${NSISDIR}\Contrib\Modern UI\System.nsh をちょっと修正します。
私はどうやったのか、を書いておきます。
-------- !ifndef MUI_FONT ; !define MUI_FONT "MS Shell Dlg" !define MUI_FONT "MS UI Gothic" !endif -------- -------- !ifndef MUI_FONT_HEADER ; !define MUI_FONT_HEADER "MS Sans Serif" !define MUI_FONT_HEADER "MS UI Gothic" !endif -------- -------- !ifndef MUI_FONT_TITLE ; !define MUI_FONT_TITLE "Verdana" !define MUI_FONT_TITLE "MS UI Gothic" !endif --------以上のように2つの部分のフォント名をMS UI Gothicに直してしまいます。
1: ;jpg_sz 2: 3: !define MUI_PRODUCT "jpg_sz" 4: !define MUI_VERSION "1.11" 5: 6: !include "${NSISDIR}\Contrib\Modern UI\System.nsh" 7: 8: ;------------------------- 9: ;Configuration 10: 11: !define MUI_COMPONENTSPAGE 12: !define MUI_DIRECTORYPAGE 13: 14: !define MUI_ABORTWARNING 15: 16: !define MUI_UNINSTALLER 17: !define MUI_UNCONFIRMPAGE 18: 19: ;Language 20: !insertmacro MUI_LANGUAGE "English" 21: !insertmacro MUI_LANGUAGE "Japanese" 22: 23: ;General 24: OutFile "jpg_sz_installer.exe" 25: 26: ;Descriptions 27: LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the jpg_sz application to your local folder." 28: LangString DESC_SecCopyUI ${LANG_JAPANESE} "jpg_szアプリケーションをローカルフォルダにコピーします。" 29: 30: LangString DESC_DesktopIcon ${LANG_ENGLISH} "Create a shortcut to your desktop." 31: LangString DESC_DesktopIcon ${LANG_JAPANESE} "デスクトップにショートカットを作ります。" 32: 33: ;Folder-selection page 34: InstallDir "$PROGRAMFILES\${MUI_PRODUCT}" 35: 36: 37: ;------------------------- 38: ;Modern UI System 39: 40: !insertmacro MUI_SYSTEM 41: 42: ;------------------------- 43: ;Installer Sections 44: 45: Section "jpg_sz" SecCopyUI 46: 47: ;Install Files 48: SetOutPath "$INSTDIR" 49: File C:\users\futot\Delphi\jpg_sz\jpg_sz.exe 50: File C:\users\futot\Delphi\jpg_sz\python20.dll 51: File C:\users\futot\Delphi\jpg_sz\jpg_sz.JPN 52: 53: SetOutPath "$INSTDIR\Python" 54: File C:\users\futot\Delphi\jpg_sz\Python\LICENSE.txt 55: File C:\users\futot\Delphi\jpg_sz\Python\jpg_sz.py 56: File C:\users\futot\Delphi\jpg_sz\Python\jpg_sz.pyc 57: 58: SetOutPath "$INSTDIR\Python\Lib" 59: File C:\users\futot\Delphi\jpg_sz\Python\Lib\aifc.pyc 60: File C:\users\futot\Delphi\jpg_sz\Python\Lib\anydbm.pyc 61: File C:\users\futot\Delphi\jpg_sz\Python\Lib\asynchat.pyc 62: File C:\users\futot\Delphi\jpg_sz\Python\Lib\asyncore.pyc 63: File C:\users\futot\Delphi\jpg_sz\Python\Lib\atexit.pyc 64: File C:\users\futot\Delphi\jpg_sz\Python\Lib\audiodev.pyc 65: File C:\users\futot\Delphi\jpg_sz\Python\Lib\base64.pyc 66: File C:\users\futot\Delphi\jpg_sz\Python\Lib\BaseHTTPServer.pyc 67: File C:\users\futot\Delphi\jpg_sz\Python\Lib\Bastion.pyc 68: File C:\users\futot\Delphi\jpg_sz\Python\Lib\bdb.pyc 69: File C:\users\futot\Delphi\jpg_sz\Python\Lib\binhex.pyc 70: File C:\users\futot\Delphi\jpg_sz\Python\Lib\bisect.pyc 71: File C:\users\futot\Delphi\jpg_sz\Python\Lib\calendar.pyc 72: File C:\users\futot\Delphi\jpg_sz\Python\Lib\cgi.pyc 73: File C:\users\futot\Delphi\jpg_sz\Python\Lib\CGIHTTPServer.pyc 74: File C:\users\futot\Delphi\jpg_sz\Python\Lib\chunk.pyc 75: File C:\users\futot\Delphi\jpg_sz\Python\Lib\cmd.pyc 76: File C:\users\futot\Delphi\jpg_sz\Python\Lib\code.pyc 77: File C:\users\futot\Delphi\jpg_sz\Python\Lib\codecs.pyc 78: File C:\users\futot\Delphi\jpg_sz\Python\Lib\codeop.pyc 79: File C:\users\futot\Delphi\jpg_sz\Python\Lib\colorsys.pyc 80: File C:\users\futot\Delphi\jpg_sz\Python\Lib\commands.pyc 81: File C:\users\futot\Delphi\jpg_sz\Python\Lib\compileall.pyc 82: File C:\users\futot\Delphi\jpg_sz\Python\Lib\ConfigParser.pyc 83: File C:\users\futot\Delphi\jpg_sz\Python\Lib\Cookie.pyc 84: File C:\users\futot\Delphi\jpg_sz\Python\Lib\copy.pyc 85: File C:\users\futot\Delphi\jpg_sz\Python\Lib\copy_reg.pyc 86: File C:\users\futot\Delphi\jpg_sz\Python\Lib\dbhash.pyc 87: File C:\users\futot\Delphi\jpg_sz\Python\Lib\dircache.pyc 88: File C:\users\futot\Delphi\jpg_sz\Python\Lib\dis.pyc 89: File C:\users\futot\Delphi\jpg_sz\Python\Lib\dospath.pyc 90: File C:\users\futot\Delphi\jpg_sz\Python\Lib\dumbdbm.pyc 91: File C:\users\futot\Delphi\jpg_sz\Python\Lib\filecmp.pyc 92: File C:\users\futot\Delphi\jpg_sz\Python\Lib\fileinput.pyc 93: File C:\users\futot\Delphi\jpg_sz\Python\Lib\fnmatch.pyc 94: File C:\users\futot\Delphi\jpg_sz\Python\Lib\formatter.pyc 95: File C:\users\futot\Delphi\jpg_sz\Python\Lib\fpformat.pyc 96: File C:\users\futot\Delphi\jpg_sz\Python\Lib\ftplib.pyc 97: File C:\users\futot\Delphi\jpg_sz\Python\Lib\getopt.pyc 98: File C:\users\futot\Delphi\jpg_sz\Python\Lib\getpass.pyc 99: File C:\users\futot\Delphi\jpg_sz\Python\Lib\gettext.pyc 100: File C:\users\futot\Delphi\jpg_sz\Python\Lib\glob.pyc 101: File C:\users\futot\Delphi\jpg_sz\Python\Lib\gopherlib.pyc 102: File C:\users\futot\Delphi\jpg_sz\Python\Lib\gzip.pyc 103: File C:\users\futot\Delphi\jpg_sz\Python\Lib\htmlentitydefs.pyc 104: File C:\users\futot\Delphi\jpg_sz\Python\Lib\htmllib.pyc 105: File C:\users\futot\Delphi\jpg_sz\Python\Lib\httplib.pyc 106: File C:\users\futot\Delphi\jpg_sz\Python\Lib\ihooks.pyc 107: File C:\users\futot\Delphi\jpg_sz\Python\Lib\imaplib.pyc 108: File C:\users\futot\Delphi\jpg_sz\Python\Lib\imghdr.pyc 109: File C:\users\futot\Delphi\jpg_sz\Python\Lib\imputil.pyc 110: File C:\users\futot\Delphi\jpg_sz\Python\Lib\keyword.pyc 111: File C:\users\futot\Delphi\jpg_sz\Python\Lib\knee.pyc 112: File C:\users\futot\Delphi\jpg_sz\Python\Lib\linecache.pyc 113: File C:\users\futot\Delphi\jpg_sz\Python\Lib\locale.pyc 114: File C:\users\futot\Delphi\jpg_sz\Python\Lib\macpath.pyc 115: File C:\users\futot\Delphi\jpg_sz\Python\Lib\macurl2path.pyc 116: File C:\users\futot\Delphi\jpg_sz\Python\Lib\mailbox.pyc 117: File C:\users\futot\Delphi\jpg_sz\Python\Lib\mailcap.pyc 118: File C:\users\futot\Delphi\jpg_sz\Python\Lib\mhlib.pyc 119: File C:\users\futot\Delphi\jpg_sz\Python\Lib\mimetools.pyc 120: File C:\users\futot\Delphi\jpg_sz\Python\Lib\mimetypes.pyc 121: File C:\users\futot\Delphi\jpg_sz\Python\Lib\MimeWriter.pyc 122: File C:\users\futot\Delphi\jpg_sz\Python\Lib\mimify.pyc 123: File C:\users\futot\Delphi\jpg_sz\Python\Lib\multifile.pyc 124: File C:\users\futot\Delphi\jpg_sz\Python\Lib\mutex.pyc 125: File C:\users\futot\Delphi\jpg_sz\Python\Lib\netrc.pyc 126: File C:\users\futot\Delphi\jpg_sz\Python\Lib\nntplib.pyc 127: File C:\users\futot\Delphi\jpg_sz\Python\Lib\ntpath.pyc 128: File C:\users\futot\Delphi\jpg_sz\Python\Lib\nturl2path.pyc 129: File C:\users\futot\Delphi\jpg_sz\Python\Lib\os.pyc 130: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pdb.pyc 131: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pickle.pyc 132: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pipes.pyc 133: File C:\users\futot\Delphi\jpg_sz\Python\Lib\popen2.pyc 134: File C:\users\futot\Delphi\jpg_sz\Python\Lib\poplib.pyc 135: File C:\users\futot\Delphi\jpg_sz\Python\Lib\posixfile.pyc 136: File C:\users\futot\Delphi\jpg_sz\Python\Lib\posixpath.pyc 137: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pprint.pyc 138: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pre.pyc 139: File C:\users\futot\Delphi\jpg_sz\Python\Lib\profile.pyc 140: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pstats.pyc 141: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pty.pyc 142: File C:\users\futot\Delphi\jpg_sz\Python\Lib\pyclbr.pyc 143: File C:\users\futot\Delphi\jpg_sz\Python\Lib\py_compile.pyc 144: File C:\users\futot\Delphi\jpg_sz\Python\Lib\Queue.pyc 145: File C:\users\futot\Delphi\jpg_sz\Python\Lib\quopri.pyc 146: File C:\users\futot\Delphi\jpg_sz\Python\Lib\random.pyc 147: File C:\users\futot\Delphi\jpg_sz\Python\Lib\re.pyc 148: File C:\users\futot\Delphi\jpg_sz\Python\Lib\reconvert.pyc 149: File C:\users\futot\Delphi\jpg_sz\Python\Lib\regex_syntax.pyc 150: File C:\users\futot\Delphi\jpg_sz\Python\Lib\regsub.pyc 151: File C:\users\futot\Delphi\jpg_sz\Python\Lib\repr.pyc 152: File C:\users\futot\Delphi\jpg_sz\Python\Lib\rexec.pyc 153: File C:\users\futot\Delphi\jpg_sz\Python\Lib\rfc822.pyc 154: File C:\users\futot\Delphi\jpg_sz\Python\Lib\rlcompleter.pyc 155: File C:\users\futot\Delphi\jpg_sz\Python\Lib\robotparser.pyc 156: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sched.pyc 157: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sgmllib.pyc 158: File C:\users\futot\Delphi\jpg_sz\Python\Lib\shelve.pyc 159: File C:\users\futot\Delphi\jpg_sz\Python\Lib\shlex.pyc 160: File C:\users\futot\Delphi\jpg_sz\Python\Lib\shutil.pyc 161: File C:\users\futot\Delphi\jpg_sz\Python\Lib\SimpleHTTPServer.pyc 162: File C:\users\futot\Delphi\jpg_sz\Python\Lib\site.pyc 163: File C:\users\futot\Delphi\jpg_sz\Python\Lib\smtplib.pyc 164: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sndhdr.pyc 165: File C:\users\futot\Delphi\jpg_sz\Python\Lib\socket.pyc 166: File C:\users\futot\Delphi\jpg_sz\Python\Lib\SocketServer.pyc 167: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sre.pyc 168: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sre_compile.pyc 169: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sre_constants.pyc 170: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sre_parse.pyc 171: File C:\users\futot\Delphi\jpg_sz\Python\Lib\stat.pyc 172: File C:\users\futot\Delphi\jpg_sz\Python\Lib\statcache.pyc 173: File C:\users\futot\Delphi\jpg_sz\Python\Lib\statvfs.pyc 174: File C:\users\futot\Delphi\jpg_sz\Python\Lib\string.pyc 175: File C:\users\futot\Delphi\jpg_sz\Python\Lib\StringIO.pyc 176: File C:\users\futot\Delphi\jpg_sz\Python\Lib\stringold.pyc 177: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sunau.pyc 178: File C:\users\futot\Delphi\jpg_sz\Python\Lib\sunaudio.pyc 179: File C:\users\futot\Delphi\jpg_sz\Python\Lib\symbol.pyc 180: File C:\users\futot\Delphi\jpg_sz\Python\Lib\tabnanny.pyc 181: File C:\users\futot\Delphi\jpg_sz\Python\Lib\telnetlib.pyc 182: File C:\users\futot\Delphi\jpg_sz\Python\Lib\tempfile.pyc 183: File C:\users\futot\Delphi\jpg_sz\Python\Lib\threading.pyc 184: File C:\users\futot\Delphi\jpg_sz\Python\Lib\toaiff.pyc 185: File C:\users\futot\Delphi\jpg_sz\Python\Lib\token.pyc 186: File C:\users\futot\Delphi\jpg_sz\Python\Lib\tokenize.pyc 187: File C:\users\futot\Delphi\jpg_sz\Python\Lib\traceback.pyc 188: File C:\users\futot\Delphi\jpg_sz\Python\Lib\tty.pyc 189: File C:\users\futot\Delphi\jpg_sz\Python\Lib\types.pyc 190: File C:\users\futot\Delphi\jpg_sz\Python\Lib\tzparse.pyc 191: File C:\users\futot\Delphi\jpg_sz\Python\Lib\urllib.pyc 192: File C:\users\futot\Delphi\jpg_sz\Python\Lib\urllib2.pyc 193: File C:\users\futot\Delphi\jpg_sz\Python\Lib\urlparse.pyc 194: File C:\users\futot\Delphi\jpg_sz\Python\Lib\user.pyc 195: File C:\users\futot\Delphi\jpg_sz\Python\Lib\UserDict.pyc 196: File C:\users\futot\Delphi\jpg_sz\Python\Lib\UserList.pyc 197: File C:\users\futot\Delphi\jpg_sz\Python\Lib\UserString.pyc 198: File C:\users\futot\Delphi\jpg_sz\Python\Lib\uu.pyc 199: File C:\users\futot\Delphi\jpg_sz\Python\Lib\wave.pyc 200: File C:\users\futot\Delphi\jpg_sz\Python\Lib\webbrowser.pyc 201: File C:\users\futot\Delphi\jpg_sz\Python\Lib\whichdb.pyc 202: File C:\users\futot\Delphi\jpg_sz\Python\Lib\whrandom.pyc 203: File C:\users\futot\Delphi\jpg_sz\Python\Lib\xdrlib.pyc 204: File C:\users\futot\Delphi\jpg_sz\Python\Lib\xmllib.pyc 205: File C:\users\futot\Delphi\jpg_sz\Python\Lib\zipfile.pyc 206: 207: ;Create uninstaller 208: WriteUninstaller "$INSTDIR\UNINSTALL.exe" 209: 210: SectionEnd 211: 212: ;------------------------- 213: ; Section for Create shortcut on Desktop 214: 215: Section "shortcut" DesktopIcon 216: CreateShortCut "$DESKTOP\jpg_sz.lnk" "$INSTDIR\jpg_sz.exe" "" 217: SectionEnd 218: 219: ;Display the Finish header 220: !insertmacro MUI_SECTIONS_FINISHHEADER 221: 222: ;------------------------- 223: ;Installer Functions 224: 225: Function .onInit 226: 227: ;Language selection 228: 229: ;Languages 230: !insertmacro MUI_LANGDLL_PUSH "English" 231: !insertmacro MUI_LANGDLL_PUSH "Japanese" 232: 233: Push 2F 234: 235: LangDLL::LangDialog "Installer Language" "Please select a Language" 236: 237: Pop $LANGUAGE 238: StrCmp $LANGUAGE "cancel" 0 +2 239: Abort 240: 241: FunctionEnd 242: 243: ;------------------------- 244: ;Descriptions 245: !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN 246: !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI) 247: !insertmacro MUI_DESCRIPTION_TEXT ${DesktopIcon} $(DESC_DesktopIcon) 248: !insertmacro MUI_FUNCTIONS_DESCRIPTION_END 249: 250: ;------------------------- 251: ;Uninstaller Section 252: 253: Section "Uninstall" 254: 255: ;Uninstall Files 256: Delete "$INSTDIR\jpg_sz.exe" 257: Delete "$INSTDIR\python20.dll" 258: Delete "$INSTDIR\jpg_sz.JPN" 259: 260: Delete "$INSTDIR\Python\LICENSE.txt" 261: Delete "$INSTDIR\Python\jpg_sz.py" 262: Delete "$INSTDIR\Python\jpg_sz.pyc" 263: 264: Delete "$INSTDIR\Python\Lib\aifc.pyc" 265: Delete "$INSTDIR\Python\Lib\anydbm.pyc" 266: Delete "$INSTDIR\Python\Lib\asynchat.pyc" 267: Delete "$INSTDIR\Python\Lib\asyncore.pyc" 268: Delete "$INSTDIR\Python\Lib\atexit.pyc" 269: Delete "$INSTDIR\Python\Lib\audiodev.pyc" 270: Delete "$INSTDIR\Python\Lib\base64.pyc" 271: Delete "$INSTDIR\Python\Lib\BaseHTTPServer.pyc" 272: Delete "$INSTDIR\Python\Lib\Bastion.pyc" 273: Delete "$INSTDIR\Python\Lib\bdb.pyc" 274: Delete "$INSTDIR\Python\Lib\binhex.pyc" 275: Delete "$INSTDIR\Python\Lib\bisect.pyc" 276: Delete "$INSTDIR\Python\Lib\calendar.pyc" 277: Delete "$INSTDIR\Python\Lib\cgi.pyc" 278: Delete "$INSTDIR\Python\Lib\CGIHTTPServer.pyc" 279: Delete "$INSTDIR\Python\Lib\chunk.pyc" 280: Delete "$INSTDIR\Python\Lib\cmd.pyc" 281: Delete "$INSTDIR\Python\Lib\code.pyc" 282: Delete "$INSTDIR\Python\Lib\codecs.pyc" 283: Delete "$INSTDIR\Python\Lib\codeop.pyc" 284: Delete "$INSTDIR\Python\Lib\colorsys.pyc" 285: Delete "$INSTDIR\Python\Lib\commands.pyc" 286: Delete "$INSTDIR\Python\Lib\compileall.pyc" 287: Delete "$INSTDIR\Python\Lib\ConfigParser.pyc" 288: Delete "$INSTDIR\Python\Lib\Cookie.pyc" 289: Delete "$INSTDIR\Python\Lib\copy.pyc" 290: Delete "$INSTDIR\Python\Lib\copy_reg.pyc" 291: Delete "$INSTDIR\Python\Lib\dbhash.pyc" 292: Delete "$INSTDIR\Python\Lib\dircache.pyc" 293: Delete "$INSTDIR\Python\Lib\dis.pyc" 294: Delete "$INSTDIR\Python\Lib\dospath.pyc" 295: Delete "$INSTDIR\Python\Lib\dumbdbm.pyc" 296: Delete "$INSTDIR\Python\Lib\filecmp.pyc" 297: Delete "$INSTDIR\Python\Lib\fileinput.pyc" 298: Delete "$INSTDIR\Python\Lib\fnmatch.pyc" 299: Delete "$INSTDIR\Python\Lib\formatter.pyc" 300: Delete "$INSTDIR\Python\Lib\fpformat.pyc" 301: Delete "$INSTDIR\Python\Lib\ftplib.pyc" 302: Delete "$INSTDIR\Python\Lib\getopt.pyc" 303: Delete "$INSTDIR\Python\Lib\getpass.pyc" 304: Delete "$INSTDIR\Python\Lib\gettext.pyc" 305: Delete "$INSTDIR\Python\Lib\glob.pyc" 306: Delete "$INSTDIR\Python\Lib\gopherlib.pyc" 307: Delete "$INSTDIR\Python\Lib\gzip.pyc" 308: Delete "$INSTDIR\Python\Lib\htmlentitydefs.pyc" 309: Delete "$INSTDIR\Python\Lib\htmllib.pyc" 310: Delete "$INSTDIR\Python\Lib\httplib.pyc" 311: Delete "$INSTDIR\Python\Lib\ihooks.pyc" 312: Delete "$INSTDIR\Python\Lib\imaplib.pyc" 313: Delete "$INSTDIR\Python\Lib\imghdr.pyc" 314: Delete "$INSTDIR\Python\Lib\imputil.pyc" 315: Delete "$INSTDIR\Python\Lib\keyword.pyc" 316: Delete "$INSTDIR\Python\Lib\knee.pyc" 317: Delete "$INSTDIR\Python\Lib\linecache.pyc" 318: Delete "$INSTDIR\Python\Lib\locale.pyc" 319: Delete "$INSTDIR\Python\Lib\macpath.pyc" 320: Delete "$INSTDIR\Python\Lib\macurl2path.pyc" 321: Delete "$INSTDIR\Python\Lib\mailbox.pyc" 322: Delete "$INSTDIR\Python\Lib\mailcap.pyc" 323: Delete "$INSTDIR\Python\Lib\mhlib.pyc" 324: Delete "$INSTDIR\Python\Lib\mimetools.pyc" 325: Delete "$INSTDIR\Python\Lib\mimetypes.pyc" 326: Delete "$INSTDIR\Python\Lib\MimeWriter.pyc" 327: Delete "$INSTDIR\Python\Lib\mimify.pyc" 328: Delete "$INSTDIR\Python\Lib\multifile.pyc" 329: Delete "$INSTDIR\Python\Lib\mutex.pyc" 330: Delete "$INSTDIR\Python\Lib\netrc.pyc" 331: Delete "$INSTDIR\Python\Lib\nntplib.pyc" 332: Delete "$INSTDIR\Python\Lib\ntpath.pyc" 333: Delete "$INSTDIR\Python\Lib\nturl2path.pyc" 334: Delete "$INSTDIR\Python\Lib\os.pyc" 335: Delete "$INSTDIR\Python\Lib\pdb.pyc" 336: Delete "$INSTDIR\Python\Lib\pickle.pyc" 337: Delete "$INSTDIR\Python\Lib\pipes.pyc" 338: Delete "$INSTDIR\Python\Lib\popen2.pyc" 339: Delete "$INSTDIR\Python\Lib\poplib.pyc" 340: Delete "$INSTDIR\Python\Lib\posixfile.pyc" 341: Delete "$INSTDIR\Python\Lib\posixpath.pyc" 342: Delete "$INSTDIR\Python\Lib\pprint.pyc" 343: Delete "$INSTDIR\Python\Lib\pre.pyc" 344: Delete "$INSTDIR\Python\Lib\profile.pyc" 345: Delete "$INSTDIR\Python\Lib\pstats.pyc" 346: Delete "$INSTDIR\Python\Lib\pty.pyc" 347: Delete "$INSTDIR\Python\Lib\pyclbr.pyc" 348: Delete "$INSTDIR\Python\Lib\py_compile.pyc" 349: Delete "$INSTDIR\Python\Lib\Queue.pyc" 350: Delete "$INSTDIR\Python\Lib\quopri.pyc" 351: Delete "$INSTDIR\Python\Lib\random.pyc" 352: Delete "$INSTDIR\Python\Lib\re.pyc" 353: Delete "$INSTDIR\Python\Lib\reconvert.pyc" 354: Delete "$INSTDIR\Python\Lib\regex_syntax.pyc" 355: Delete "$INSTDIR\Python\Lib\regsub.pyc" 356: Delete "$INSTDIR\Python\Lib\repr.pyc" 357: Delete "$INSTDIR\Python\Lib\rexec.pyc" 358: Delete "$INSTDIR\Python\Lib\rfc822.pyc" 359: Delete "$INSTDIR\Python\Lib\rlcompleter.pyc" 360: Delete "$INSTDIR\Python\Lib\robotparser.pyc" 361: Delete "$INSTDIR\Python\Lib\sched.pyc" 362: Delete "$INSTDIR\Python\Lib\sgmllib.pyc" 363: Delete "$INSTDIR\Python\Lib\shelve.pyc" 364: Delete "$INSTDIR\Python\Lib\shlex.pyc" 365: Delete "$INSTDIR\Python\Lib\shutil.pyc" 366: Delete "$INSTDIR\Python\Lib\SimpleHTTPServer.pyc" 367: Delete "$INSTDIR\Python\Lib\site.pyc" 368: Delete "$INSTDIR\Python\Lib\smtplib.pyc" 369: Delete "$INSTDIR\Python\Lib\sndhdr.pyc" 370: Delete "$INSTDIR\Python\Lib\socket.pyc" 371: Delete "$INSTDIR\Python\Lib\SocketServer.pyc" 372: Delete "$INSTDIR\Python\Lib\sre.pyc" 373: Delete "$INSTDIR\Python\Lib\sre_compile.pyc" 374: Delete "$INSTDIR\Python\Lib\sre_constants.pyc" 375: Delete "$INSTDIR\Python\Lib\sre_parse.pyc" 376: Delete "$INSTDIR\Python\Lib\stat.pyc" 377: Delete "$INSTDIR\Python\Lib\statcache.pyc" 378: Delete "$INSTDIR\Python\Lib\statvfs.pyc" 379: Delete "$INSTDIR\Python\Lib\string.pyc" 380: Delete "$INSTDIR\Python\Lib\StringIO.pyc" 381: Delete "$INSTDIR\Python\Lib\stringold.pyc" 382: Delete "$INSTDIR\Python\Lib\sunau.pyc" 383: Delete "$INSTDIR\Python\Lib\sunaudio.pyc" 384: Delete "$INSTDIR\Python\Lib\symbol.pyc" 385: Delete "$INSTDIR\Python\Lib\tabnanny.pyc" 386: Delete "$INSTDIR\Python\Lib\telnetlib.pyc" 387: Delete "$INSTDIR\Python\Lib\tempfile.pyc" 388: Delete "$INSTDIR\Python\Lib\threading.pyc" 389: Delete "$INSTDIR\Python\Lib\toaiff.pyc" 390: Delete "$INSTDIR\Python\Lib\token.pyc" 391: Delete "$INSTDIR\Python\Lib\tokenize.pyc" 392: Delete "$INSTDIR\Python\Lib\traceback.pyc" 393: Delete "$INSTDIR\Python\Lib\tty.pyc" 394: Delete "$INSTDIR\Python\Lib\types.pyc" 395: Delete "$INSTDIR\Python\Lib\tzparse.pyc" 396: Delete "$INSTDIR\Python\Lib\urllib.pyc" 397: Delete "$INSTDIR\Python\Lib\urllib2.pyc" 398: Delete "$INSTDIR\Python\Lib\urlparse.pyc" 399: Delete "$INSTDIR\Python\Lib\user.pyc" 400: Delete "$INSTDIR\Python\Lib\UserDict.pyc" 401: Delete "$INSTDIR\Python\Lib\UserList.pyc" 402: Delete "$INSTDIR\Python\Lib\UserString.pyc" 403: Delete "$INSTDIR\Python\Lib\uu.pyc" 404: Delete "$INSTDIR\Python\Lib\wave.pyc" 405: Delete "$INSTDIR\Python\Lib\webbrowser.pyc" 406: Delete "$INSTDIR\Python\Lib\whichdb.pyc" 407: Delete "$INSTDIR\Python\Lib\whrandom.pyc" 408: Delete "$INSTDIR\Python\Lib\xdrlib.pyc" 409: Delete "$INSTDIR\Python\Lib\xmllib.pyc" 410: Delete "$INSTDIR\Python\Lib\zipfile.pyc" 411: 412: Delete "$INSTDIR\Uninstall.exe" 413: 414: Delete "$DESKTOP\jpg_sz.lnk" 415: 416: RMDir "$INSTDIR\Python\Lib" 417: RMDir "$INSTDIR\Python" 418: RMDir "$INSTDIR" 419: 420: ;Display the Finish header 421: !insertmacro MUI_UNFINISHHEADER 422: 423: SectionEnd 424: 425: 426:
3〜4行目 | 製品名およびバージョンの定義 |
6行目 | Moderen UIを使いたいので、それ用のファイルをinclude なお、これは上記のように修正済みのものを指定する |
20〜21行目 | 言語設定。MUI_LANGUAGE マクロは上記includeファイル内で定義されている |
24行目 | インストーラの出力ファイルを指定 |
27〜31行目 | 言語毎に各セクションのDescriptionを設定 |
34行目 | インストール先ディレクトリを設定 |
45〜210行目 | ファイルコピーのセクション。コピー先ディレクトリ毎にファイルを列挙する。 僕はuninstallerも、このセクションに入れてしまいました。 |
215〜217行目 | デスクトップにショートカットを作成するセクション |
225〜241行目 | 起動時の言語選択ダイアログを生成している部分。 |
233行目 | Push 2Fの2は言語数。ここでは英語・日本語なので2。 Fはフォント変更らしいけど、ここではフォントをPushしてないので意味ないかも。 |
253〜423行目 | アンインストーラの設定。削除するファイル・ディレクトリを列挙。 ディレクトリは空でないと削除できないので順番に注意。 |