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

发布于 2024-10-21 05:58:34 字数 263 浏览 3 评论 0原文

我用 gtk2hs、Glade 和 Haskell 制作了一个小型 GUI 应用程序。它在 Windows XP 上运行良好,但用户需要安装 GTK+、gtk2hs(它需要 libglade-2.0.0.dll)和 GHC(因为它是 gtk2hs 依赖项)才能运行它。

我自己就是一名 Windows n00b,但是从用户的角度如何简化我的小 GUI 的安装呢?有没有办法将其与所需的 .dll 一起打包? 我怎样才能最好地找出需要哪些.dll? 什么是好的做法?

多谢, 贾拉

I made a little GUI app with gtk2hs, Glade and Haskell. 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.

I'm a Windows n00b myself, but how can I simplify installing my little GUI from a user's perspective? Is there a way to package it with the needed .dll's?
And how can I best find out which .dll's will be needed?
What's a good practice?

Thanks a lot,
Jarra

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

归属感 2024-10-28 05:58:34

我终于找到了我自己问题的答案。我使用了 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,

贾拉

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.
For a GTK / Glade / Gtk2hs application called Crosschecker I used this confiuration:

; -- 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.

HTH,

Jarra

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文