我用gtk2hs,Glade和Haskell制作了一个小GUI应用程序。它在Windows XP上运行正常,但用户需要安装GTK +,gtk2hs(它要求libglade-2.0.0.dll)和GHC(因为它是gtk2hs依赖项)才能运行它。
我自己就是Windows n00b,但是如何从用户的角度简化安装我的小GUI?有没有办法用所需的.dll包装它? 我怎样才能最好地找出需要哪些.dll? 什么是好的做法?
非常感谢, Jarra
答案 0 :(得分:6)
我终于找到了自己问题的答案。我使用de Inno Setup实用程序(您可以在这里找到:http://www.jrsoftware.org/isdl.php)来制作Windows安装程序。 对于名为Crosschecker的GTK / Glade / Gtk2hs应用程序,我使用了这个配置:
; -- crosschecker.iss --
; For making the crosschecker installer.
[Setup]
AppName=Crosschecker
AppVersion=0.1
DefaultDirName={pf}\Crosschecker
; Since no icons will be created in "{group}", we don't need the wizard
; to ask for a Start Menu folder name:
DisableProgramGroupPage=yes
UninstallDisplayIcon={app}\crosschecker.exe
OutputDir=userdocs:Inno Setup Examples Output
[Files]
Source: "crosschecker.exe"; DestDir: "{app}"
Source: "window.glade"; DestDir: "{app}"
; GTK+ dependencies
; DLL
Source: "libs\libcairo-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libpangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libtiff3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libpng12-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\intl.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libgmodule-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libgobject-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libgthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libpango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libpangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libpangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libglade-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libatk-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libgio-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "libs\iconv.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "etc\gtk-2.0\gdk-pixbuf.loaders"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion
[Icons]
Name: "{commonprograms}\Crosschecker"; Filename: "{app}\crosschecker.exe"
Name: "{commondesktop}\Crosschecker"; Filename: "{app}\crosschecker.exe"
大多数.dll都来自GTK,一些来自gtk2hs包...我将所有.dll复制到lib目录,这就是Inno Setup配置所在的位置。
HTH,
Jarra