Skip to content

Commit

Permalink
Worked on mount tool
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Dec 31, 2018
1 parent da671fd commit 17271b0
Show file tree
Hide file tree
Showing 42 changed files with 7,561 additions and 5,615 deletions.
28 changes: 14 additions & 14 deletions .travis.yml
Expand Up @@ -11,7 +11,7 @@ matrix:
- TARGET="coverity"
compiler: clang
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
addons:
Expand All @@ -31,7 +31,7 @@ matrix:
- TARGET="linux-clang"
compiler: clang
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc"
Expand All @@ -42,7 +42,7 @@ matrix:
- TARGET="linux-gcc"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and wide character type (wchar_t) support"
Expand All @@ -53,7 +53,7 @@ matrix:
- TARGET="linux-gcc-wide-character-type"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc without optimization"
Expand All @@ -65,7 +65,7 @@ matrix:
- TARGET="linux-gcc-no-optimization"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python module"
Expand All @@ -76,7 +76,7 @@ matrix:
- TARGET="linux-gcc-python"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 2 module"
Expand All @@ -88,7 +88,7 @@ matrix:
- TARGET="linux-gcc-python2"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 3 module"
Expand All @@ -100,15 +100,15 @@ matrix:
- TARGET="linux-gcc-python3"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and Python 2 module (setup.py)"
env:
- TARGET="linux-gcc-python-setup-py"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
python: 2.7
Expand All @@ -117,7 +117,7 @@ matrix:
- TARGET="linux-gcc-python-setup-py"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
python: 3.4
Expand All @@ -129,7 +129,7 @@ matrix:
- TARGET="linux-gcc-shared"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc, shared libraries and wide character type (wchar_t) support"
Expand All @@ -140,7 +140,7 @@ matrix:
- TARGET="linux-gcc-shared-wide-character-type"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "Linux with gcc and static executables support"
Expand All @@ -151,7 +151,7 @@ matrix:
- TARGET="linux-gcc-static-executables"
compiler: gcc
os: linux
dist: trusty
dist: xenial
sudo: required
group: edge
- name: "MacOS with clang"
Expand Down Expand Up @@ -198,7 +198,7 @@ matrix:
osx_image: xcode8.3
before_install:
- if test ${TRAVIS_OS_NAME} = "linux"; then
sudo apt-get update && sudo apt-mark hold oracle-java8-installer oracle-java9-installer postgresql-9.2 postgresql-9.3 postgresql-9.4 postgresql-9.5 postgresql-9.6 postgresql-client postgresql-client-common postgresql-common postgresql-contrib-9.2 postgresql-contrib-9.3 postgresql-contrib-9.4 postgresql-contrib-9.5 postgresql-contrib-9.6 postgresql-doc && sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y --allow-unauthenticated && sudo apt-get install -y autopoint libfuse-dev;
sudo apt-get update && sudo apt-get --fix-missing -o Dpkg::Options::="--force-confold" upgrade -y --allow-unauthenticated && sudo apt-get install -y autopoint libfuse-dev;
elif test ${TRAVIS_OS_NAME} = "osx"; then
brew update && brew install gettext gnu-sed && brew link --force gettext;
fi
Expand Down
8 changes: 5 additions & 3 deletions acinclude.m4
@@ -1,6 +1,6 @@
dnl Checks for required headers and functions
dnl
dnl Version: 20170917
dnl Version: 20181231

dnl Function to detect if libregf dependencies are available
AC_DEFUN([AX_LIBREGF_CHECK_LOCAL],
Expand Down Expand Up @@ -70,10 +70,12 @@ AC_DEFUN([AX_REGFTOOLS_CHECK_LOCAL],
dnl Headers included in regftools/regfmount.c
AC_CHECK_HEADERS([errno.h])
dnl Functions included in regftools/regfmount.c
AC_HEADER_TIME
dnl Functions included in regftools/mount_file_system.c and regftools/mount_file_entry.c
AS_IF(
[test "x$ac_cv_enable_winapi" = xno],
[AC_CHECK_FUNCS([getegid geteuid])
[AC_CHECK_FUNCS([clock_gettime getegid geteuid time])
])
dnl Check if tools should be build as static executables
Expand Down
47 changes: 45 additions & 2 deletions appveyor.yml
Expand Up @@ -140,7 +140,50 @@ install:
- cmd: git clone https://github.com/codecov/codecov-bash.git ..\codecov-bash
- cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
git clone https://github.com/libyal/vstools.git ..\vstools )
- cmd: git clone https://github.com/joachimmetz/dokan.git ..\dokan
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
If ($env:TARGET -eq "vs2017") {
.\syncdokan.ps1 }
Else {
.\syncdokan.ps1 -UseLegacyVersion }
}
- cmd: if [%TARGET%]==[vs2010] (
pushd ..\dokan &&
set PYTHONPATH=..\vstools &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --no-python-dll --output-format 2010 msvscpp\dokan.sln &&
rd /q /s msvscpp &&
ren vs2010 msvscpp &&
popd )
- cmd: if [%TARGET%]==[vs2012] (
pushd ..\dokan &&
set PYTHONPATH=..\vstools &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --no-python-dll --extend-with-x64 --output-format 2012 msvscpp\dokan.sln &&
rd /q /s msvscpp &&
ren vs2012 msvscpp &&
popd )
- cmd: if [%TARGET%]==[vs2013] (
pushd ..\dokan &&
set PYTHONPATH=..\vstools &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --output-format 2013 msvscpp\dokan.sln &&
rd /q /s msvscpp &&
ren vs2013 msvscpp &&
popd )
- cmd: if [%TARGET%]==[vs2015] (
pushd ..\dokan &&
set PYTHONPATH=..\vstools &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --output-format 2015 msvscpp\dokan.sln &&
rd /q /s msvscpp &&
ren vs2015 msvscpp &&
popd )
- ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
If ($env:TARGET -eq "vs2017") {
$Configuration = $env:CONFIGURATION;
If (${Configuration} -eq "VSDebug") {
$Configuration = "Debug" }
.\builddokan.ps1 -Configuration ${Configuration} -Platform "Win32";
.\builddokan.ps1 -Configuration ${Configuration} -Platform "x64"; }
Else {
.\builddokan.ps1 -UseLegacyVersion }
}
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin] (
C:\cygwin\setup-x86.exe -qgnNdO -l C:\cygwin\var\cache\setup -R c:\cygwin -s http://cygwin.mirror.constant.com -P python2-devel -P python3-devel )
- cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
Expand Down Expand Up @@ -170,7 +213,7 @@ build_script:
msbuild /verbosity:quiet vs2015\libregf.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%TARGET%]==[vs2017] (
set PYTHONPATH=..\vstools &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --extend-with-x64 --no-python-dll --output-format 2017 msvscpp\libregf.sln &&
C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --extend-with-x64 --no-python-dll --output-format 2017 --with-dokany msvscpp\libregf.sln &&
msbuild /verbosity:quiet vs2017\libregf.sln /property:Platform=Win32 /property:PlatformToolset=v141 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
msbuild /verbosity:quiet vs2017\libregf.sln /property:Platform=x64 /property:PlatformToolset=v141 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
- cmd: if [%BUILD_ENVIRONMENT%]==[python] (
Expand Down
61 changes: 61 additions & 0 deletions builddokan.ps1
@@ -0,0 +1,61 @@
# Script that builds dokan
#
# Version: 20180322

Param (
[string]$Configuration = ${Env:Configuration},
[string]$Platform = ${Env:Platform},
[switch]$UseLegacyVersion = $false
)

If (-not ${Configuration})
{
$Configuration = "Release"
}
If (-not ${Platform})
{
$Platform = "Win32"
}

If (${Env:AppVeyor} -eq "True")
{
$MSBuild = "MSBuild.exe"
}
ElseIf (${Env:VisualStudioVersion} -eq "15.0")
{
$MSBuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MSBuild.exe"
}
ElseIf (${Env:VisualStudioVersion} -eq "9.0")
{
$MSBuild = "C:\\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe"
}
Else
{
$MSBuild = "C:\\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
}
$MSBuildOptions = "/verbosity:quiet /target:Build /property:Configuration=${Configuration},Platform=${Platform}"

If ($UseLegacyVersion)
{
$DokanPath = "../dokan"
$ProjectFile = "msvscpp\dokan.sln"
}
Else
{
$DokanPath = "../dokany"
$ProjectFile = "dokan\dokan.vcxproj"
}

Push-Location ${DokanPath}

Try
{
Write-Host "${MSBuild} ${MSBuildOptions} ${ProjectFile}"

Invoke-Expression -Command "& '${MSBuild}' ${MSBuildOptions} ${ProjectFile}"
}
Finally
{
Pop-Location
}

2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ( 2.59 )

AC_INIT(
[libregf],
[20181129],
[20181231],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down
8 changes: 8 additions & 0 deletions dpkg/control
Expand Up @@ -9,6 +9,8 @@ Homepage: https://github.com/libyal/libregf
Package: libregf
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: libregf1
Replaces: libregf1
Suggests: libregf-dbg
Description: Library to access the Windows NT Registry File (REGF) format
libregf is a library to access the Windows NT Registry File (REGF) format.
Expand All @@ -31,6 +33,8 @@ Package: libregf-tools
Section: utils
Architecture: any
Depends: libregf (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Conflicts: libregf-utils
Replaces: libregf-utils
Description: Several tools for reading Windows NT Registry Files (REGF)
Several tools for reading Windows NT Registry Files (REGF).

Expand All @@ -45,6 +49,8 @@ Package: libregf-python
Section: python
Architecture: any
Depends: libregf (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Conflicts: python-libregf
Replaces: python-libregf
Suggests: libregf-python-dbg
Description: Python 2 bindings for libregf
Python 2 bindings for libregf.
Expand All @@ -60,6 +66,8 @@ Package: libregf-python3
Section: python
Architecture: any
Depends: libregf (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Conflicts: python3-libregf
Replaces: python3-libregf
Suggests: libregf-python3-dbg
Description: Python 3 bindings for libregf
Python 3 bindings for libregf.
Expand Down
13 changes: 6 additions & 7 deletions libregf.ini
Expand Up @@ -16,19 +16,18 @@ description: "Several tools for reading Windows NT Registry Files (REGF)"
names: ["regfexport", "regfinfo", "regfmount"]

[mount_tool]
missing_backend_error: "No sub system to mount REGF."
mount_point: "/mnt/regffile/"
features: ["codepage"]
file_entry_modification_time: "last_written_time"
file_entry_modification_time_type: "filetime"
file_entry_type: "key"
file_system_type: "file"
mounted_description: "directories and files that provide the items contained in the REGF file"
mounted_dokan: "X:\\Software"
mounted_fuse: "/mnt/regffile/Software"
source: "SYSTEM.DAT"
source_description: "a REGF file"
source_description_long: "a Windows NT Registry File (REGF)"
source_type: "image"
supported_backends: [
"Dokan library",
"fuse",
"OSXFuse"]
source_type: "file"

[troubleshooting]
example: "regfinfo NTUSER.DAT"
Expand Down
2 changes: 1 addition & 1 deletion libregf.spec.in
Expand Up @@ -77,7 +77,7 @@ rm -rf %{buildroot}
%files -n libregf-devel
%defattr(644,root,root,755)
%license COPYING
%doc AUTHORS README ChangeLog
%doc AUTHORS README
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
Expand Down
8 changes: 4 additions & 4 deletions libregf/libregf_unused.h
@@ -1,5 +1,5 @@
/*
* The internal unused definition
* Definitions to silence compiler warnings about unused function attributes/parameters.
*
* Copyright (C) 2009-2018, Joachim Metz <joachim.metz@gmail.com>
*
Expand All @@ -19,8 +19,8 @@
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/

#if !defined( _LIBREGF_INTERNAL_UNUSED_H )
#define _LIBREGF_INTERNAL_UNUSED_H
#if !defined( _LIBREGF_UNUSED_H )
#define _LIBREGF_UNUSED_H

#include <common.h>

Expand All @@ -40,5 +40,5 @@
/* parameter */
#endif

#endif /* !defined( _LIBREGF_INTERNAL_UNUSED_H ) */
#endif /* !defined( _LIBREGF_UNUSED_H ) */

4 changes: 2 additions & 2 deletions m4/libcdata.m4
@@ -1,6 +1,6 @@
dnl Checks for libcdata required headers and functions
dnl
dnl Version: 20181117
dnl Version: 20181216

dnl Function to detect if libcdata is available
dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -25,7 +25,7 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB],
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libcdata],
[libcdata >= 20160108],
[libcdata >= 20181216],
[ac_cv_libcdata=yes],
[ac_cv_libcdata=check])
])
Expand Down
1 change: 0 additions & 1 deletion msvscpp/Makefile.am
@@ -1,5 +1,4 @@
MSVSCPP_FILES = \
dokan/dokan.vcproj \
libbfio/libbfio.vcproj \
libcdata/libcdata.vcproj \
libcerror/libcerror.vcproj \
Expand Down

0 comments on commit 17271b0

Please sign in to comment.