简体   繁体   English

如何在Windows上打包haskell gtk2hs glade应用程序?

[英]How to package a haskell gtk2hs glade application on windows?

I made a little GUI app with gtk2hs, Glade and Haskell. 我用gtk2hs,Glade和Haskell制作了一个GUI应用程序。 It runs fine on Windows XP, but users need to install GTK+, gtk2hs (it asks for libglade-2.0.0.dll) and GHC (as it's a gtk2hs dependency) in order to run it. 它在Windows XP上运行良好,但用户需要安装GTK +,gtk2hs(它要求libglade-2.0.0.dll)和GHC(因为它是gtk2hs依赖)才能运行它。

I'm a Windows n00b myself, but how can I simplify installing my little GUI from a user's perspective? 我自己就是Windows n00b,但是如何从用户的角度简化安装我的小GUI? Is there a way to package it with the needed .dll's? 有没有办法用所需的.dll包装它? And how can I best find out which .dll's will be needed? 我怎样才能最好地找出需要哪些.dll? What's a good practice? 什么是好习惯?

Thanks a lot, Jarra 非常感谢,Jarra

I finally found the answer for my own question. 我终于找到了自己问题的答案。 I used de Inno Setup utility (which you can find here: http://www.jrsoftware.org/isdl.php ) to make a Windows installer. 我使用de Inno Setup实用程序(可在此处找到: http//www.jrsoftware.org/isdl.php )来制作Windows安装程序。 For a GTK / Glade / Gtk2hs application called Crosschecker I used this confiuration: 对于名为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"

Most of the .dll's come from GTK, a few from the gtk2hs package... I copied all .dll's to a lib directory, so that's where the Inno Setup config looks at. 大多数.dll来自GTK,一些来自gtk2hs包...我将所有.dll复制到一个lib目录,这就是Inno Setup配置所看到的。

HTH, HTH,

Jarra Jarra

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM