# Styrene config file for Zenmap and Ndiff

[bundle]

# Packages to install into the bundle, separated by spaces.
# Pacman will resolve dependencies automatically.
# Substs: {pkg_prefix} for "mingw-w64-x86_64-" or "mingw-w64-i686-".
# The first package is the main one: it provides the default metadata.
packages = {pkg_prefix}python-zenmap {pkg_prefix}python-gobject {pkg_prefix}python {pkg_prefix}gtk3 msys2-runtime

# Reduce some bundling time and size by skipping these prereqs we don't use
assume_installed = {pkg_prefix}ncurses {pkg_prefix}openssl {pkg_prefix}tcl {pkg_prefix}tk

# The first part of generated installer or archive filenames.
# Will be suffixed with the version, an architecture spec
# like "-w64" or "-w32", and the appropriate filename extension.
# Default: the main package's name (with {pkg_prefix} as "").
filename_stub = zenmap

# Display name for the bundle. Spaces are OK.
# The suffix " (w32)" is appended for MINGW32 bundles.
# Default: the filename stub
display_name = Zenmap

# Short human-readable description.
description = Nmap GUI

# Version number for the bundle.
# Default: parsed from the main package's version.
# version =

# URLs that default to the main package's URL metadata.
# url =

# Launchers to install.
# Entries here should name a desktop file,
# or an equivalent section below.
launchers =
	zenmap.desktop

# Additional icons to explicitly convert.
# These will be converted from the bundle's FreeDesktop.org PNG icons.
# They are used in addition to the ones listed in the launchers.
# The conversion only knows about Adwaita & the default hicolor theme.
# The first converted icon will be used for the installer too [VOLATILE]
; icons =

# Surplus files and folders to be deleted.
# Space-separated list of glob patterns rooted in $INSTDIR.

delete = *


# List files and directories you *don't* want to be deleted here.
# If you're cleaning out $PREFIX/bin, you need to keep all the EXEs
# which are called from the postinst.cmd.

nodelete =
    # The postinst scripts that GTK needs, followed by their binaries.
    mingw*/share/glib*/schemas

    #mingw*/bin/gtk-update-icon-cache*.exe
    #usr/bin/mkdir.exe
    #usr/bin/msys-2*.dll
    #usr/share/libalpm

    #var/lib/pacman/local/mingw-w64-*-hicolor-icon-theme-*-*/install

    # Runtime requirements for the demos etc.
    mingw*/etc/gtk-3.0
    # Required DLLs. Checked with:
    # * recursive `dumpbin /imports` on known python/gtk dlls
    # * recursive `dumpbin /imports` on pyd files in lib/python3.14
    # * `g-ir-inspect --print-shlibs` for typelibs listed below
    mingw*/bin/libpython3.*.dll
    mingw*/bin/libatk-1.*.dll
    mingw*/bin/libbrotlicommon.dll
    mingw*/bin/libbrotlidec.dll
    mingw*/bin/libbz2-1.dll
    mingw*/bin/libcairo-2.dll
    mingw*/bin/libcairo-gobject-2.dll
    mingw*/bin/libdatrie-1.dll
    mingw*/bin/libepoxy-0.dll
    mingw*/bin/libexpat-1.dll
    mingw*/bin/libffi-8.dll
    mingw*/bin/libfontconfig-1.dll
    mingw*/bin/libfreetype-6.dll
    mingw*/bin/libfribidi-0.dll
    mingw*/bin/libgcc_s_seh-1.dll
    mingw*/bin/libgdk-3-*.dll
    mingw*/bin/libgdk_pixbuf-2.*.dll
    mingw*/bin/libgio-2.*.dll
    mingw*/bin/libgirepository-2.*.dll
    mingw*/bin/libglib-2.*.dll
    mingw*/bin/libgmodule-2.*.dll
    mingw*/bin/libgobject-2.*.dll
    mingw*/bin/libgraphite2.dll
    mingw*/bin/libgtk-3-*.dll
    mingw*/bin/libharfbuzz-0.dll
    mingw*/bin/libharfbuzz-gobject-0.dll
    mingw*/bin/libiconv-2.dll
    mingw*/bin/libintl-8.dll
    mingw*/bin/libjpeg-8.dll
    mingw*/bin/libpango-1.*.dll
    mingw*/bin/libpangocairo-1.*.dll
    mingw*/bin/libpangoft2-1.*.dll
    mingw*/bin/libpangowin32-1.*.dll
    mingw*/bin/libpcre2-8-*.dll
    mingw*/bin/libpixman-1-*.dll
    mingw*/bin/libpng16-16.dll
    mingw*/bin/libsqlite3-*.dll
    mingw*/bin/libstdc++-6.dll
    mingw*/bin/libthai-0.dll
    mingw*/bin/libtiff-6.dll
    mingw*/bin/libwinpthread-1.dll
    mingw*/bin/zlib1.dll
    mingw*/bin/libdeflate.dll
    mingw*/bin/libLerc.dll
    mingw*/bin/libjbig-0.dll
    mingw*/bin/libbz2-1.dll
    mingw*/bin/liblzma-5.dll
    mingw*/bin/libzstd.dll
    mingw*/bin/libwebp-7.dll
    mingw*/bin/libsharpyuv-0.dll

    mingw*/lib/gtk-3.0
    mingw*/lib/gdk-pixbuf-2.0/*/loaders/libpixbufloader-png.dll
    mingw*/lib/gdk-pixbuf-2.0/*/loaders/libpixbufloader-png.dll.a
    mingw*/lib/gdk-pixbuf-2.0/*/loaders/libpixbufloader-gif.dll
    mingw*/lib/gdk-pixbuf-2.0/*/loaders/libpixbufloader-gif.dll.a


    mingw*/share/icons/hicolor/index.theme

    # python-gobject stuff
    mingw*/lib/girepository-*/Atk-1.0.typelib
    mingw*/lib/girepository-*/GLib-2.0.typelib
    mingw*/lib/girepository-*/GLibWin32-2.0.typelib
    mingw*/lib/girepository-*/GModule-2.0.typelib
    mingw*/lib/girepository-*/GObject-2.0.typelib
    mingw*/lib/girepository-*/Gdk-3.0.typelib
    mingw*/lib/girepository-*/GdkPixbuf-2.0.typelib
    mingw*/lib/girepository-*/GdkWin32-3.0.typelib
    mingw*/lib/girepository-*/Gio-2.0.typelib
    mingw*/lib/girepository-*/GioWin32-2.0.typelib
    mingw*/lib/girepository-*/Gtk-3.0.typelib
    mingw*/lib/girepository-*/HarfBuzz-0.0.typelib
    mingw*/lib/girepository-*/Pango-1.0.typelib
    mingw*/lib/girepository-*/PangoCairo-1.0.typelib
    mingw*/lib/girepository-*/PangoOT-1.0.typelib
    mingw*/lib/girepository-*/cairo-1.0.typelib
    mingw*/lib/girepository-*/freetype2-2.0.typelib

    # To avoid terminal window, use pythonw.exe
    mingw*/bin/pythonw.exe
    # For debugging use python.exe
    mingw*/bin/python.exe
    # Zenmap's files
    mingw*/lib/python3.14/site-packages/zenmapCore
    mingw*/lib/python3.14/site-packages/zenmapGUI
    mingw*/lib/python3.14/site-packages/radialnet

    # The necessary python modules will be added by script

# Local launcher definitions

; You can define new app launchers here, or extend the launchers in
; installed .desktop files by overriding their keys.
;
; All launchers need to be listed in the [bundle]'s "launchers" key.
[zenmap.desktop]
exec = pythonw.exe -c 'from zenmapGUI.App import run; run()'
icon = mingw*/lib/python3.14/site-packages/zenmap/zenmapCore/data/pixmaps/zenmap.png
; For debugging:
;Terminal = true
;exec = python.exe -c 'from zenmapGUI.App import run; run()' -vvvvv
