Skip to content

Commit

Permalink
Update squashfuse-zig, update some more profiles to new format
Browse files Browse the repository at this point in the history
  • Loading branch information
mgord9518 committed Nov 20, 2024
1 parent c0fbd1a commit 3d00672
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 84 deletions.
15 changes: 15 additions & 0 deletions profiles/environ_defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{ "XDG_CACHE_HOME": "${HOME}/.cache" },
{ "XDG_CONFIG_HOME": "${HOME}/.config" },
{ "XDG_DATA_HOME": "${HOME}/.local/share" },
{ "XDG_BIN_HOME": "${HOME}/.local/bin" },
{ "XDG_RUNTIME_DIR": "/run/user/${UID}" },
{ "XDG_MUSIC_DIR": "${HOME}/Music" },
{ "XDG_DESKTOP_DIR": "${HOME}/Desktop" },
{ "XDG_DOCUMENTS_DIR": "${HOME}/Documents" },
{ "XDG_DOWNLOAD_DIR": "${HOME}/Downloads" },
{ "XDG_PICTURES_DIR": "${HOME}/Pictures" },
{ "XDG_PUBLICSHARE_DIR": "${HOME}/Public" },
{ "XDG_TEMPLATES_DIR": "${HOME}/Templates" },
{ "XDG_VIDEOS_DIR": "${HOME}/Videos" }
]
180 changes: 113 additions & 67 deletions profiles/profile_database_new.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,13 @@
{
"names": [ "dust3d" ],
"level": 2,
"filesystem": [
"xdg-templates:rw",
"xdg-documents:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}",
"${XDG_TEMPLATES_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -436,16 +439,18 @@
{
"names": [ "eagle mode" ],
"level": 1,
"filesystem": [
"xdg-documents:rw",
"xdg-publicshare:rw",
"xdg-templates:rw",
"xdg-desktop:rw",
"xdg-documents:rw",
"xdg-download:rw",
"xdg-music:rw",
"xdg-videos:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}",
"${XDG_PUBLICSHARE_DIR}",
"${XDG_TEMPLATES_DIR}",
"${XDG_DESKTOP_DIR}",
"${XDG_DOWNLOAD_DIR}",
"${XDG_MUSIC_DIR}",
"${XDG_VIDEOS_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -458,13 +463,16 @@
{
"names": [ "edex-ui" ],
"level": 2,
"filesystem": [
"~/.config/nvim:ro",
"~/.profile:ro",
"~/.bashrc:ro",
"~/.zshrc:ro",
"~/.viminfo:ro"
],
"filesystem": {
"read_only": [
"${XDG_CONFIG_HOME}/nvim",
"${HOME}/.profile",
"${HOME}/.bashrc",
"${HOME}/.zshrc",
"${HOME}/.viminfo"
],
"read_write": null
},
"devices": [
"dri"
],
Expand All @@ -491,10 +499,13 @@
{
"names": [ "endless sky" ],
"level": 2,
"filesystem": [
"xdg-templates:rw",
"xdg-documents:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}",
"${XDG_TEMPLATES_DIR}"
]
},
"devices": [
"dri"
],
Expand Down Expand Up @@ -534,9 +545,12 @@
{
"names": [ "firefox", "firefox beta", "firefox nightly" ],
"level": 1,
"filesystem": [
"xdg-download:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOWNLOAD_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -551,10 +565,13 @@
{
"names": [ "fontforge" ],
"level": 2,
"filesystem": [
"xdg-documents:rw",
"~/.fonts:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}",
"${HOME}/.fonts"
]
},
"devices": [
"dri"
],
Expand All @@ -578,10 +595,13 @@
{
"names": [ "freecad", "freecad conda", "freecad weekly" ],
"level": 1,
"filesystem": [
"xdg-documents:rw",
"xdg-templates:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}",
"${XDG_TEMPLATES_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -593,11 +613,13 @@
{
"names": [ "gambatte_qt" ],
"level": 2,
"filesystem": [
"xdg-download:rw",
"~/Games:rw",
"~/Roms:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOWNLOAD_DIR}",
"${HOME}/Games"
]
},
"devices": [
"dri",
"input"
Expand All @@ -611,9 +633,12 @@
{
"names": [ "geometrize" ],
"level": 2,
"filesystem": [
"xdg-pictures:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_PICTURES_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -625,9 +650,12 @@
{
"names": [ "gnu image manipulation program" ],
"level": 1,
"filesystem": [
"xdg-pictures:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_PICTURES_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -639,19 +667,25 @@
{
"names": [ "go" ],
"level": 3,
"filesystem": [
"xdg-documents:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}"
]
},
"devices": null,
"sockets": null,
"data_dir": true
},
{
"names": [ "google chrome" ],
"level": 2,
"filesystem": [
"xdg-download:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOWNLOAD_DIR}"
]
},
"devices": [
"dri"
],
Expand Down Expand Up @@ -744,10 +778,13 @@
{
"names": [ "imagemagick" ],
"level": 3,
"filesystem": [
"xdg-documents:rw",
"xdg-pictures:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}",
"${XDG_PICTURES_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -757,10 +794,13 @@
{
"names": [ "inkscape" ],
"level": 2,
"filesystem": [
"xdg-documents:rw",
"xdg-pictures:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}",
"${XDG_PICTURES_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -784,9 +824,12 @@
{
"names": [ "joplin" ],
"level": 2,
"filesystem": [
"xdg-documents:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_DOCUMENTS_DIR}"
]
},
"devices": [
"dri"
],
Expand All @@ -799,9 +842,12 @@
{
"names": [ "krita" ],
"level": 2,
"filesystem": [
"xdg-pictures:rw"
],
"filesystem": {
"read_only": null,
"read_write": [
"${XDG_PICTURES_DIR}"
]
},
"devices": [
"dri"
],
Expand Down
8 changes: 4 additions & 4 deletions zig/build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.{
.name = "aisap",
.version = "0.10.4-alpha",
.version = "0.10.5-alpha",
.minimum_zig_version = "0.13.0",

.dependencies = .{
.squashfuse = .{
//.url = "https://github.com/mgord9518/squashfuse-zig/archive/refs/tags/continuous.tar.gz",
//.hash = "12201e377e845eea92744b4cca7ed590e3cddc84f0ba61bb4f2121a89fde594b80b2",
.path = "../../squashfuse-zig",
.url = "https://github.com/mgord9518/squashfuse-zig/archive/refs/tags/continuous.tar.gz",
.hash = "12209f8ff57fe423ca6f08c9701617a5169f7d721e4ca405aaa0b0b8e839511f3196",
//.path = "../../squashfuse-zig",
},
},

Expand Down
9 changes: 1 addition & 8 deletions zig/lib/AppImage.zig
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ pub fn open(allocator: std.mem.Allocator, file: std.fs.File) !AppImage {

_ = try appimage.loadDesktopEntry(&buf);

std.debug.print("offset {d}\n", .{offset});

return appimage;
}

Expand All @@ -61,12 +59,7 @@ fn loadDesktopEntry(appimage: *AppImage, buf: []u8) !usize {
found = true;

var file = try root.openFile(entry.name, .{});
const read_len = try file.reader().readAll(buf);

std.debug.print("entry {s} {s}\n", .{
entry.name,
buf[0..read_len],
});
_ = try file.reader().readAll(buf);
}

return 0;
Expand Down
7 changes: 2 additions & 5 deletions zig/src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ pub fn main() !void {

var args = std.process.args();

const stdout_file = std.io.getStdOut().writer();
var bw = std.io.bufferedWriter(stdout_file);
const stdout = bw.writer();
const stdout_file = std.io.getStdOut();
const stdout = stdout_file.writer();

_ = args.next();

Expand All @@ -34,6 +33,4 @@ pub fn main() !void {
try stdout.print(" kind: {}\n", .{appimage.kind});
try stdout.print(" offset: {d}\n", .{appimage.sqfs.opts.offset});
// try stdout.print(" inode count: {d}\n", .{sqfs.super_block.inode_count});

try bw.flush();
}

0 comments on commit 3d00672

Please sign in to comment.