Update pkgname

This commit is contained in:
John Zhao 2018-11-01 23:34:52 +08:00
parent f803e3a75b
commit 3badd53c4b
5 changed files with 24 additions and 2 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@ _output/
/plugins/ /plugins/
/3rdparty/opencv/ /3rdparty/opencv/
/pkginfo.sh
/*.nsi /*.nsi
/*.exe /*.exe

View File

@ -83,6 +83,10 @@ configure_file(
include/mynteye/mynteye.h @ONLY include/mynteye/mynteye.h @ONLY
) )
configure_file(
cmake/templates/pkginfo.sh.in
${CMAKE_CURRENT_SOURCE_DIR}/pkginfo.sh @ONLY
)
if(OS_WIN) if(OS_WIN)
configure_file( configure_file(
scripts/win/nsis/winpack.nsi.in scripts/win/nsis/winpack.nsi.in

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
OpenCV_VERSION=@OpenCV_VERSION@
OpenCV_VERSION_MAJOR=@OpenCV_VERSION_MAJOR@
OpenCV_VERSION_MINOR=@OpenCV_VERSION_MINOR@
OpenCV_VERSION_PATCH=@OpenCV_VERSION_PATCH@
OpenCV_VERSION_STATUS=@OpenCV_VERSION_STATUS@
_contains() {
[ `echo $1 | grep -c "$2"` -gt 0 ]
}
if _contains "@OpenCV_INCLUDE_DIRS@" "/ros/"; then
ROS_VERSION=$(rosversion -d)
OpenCV_VERSION=ros-$ROS_VERSION
fi

View File

@ -61,7 +61,7 @@ Section "SDK (required)"
SetOutPath $INSTDIR SetOutPath $INSTDIR
; Put file there ; Put file there
File /r "mynteye-s-${VERSION}-win-x64\*" File /r "mynteye-s-${VERSION}-win-x64-opencv-${OpenCV_VERSION}\*"
; Write the installation path into the registry ; Write the installation path into the registry
WriteRegStr HKLM "SOFTWARE\MYNTEYESSDK" "Install_Dir" "$INSTDIR" WriteRegStr HKLM "SOFTWARE\MYNTEYESSDK" "Install_Dir" "$INSTDIR"

View File

@ -75,7 +75,8 @@ mv "$ROOT_DIR/3rdparty/opencv" "$ROOT_DIR/_install/3rdparty/opencv"
################################################################################ ################################################################################
# archive exe # archive exe
_pkgname=$1 source "$ROOT_DIR/pkginfo.sh"
_pkgname=$1-opencv-$OpenCV_VERSION
mv "$ROOT_DIR/_install" "$ROOT_DIR/$_pkgname" mv "$ROOT_DIR/_install" "$ROOT_DIR/$_pkgname"
makensis "$ROOT_DIR/winpack.nsi" makensis "$ROOT_DIR/winpack.nsi"