Skip to content

Commit

Permalink
remove adwaita_icon_theme_jll dep
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 committed Jan 12, 2024
1 parent 881fdce commit 40bdf26
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[adwaita_icon_theme]
git-tree-sha1 = "043d0732f572e66059278f5964e3752f018a5cdf"

[[adwaita_icon_theme.download]]
sha256 = "19b4b36662b2894c2eb2dd348438656df91a2402b5de6e83a0523d53ff6ced64"
url = "https://github.com/medyan-dev/SmallZarrGroups.jl/releases/download/v0.6.6/copy_symlinks_adwaita_icon_theme.v3.33.92.any.tar.gz"
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Scratch = "6c6a2e73-6563-6170-7368-637461726353"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Xorg_xkeyboard_config_jll = "33bec58e-1273-512f-9401-5d533626f822"
adwaita_icon_theme_jll = "b437f822-2cd6-5e08-a15c-8bac984d38ee"
gdk_pixbuf_jll = "da03df04-f53b-5353-a52f-6a8b0620ced0"
hicolor_icon_theme_jll = "059c91fe-1bad-52ad-bddd-f7b78713c282"

Expand All @@ -32,7 +31,6 @@ JLLWrappers = "1.4.0"
Reexport = "0.2, 1.0"
Scratch = "1"
Xorg_xkeyboard_config_jll = "2.27.0"
adwaita_icon_theme_jll = "3.33.92"
gdk_pixbuf_jll = "2.38.2"
hicolor_icon_theme_jll = "0.17.0"
julia = "1.6"
Expand Down
26 changes: 24 additions & 2 deletions src/Gtk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optle
end

# Import binary definitions
using GTK3_jll, Glib_jll, Xorg_xkeyboard_config_jll, gdk_pixbuf_jll, adwaita_icon_theme_jll, hicolor_icon_theme_jll
using GTK3_jll, Glib_jll, Xorg_xkeyboard_config_jll, gdk_pixbuf_jll, hicolor_icon_theme_jll
using Librsvg_jll
using JLLWrappers
using Pkg.Artifacts, Scratch
Expand Down Expand Up @@ -76,12 +76,34 @@ include("theme.jl")
include("gio.jl")
include("application.jl")

#=
# This script was how the new adwaita_icon_theme artifact was generated.
using Tar
using Pkg.Artifacts
using Pkg: Pkg, PlatformEngines
# This is the url that the source artifact will be available from:
url_src = "https://github.com/JuliaBinaryWrappers/adwaita_icon_theme_jll.jl/releases/download/adwaita_icon_theme-v3.33.92+4/adwaita_icon_theme.v3.33.92.any.tar.gz"
# This is the url that the new artifact will be available from:
url_to_upload_to = "https://github.com/medyan-dev/SmallZarrGroups.jl/releases/download/v0.6.6/copy_symlinks_adwaita_icon_theme.v3.33.92.any.tar.gz"
# This is the path to the Artifacts.toml we will manipulate
artifact_toml = "Artifacts.toml"
hash = create_artifact() do dir
Tar.extract(`$(PlatformEngines.exe7z()) x $(download(url_src)) -so`, dir;
copy_symlinks=true
)
end
tar_hash = archive_artifact(hash, "copy_symlinks_adwaita_icon_theme.v3.33.92.any.tar.gz")
bind_artifact!(artifact_toml, "adwaita_icon_theme", hash; force=true,
download_info = [(url_to_upload_to, tar_hash)]
)
=#

function __init__()
in(:Gtk4, names(Main, imported=true)) && error("Gtk is incompatible with Gtk4.")

# Set XDG_DATA_DIRS so that Gtk can find its icons and schemas
ENV["XDG_DATA_DIRS"] = join(filter(x -> x !== nothing, [
dirname(adwaita_icons_dir),
joinpath(artifact"adwaita_icon_theme", "share"),
dirname(hicolor_icons_dir),
joinpath(dirname(GTK3_jll.libgdk3_path::String), "..", "share"),
get(ENV, "XDG_DATA_DIRS", nothing)::Union{String,Nothing},
Expand Down

0 comments on commit 40bdf26

Please sign in to comment.