Resolve "Write MKV tags without mkvpropedit as a dependency for the AppImage"
Closes #83 (closed)
Modification effectuée par Kubat
Rapports de requête de fusion
Activité
added Improvement label
Found snipet to use mmap:
#include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/mman.h> #define PACKAGE "mmap" int main(int argc, char *argv[]) { int input, output; size_t filesize; void *source, *target; if(argc != 3) fprintf(stderr, "%s SOURCE DEST\n"), exit(1); if((input = open(argv[1], O_RDONLY)) == -1) fprintf(stderr, "%s: Error: opening file: %s\n", PACKAGE, argv[1]), exit(1); if((output = open(argv[2], O_RDWR|O_CREAT|O_TRUNC, 0666)) == -1) fprintf(stderr, "%s: Error: opening file: %s\n", PACKAGE, argv[2]), exit(1); filesize = lseek(input, 0, SEEK_END); lseek(output, filesize - 1, SEEK_SET); write(output, '\0', 1); if((source = mmap(0, filesize, PROT_READ, MAP_SHARED, input, 0)) == (void *) -1) fprintf(stderr, "Error mapping input file: %s\n", argv[1]), exit(1); if((target = mmap(0, filesize, PROT_WRITE, MAP_SHARED, output, 0)) == (void *) -1) fprintf(stderr, "Error mapping ouput file: %s\n", argv[2]), exit(1); memcpy(target, source, filesize); munmap(source, filesize); munmap(target, filesize); close(input); close(output); return 0; }
assigned to @martin2018
added 1 commit
- 5b581833 - MISC: Update kara display string and add the mkv test file
added 1 commit
- 9baeb2f7 - WIP: Distribute klkt and mkvpropedit inside the lektord appimage
added 1 commit
- 91d3cd9a - WIP: Prints '...' at the end of a log line if its to long
added 1 commit
- bb4c0783 - WIP: Patch PATH if it's an AppImage to search first inside it for path resolutions
added 1 commit
- 287ddf28 - FIX: Forgot that no more klkt.AppImage is generated, update the CI [gen-appimage]
added 14 commits
-
287ddf28...03d08811 - 3 commits from branch
master
- 4f5b3295 - Fix a little typo in logs
- d9633663 - MISC: Update kara display string and add the mkv test file
- 1f7e9530 - WIP: Distribute klkt and mkvpropedit inside the lektord appimage
- 532feb76 - WIP: Fix AppImage generation
- d2b9117b - WIP: Let the "exec" call search the path for us, will find mkvpropedit.
- 076b8b46 - WIP: Print the path for debug
- 0dde9a8c - WIP: Prints '...' at the end of a log line if its to long
- 7810cbff - WIP: Patch PATH if it's an AppImage to search first inside it for path resolutions
- 533c4cb4 - WIP: Always patch PATH
- 603ea2da - DOC: Update changelog [gen-appimage]
- 62d8af83 - FIX: Forgot that no more klkt.AppImage is generated, update the CI [gen-appimage]
Afficher/masquer la liste des validations-
287ddf28...03d08811 - 3 commits from branch
marked as a Work In Progress from 1f7e9530
Veuillez vous inscrire ou vous connecter pour répondre