Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
9e05a12c
Commit
9e05a12c
authored
7 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
Clarified branch
parent
eb48ae6f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
win32/updateAndBuildAll.py
+17
-13
17 additions, 13 deletions
win32/updateAndBuildAll.py
with
17 additions
and
13 deletions
win32/updateAndBuildAll.py
+
17
−
13
View file @
9e05a12c
# Copyright (c) 2017 Basis Technology.
# Copyright (c) 2017 Basis Technology.
#
#
# This software is distributed under the Common Public License 1.0
# This software is distributed under the Common Public License 1.0
#
# Updates the TSK dependency repos (libewf, etc.), compiles them, and
# compiles various TSK platforms using the current branch
import
codecs
import
codecs
import
datetime
import
datetime
...
@@ -21,11 +24,13 @@
...
@@ -21,11 +24,13 @@
# save the build log in the output directory
# save the build log in the output directory
LOG_PATH
=
os
.
path
.
join
(
CURRENT_PATH
,
'
output
'
,
time
.
strftime
(
"
%Y.%m.%d-%H.%M.%S
"
))
LOG_PATH
=
os
.
path
.
join
(
CURRENT_PATH
,
'
output
'
,
time
.
strftime
(
"
%Y.%m.%d-%H.%M.%S
"
))
MINIMAL
=
False
MINIMAL
=
False
def
pullAndBuildAllDependencies
(
branch
):
def
pullAndBuildAllDependencies
(
depBranch
):
'''
'''
Compile libewf, libvhdi, libvmdk.
Compile libewf, libvhdi, libvmdk.
Args:
Args:
b
ranch: String, which branch to compile (currently only support master)
depB
ranch: String, which branch to compile (currently only support master)
'''
'''
# Passed is a global variable that gets set to false
# Passed is a global variable that gets set to false
# When an error occurs
# When an error occurs
...
@@ -42,11 +47,11 @@ def pullAndBuildAllDependencies(branch):
...
@@ -42,11 +47,11 @@ def pullAndBuildAllDependencies(branch):
checkPathExist
(
vmdkHome
)
checkPathExist
(
vmdkHome
)
# git update libewf, libvhdi and libvmdk
# git update libewf, libvhdi and libvmdk
if
(
passed
):
if
(
passed
):
gitPull
(
ewfHome
,
"
libewf_64bit
"
,
b
ranch
)
gitPull
(
ewfHome
,
"
libewf_64bit
"
,
depB
ranch
)
if
(
passed
):
if
(
passed
):
gitPull
(
vhdiHome
,
"
libvhdi_64bit
"
,
b
ranch
)
gitPull
(
vhdiHome
,
"
libvhdi_64bit
"
,
depB
ranch
)
if
(
passed
):
if
(
passed
):
gitPull
(
vmdkHome
,
"
libvmdk_64bit
"
,
b
ranch
)
gitPull
(
vmdkHome
,
"
libvmdk_64bit
"
,
depB
ranch
)
if
not
MINIMAL
:
if
not
MINIMAL
:
# build 32-bit of libewf, libvhdi, libvmdk and TSK
# build 32-bit of libewf, libvhdi, libvmdk and TSK
...
@@ -250,15 +255,14 @@ def usage():
...
@@ -250,15 +255,14 @@ def usage():
'''
'''
Print out how to use this script.
Print out how to use this script.
'''
'''
print
(
'
Usage: python3 updat
a
Build
l
ibs.py [[-h | --help, -b <branch> | --branch=<branch>, -m | --minimal]
'
)
print
(
'
Usage: python3 updat
eAnd
Build
L
ibs.py [[-h | --help, -b <branch> | --branch=<branch>, -m | --minimal]
'
)
print
(
'
branch
is which branch to build and is optional. Currently only works for master
'
)
print
(
'
branch
: Branch for dependencies (master is default)
'
)
print
(
'
-m,--minimal
use this option for postgres build
'
)
print
(
'
-m,--minimal
: Build 64-bit PostgreSQL only
'
)
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
sys
.
exit
(
1
)
sys
.
exit
(
1
)
def
main
():
def
main
():
#by default we use master branch to update the source
depBranch
=
'
master
'
branch
=
'
master
'
global
MINIMAL
global
MINIMAL
try
:
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"
mhb:
"
,[
'
help
'
,
'
minimal
'
,
'
branch=
'
])
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"
mhb:
"
,[
'
help
'
,
'
minimal
'
,
'
branch=
'
])
...
@@ -271,18 +275,18 @@ def main():
...
@@ -271,18 +275,18 @@ def main():
if
o
in
(
"
-m
"
,
"
--minimal
"
):
if
o
in
(
"
-m
"
,
"
--minimal
"
):
MINIMAL
=
True
MINIMAL
=
True
elif
o
in
(
"
-b
"
,
"
--branch
"
):
elif
o
in
(
"
-b
"
,
"
--branch
"
):
b
ranch
=
a
depB
ranch
=
a
elif
o
in
(
"
-h
"
,
"
--help
"
):
elif
o
in
(
"
-h
"
,
"
--help
"
):
usage
()
usage
()
system
.
exit
(
2
)
system
.
exit
(
2
)
print
(
'
Updating source by %s branch.
'
%
branch
)
if
not
os
.
path
.
exists
(
LOG_PATH
):
if
not
os
.
path
.
exists
(
LOG_PATH
):
os
.
makedirs
(
LOG_PATH
)
os
.
makedirs
(
LOG_PATH
)
if
not
os
.
path
.
exists
(
MSBUILD_PATH
):
if
not
os
.
path
.
exists
(
MSBUILD_PATH
):
print
(
"
MS_BUILD Does not exist
"
)
print
(
"
MS_BUILD Does not exist
"
)
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
pullAndBuildAllDependencies
(
branch
)
pullAndBuildAllDependencies
(
depBranch
)
buildTSKAll
()
buildTSKAll
()
class
OS
:
class
OS
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment