mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 22:29:33 +00:00
updates for photorec
This commit is contained in:
parent
eb3dd902f7
commit
61e0f021b7
@ -632,23 +632,18 @@ final class PhotoRecCarverFileIngestModule implements FileIngestModule {
|
||||
*/
|
||||
public static File locateExecutable() throws IngestModule.IngestModuleException {
|
||||
File exeFile;
|
||||
Path execName;
|
||||
String photorec_linux_directory = "/usr/bin";
|
||||
if (PlatformUtil.isWindowsOS()) {
|
||||
execName = Paths.get(PHOTOREC_DIRECTORY, PHOTOREC_SUBDIRECTORY, PHOTOREC_EXECUTABLE);
|
||||
Path execName = Paths.get(PHOTOREC_DIRECTORY, PHOTOREC_SUBDIRECTORY, PHOTOREC_EXECUTABLE);
|
||||
exeFile = InstalledFileLocator.getDefault().locate(execName.toString(), PhotoRecCarverFileIngestModule.class.getPackage().getName(), false);
|
||||
} else {
|
||||
File usrBin = new File("/usr/bin/photorec");
|
||||
File usrLocalBin = new File("/usr/local/bin/photorec");
|
||||
if (usrBin.canExecute() && usrBin.exists() && !usrBin.isDirectory()) {
|
||||
photorec_linux_directory = "/usr/bin";
|
||||
} else if (usrLocalBin.canExecute() && usrLocalBin.exists() && !usrLocalBin.isDirectory()) {
|
||||
photorec_linux_directory = "/usr/local/bin";
|
||||
} else {
|
||||
throw new IngestModule.IngestModuleException("Photorec not found");
|
||||
exeFile = null;
|
||||
for (String dirName: System.getenv("PATH").split(File.pathSeparator)) {
|
||||
File testExe = new File(dirName, PHOTOREC_LINUX_EXECUTABLE);
|
||||
if (testExe.exists()) {
|
||||
exeFile = testExe;
|
||||
break;
|
||||
}
|
||||
}
|
||||
execName = Paths.get(photorec_linux_directory, PHOTOREC_LINUX_EXECUTABLE);
|
||||
exeFile = new File(execName.toString());
|
||||
}
|
||||
|
||||
if (null == exeFile) {
|
||||
|
@ -1,2 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Autopsy
|
||||
Comment=A graphical interface to The Sleuth Kit and other digital forensics tools.
|
||||
GenericName=DFIR Tool.
|
||||
Exec=autopsy
|
||||
Icon=${SNAP}/meta/gui/autopsy.png
|
||||
Icon=${SNAP}/meta/gui/autopsy.png
|
||||
Type=Application
|
||||
Categories=Forensics;DFIR
|
||||
Keywords=autopsy;sleuth;kit;dfir;forensics
|
||||
|
@ -7,7 +7,6 @@ grade: stable # must be 'stable' to release into candidate/stable channels
|
||||
# TODO look into turning back to strict for store inclusion
|
||||
confinement: classic # use 'strict' once you have the right plugs and slots
|
||||
architectures: [amd64, arm64]
|
||||
# TODO improves startup performance
|
||||
compression: lzo
|
||||
icon: snap/gui/autopsy.png
|
||||
|
||||
@ -20,14 +19,6 @@ package-repositories:
|
||||
key-id: 99A5C88E3C5B1FA8B05A19D332E9750179FCEA62
|
||||
url: https://apt.bell-sw.com/
|
||||
|
||||
layout:
|
||||
/usr/bin/photorec:
|
||||
symlink: $SNAP/usr/bin/photorec
|
||||
/usr/local/bin:
|
||||
bind: $SNAP/usr/local/bin
|
||||
# /usr/lib/jvm/bellsoft-java8-full-amd64:
|
||||
# symlink: $SNAP/usr/lib/jvm/bellsoft-java8-full-amd64
|
||||
|
||||
plugs:
|
||||
system-files-autopsy:
|
||||
interface: system-files
|
||||
@ -44,7 +35,6 @@ apps:
|
||||
command: autopsy/bin/autopsy
|
||||
common-id: org.sleuthkit.autopsy
|
||||
plugs:
|
||||
# TODO verify these:
|
||||
# taken from https://snapcraft.io/docs/supported-interfaces
|
||||
- audio-playback
|
||||
- avahi-observe
|
||||
@ -108,8 +98,6 @@ parts:
|
||||
- libvmdk-dev
|
||||
stage-packages:
|
||||
- build-essential
|
||||
- autoconf
|
||||
- libtool
|
||||
- libpq-dev
|
||||
- testdisk
|
||||
- libafflib-dev
|
||||
@ -125,9 +113,6 @@ parts:
|
||||
- bellsoft-java8-full
|
||||
- doxygen
|
||||
stage-packages:
|
||||
- build-essential
|
||||
- autoconf
|
||||
- libtool
|
||||
- libde265-dev
|
||||
- libheif-dev
|
||||
- libpq-dev
|
||||
@ -179,7 +164,11 @@ parts:
|
||||
UNIX_SETUP_SCRIPT="$AUTOPSY_LOCATION/unix_setup.sh"
|
||||
chmod +x $UNIX_SETUP_SCRIPT
|
||||
$UNIX_SETUP_SCRIPT
|
||||
|
||||
# snaps run applications with different permissions. This ensures applications can run.
|
||||
chmod 755 "$AUTOPSY_LOCATION/bin/autopsy"
|
||||
find "$AUTOPSY_LOCATION/autopsy/markmckinnon" -name "Export*" -o -name "parse*" | xargs -I{} chmod a+x {}
|
||||
chmod -R a+x "$AUTOPSY_LOCATION/autopsy/solr/bin"
|
||||
|
||||
# # ----- INSTALL DESKTOP SHORTCUT -----
|
||||
# AUTOPSY_DESKTOP_PATH="$SNAPCRAFT_PART_INSTALL/usr/share/applications/"
|
||||
|
Loading…
x
Reference in New Issue
Block a user