Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opensilecs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
silecs
opensilecs
Commits
ed4beb91
Commit
ed4beb91
authored
2 years ago
by
al.schwinn
Browse files
Options
Downloads
Patches
Plain Diff
Updated and automated snap7 build
parent
3fbf61e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
snap7/.gitignore
+1
-2
1 addition, 2 deletions
snap7/.gitignore
snap7/build.sh
+44
-10
44 additions, 10 deletions
snap7/build.sh
snap7/install.sh
+4
-1
4 additions, 1 deletion
snap7/install.sh
with
49 additions
and
13 deletions
snap7/.gitignore
+
1
−
2
View file @
ed4beb91
snap7-full/
/snap7-full-1.4.0.tar.gz
/snap7-ful*
This diff is collapsed.
Click to expand it.
snap7/build.sh
+
44
−
10
View file @
ed4beb91
#!/bin/sh
set
-e
SNAP7_VERSION
=
1.4.0
# First argument has to be the desired snap7 version
SNAP7_VERSION
=
$1
SCRIPT
=
$(
readlink
-f
"
$0
"
)
SCRIPTPATH
=
$(
dirname
"
$SCRIPT
"
)
# path where this script is located in
SNAP7_FOLDER
=
snap7-full-
${
SNAP7_VERSION
}
SNAP7_PATH
=
${
SCRIPTPATH
}
/
${
SNAP7_FOLDER
}
echo
${
SNAP7_PATH
}
# If there is no snap7 folder yet, we download the required version and build it
if
[
-d
${
SNAP7_PATH
}
]
;
then
echo
"Some snap7 version is already available. No need to download/build it"
#TODO Check if the version matches
else
archiveFile
=
${
SNAP7_FOLDER
}
.tar.gz
archiveFilePath
=
${
SCRIPTPATH
}
/
${
SNAP7_FOLDER
}
.tar.gz
echo
"Cleanup"
rm
-rf
snap7-ful
*
if
[
!
-f
"
$archiveFilePath
"
]
then
echo
"Downloading snap7"
cd
${
SCRIPTPATH
}
wget http://downloads.sourceforge.net/project/snap7/
${
SNAP7_VERSION
}
/
${
archiveFile
}
fi
archiveFile
=
${
SNAP7_FOLDER
}
.tar.gz
if
[
!
-f
"
$archiveFile
"
]
then
rm
-rf
snap7-full
*
wget http://downloads.sourceforge.net/project/snap7/
${
SNAP7_VERSION
}
/
${
archiveFile
}
tar
-vxzf
${
archiveFile
}
mv
${
SNAP7_FOLDER
}
snap7-full
if
[
!
-d
${
SNAP7_PATH
}
]
then
echo
"Extracting snap7"
tar
-vxzf
${
archiveFilePath
}
rm
${
archiveFilePath
}
fi
if
[
!
-d
${
SCRIPTPATH
}
/snap7-full
]
then
echo
"Creating symlink"
ln
-s
${
SNAP7_PATH
}
${
SCRIPTPATH
}
/snap7-full
fi
echo
"Building snap7"
cd
${
SNAP7_FOLDER
}
/build/unix
make
-f
x86_64_linux.mk
fi
cd
snap7-full/build/unix
make
-f
x86_64_linux.mk
This diff is collapsed.
Click to expand it.
snap7/install.sh
+
4
−
1
View file @
ed4beb91
...
...
@@ -4,7 +4,7 @@ set -e
RELEASE_DIR_BASE
=
$1
SILECS_VERSION
=
$2
SNAP7_VERSION
=
1.4.
2
SNAP7_VERSION
=
1.4.
0
SCRIPT
=
$(
readlink
-f
"
$0
"
)
SCRIPTPATH
=
$(
dirname
"
$SCRIPT
"
)
# path where this script is located in
...
...
@@ -15,6 +15,9 @@ if [ -d ${RELEASE_DIR} ]; then
exit
1
fi
# Download and build snap7 if required
${
SCRIPTPATH
}
/build.sh
${
SNAP7_VERSION
}
mkdir
-p
${
RELEASE_DIR
}
cp
-r
${
SCRIPTPATH
}
/snap7-full/build/bin/x86_64-linux
${
RELEASE_DIR
}
...
...
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