diff --git a/.gitignore b/.gitignore index ceec9d67..e5e44a2d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ docs/build .DS_Store Manifest.toml MutableArtifacts.toml +*.tar.gz diff --git a/Artifacts.toml b/Artifacts.toml index f893be73..0456419f 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -1,6 +1,143 @@ -[adwaita_icon_theme] +[[adwaita_icon_theme]] +arch = "i686" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "glibc" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "x86_64" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "glibc" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "aarch64" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "glibc" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "armv6l" +call_abi = "eabihf" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "glibc" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "armv7l" +call_abi = "eabihf" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "glibc" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "powerpc64le" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "glibc" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "i686" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "musl" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "x86_64" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "musl" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "aarch64" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "musl" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "armv6l" +call_abi = "eabihf" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "musl" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "armv7l" +call_abi = "eabihf" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +libc = "musl" +os = "linux" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "x86_64" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +os = "macos" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "aarch64" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +os = "macos" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "x86_64" +git-tree-sha1 = "65eca7c48dea1e32203b205613441ce9506045b4" +os = "freebsd" + + [[adwaita_icon_theme.download]] + sha256 = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + url = "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" +[[adwaita_icon_theme]] +arch = "i686" +git-tree-sha1 = "043d0732f572e66059278f5964e3752f018a5cdf" +os = "windows" + + [[adwaita_icon_theme.download]] + sha256 = "b11fe18679624c9db04523f55d085e9de804899a82f4df11ec4f38c217a10e49" + url = "https://github.com/medyan-dev/SmallZarrGroups.jl/releases/download/v0.6.6/copy_symlinks_adwaita_icon_theme.v3.33.92.any.tar.gz" +[[adwaita_icon_theme]] +arch = "x86_64" git-tree-sha1 = "043d0732f572e66059278f5964e3752f018a5cdf" +os = "windows" [[adwaita_icon_theme.download]] - sha256 = "19b4b36662b2894c2eb2dd348438656df91a2402b5de6e83a0523d53ff6ced64" + sha256 = "b11fe18679624c9db04523f55d085e9de804899a82f4df11ec4f38c217a10e49" url = "https://github.com/medyan-dev/SmallZarrGroups.jl/releases/download/v0.6.6/copy_symlinks_adwaita_icon_theme.v3.33.92.any.tar.gz" diff --git a/icon-artifacts/Project.toml b/icon-artifacts/Project.toml new file mode 100644 index 00000000..21acfb56 --- /dev/null +++ b/icon-artifacts/Project.toml @@ -0,0 +1,6 @@ +[deps] +CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" +Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" diff --git a/icon-artifacts/README.md b/icon-artifacts/README.md new file mode 100644 index 00000000..2fb3e10b --- /dev/null +++ b/icon-artifacts/README.md @@ -0,0 +1,2 @@ +This directoy contains code to generate specific icon artifacts required to run Gtk.jl. + diff --git a/icon-artifacts/adwaita_icon_theme.jl b/icon-artifacts/adwaita_icon_theme.jl new file mode 100644 index 00000000..7a7199e7 --- /dev/null +++ b/icon-artifacts/adwaita_icon_theme.jl @@ -0,0 +1,77 @@ +# This script was how the new adwaita_icon_theme artifact was generated. +using Tar: Tar +using Pkg.Artifacts: bind_artifact!, create_artifact, archive_artifact, artifact_path +using Pkg: Pkg, PlatformEngines +using Base.BinaryPlatforms: Platform +using Random: seed! +using CodecZlib: GzipCompressor +using SHA: sha256 + +seed!(1234) + +windows_platforms = [ + # Windows + Platform("i686", "windows"), + Platform("x86_64", "windows"), +] + +other_platforms = [ + # glibc Linuces + Platform("i686", "linux"), + Platform("x86_64", "linux"), + Platform("aarch64", "linux"), + Platform("armv6l", "linux"), + Platform("armv7l", "linux"), + Platform("powerpc64le", "linux"), + + # musl Linuces + Platform("i686", "linux"; libc="musl"), + Platform("x86_64", "linux"; libc="musl"), + Platform("aarch64", "linux"; libc="musl"), + Platform("armv6l", "linux"; libc="musl"), + Platform("armv7l", "linux"; libc="musl"), + + # BSDs + Platform("x86_64", "macos"), + Platform("aarch64", "macos"), + Platform("x86_64", "freebsd"), +] + +# This is the url that the new windows 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" +windows_tarball = joinpath(@__DIR__, "copy_symlinks_adwaita_icon_theme.v3.33.92.any.tar.gz") + +# This is the url of the source artifact: +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" +tree_hash_src = Base.SHA1("65eca7c48dea1e32203b205613441ce9506045b4") +tar_sha256_src = "f50f3c85710f7dfbd6959bfaa6cc3a940195cd09dadddefb3b5ae9a2f97adad3" + +# This is the path to the Artifacts.toml we will manipulate +artifact_toml = joinpath(@__DIR__, "../Artifacts.toml") + +for p in other_platforms + bind_artifact!(artifact_toml, "adwaita_icon_theme", tree_hash_src; + platform=p, + force=true, + download_info=[(url_src, tar_sha256_src)], + ) +end + +# Now copy symlinks to allow the artifact to be installed on windows +tree_hash_windows = create_artifact() do dir + Tar.extract(`$(PlatformEngines.exe7z()) x $(download(url_src)) -so`, dir; + copy_symlinks=true, + ) +end +tar_tempfile = Tar.create(artifact_path(tree_hash_windows); portable=true) +tarball_data = transcode(GzipCompressor, read(tar_tempfile)) +tar_sha256_windows = bytes2hex(sha256(tarball_data)) +write(windows_tarball, tarball_data) + +for p in windows_platforms + bind_artifact!(artifact_toml, "adwaita_icon_theme", tree_hash_windows; + platform=p, + force=true, + download_info=[(url_to_upload_to, tar_sha256_windows)], + ) +end \ No newline at end of file diff --git a/src/Gtk.jl b/src/Gtk.jl index b8ef2c8e..fa45786b 100644 --- a/src/Gtk.jl +++ b/src/Gtk.jl @@ -76,28 +76,6 @@ 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.")