Install project before deploy.

This commit is contained in:
Gonzalo Exequiel Pedone 2021-02-21 14:19:57 -03:00
parent c62069f476
commit 055ea82546
No known key found for this signature in database
GPG key ID: B8B09E63E9B85BAF
10 changed files with 45 additions and 17 deletions

View file

@ -36,8 +36,7 @@ add_executable(Manager
src/main.cpp src/main.cpp
src/cmdparser.cpp) src/cmdparser.cpp)
set_target_properties(Manager PROPERTIES set_target_properties(Manager PROPERTIES
OUTPUT_NAME AkVCamManager OUTPUT_NAME AkVCamManager)
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALLPATH}")
add_dependencies(Manager VCamIPC PlatformUtils VCamUtils) add_dependencies(Manager VCamIPC PlatformUtils VCamUtils)
target_include_directories(Manager target_include_directories(Manager
PRIVATE ..) PRIVATE ..)

View file

@ -13,7 +13,6 @@ build:
environment: environment:
global: global:
PYTHON_VERSION: Python39 PYTHON_VERSION: Python39
INSTALL_PREFIX: C:/projects/akvirtualcamera/ports/deploy/temp_priv
# api key from https://bintray.com/profile/edit # api key from https://bintray.com/profile/edit
# encrypted in https://ci.appveyor.com/tools/encrypt # encrypted in https://ci.appveyor.com/tools/encrypt
BT_KEY: BT_KEY:

View file

@ -32,8 +32,7 @@ add_executable(Assistant
src/assistantglobals.h src/assistantglobals.h
src/main.cpp) src/main.cpp)
set_target_properties(Assistant PROPERTIES set_target_properties(Assistant PROPERTIES
OUTPUT_NAME ${CMIO_PLUGIN_ASSISTANT_NAME} OUTPUT_NAME ${CMIO_PLUGIN_ASSISTANT_NAME})
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALLPATH}")
add_dependencies(Assistant PlatformUtils VCamUtils) add_dependencies(Assistant PlatformUtils VCamUtils)
target_include_directories(Assistant target_include_directories(Assistant
PRIVATE .. PRIVATE ..

View file

@ -47,10 +47,9 @@ add_library(VirtualCamera SHARED
src/queue.h src/queue.h
src/stream.cpp src/stream.cpp
src/stream.h) src/stream.h)
configure_file(Info.plist.in "${CMAKE_BINARY_DIR}/${CONTENTSPATH}/Info.plist") configure_file(Info.plist.in Info.plist)
set_target_properties(VirtualCamera PROPERTIES set_target_properties(VirtualCamera PROPERTIES
OUTPUT_NAME ${CMIO_PLUGIN_NAME} OUTPUT_NAME ${CMIO_PLUGIN_NAME}
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${MACBINPATH}"
PREFIX "" PREFIX ""
SUFFIX "") SUFFIX "")
add_dependencies(VirtualCamera VCamIPC PlatformUtils VCamUtils) add_dependencies(VirtualCamera VCamIPC PlatformUtils VCamUtils)
@ -80,4 +79,4 @@ target_link_libraries(VirtualCamera
VCamIPC VCamIPC
${EXTRA_LIBS}) ${EXTRA_LIBS})
install(TARGETS VirtualCamera DESTINATION ${MACBINPATH}) install(TARGETS VirtualCamera DESTINATION ${MACBINPATH})
install(FILES "${CMAKE_BINARY_DIR}/${CONTENTSPATH}/Info.plist" DESTINATION ${CONTENTSPATH}) install(FILES Info.plist DESTINATION ${CONTENTSPATH})

View file

@ -31,8 +31,7 @@ add_executable(Assistant
src/service.cpp src/service.cpp
src/service.h) src/service.h)
set_target_properties(Assistant PROPERTIES set_target_properties(Assistant PROPERTIES
OUTPUT_NAME ${DSHOW_PLUGIN_ASSISTANT_NAME} OUTPUT_NAME ${DSHOW_PLUGIN_ASSISTANT_NAME})
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALLPATH}")
add_dependencies(Assistant PlatformUtils VCamUtils) add_dependencies(Assistant PlatformUtils VCamUtils)
target_include_directories(Assistant target_include_directories(Assistant
PRIVATE .. PRIVATE ..

View file

@ -79,7 +79,6 @@ add_library(VirtualCamera SHARED
VirtualCamera.def) VirtualCamera.def)
set_target_properties(VirtualCamera PROPERTIES set_target_properties(VirtualCamera PROPERTIES
OUTPUT_NAME ${DSHOW_PLUGIN_NAME} OUTPUT_NAME ${DSHOW_PLUGIN_NAME}
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALLPATH}"
PREFIX "") PREFIX "")
add_dependencies(VirtualCamera VCamIPC PlatformUtils VCamUtils) add_dependencies(VirtualCamera VCamIPC PlatformUtils VCamUtils)
target_compile_definitions(VirtualCamera PRIVATE VIRTUALCAMERA_LIBRARY) target_compile_definitions(VirtualCamera PRIVATE VIRTUALCAMERA_LIBRARY)

View file

@ -16,6 +16,8 @@ REM along with Webcamoid. If not, see <http://www.gnu.org/licenses/>.
REM REM
REM Web-Site: http://webcamoid.github.io/ REM Web-Site: http://webcamoid.github.io/
set INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\ports\deploy\temp_priv\data
echo. echo.
echo Building x64 virtual camera driver echo Building x64 virtual camera driver
echo. echo.
@ -28,6 +30,7 @@ if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\mingw64\bin;C:\msy
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" ( if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
cmake ^ cmake ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^ -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
.. ..
cmake --build . cmake --build .
@ -39,6 +42,7 @@ if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" (
cmake ^ cmake ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-A x64 ^ -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^ -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
.. ..
cmake --build . cmake --build .
@ -59,6 +63,7 @@ if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\mingw32\bin;C:\msy
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" ( if "%CMAKE_GENERATOR%" == "MSYS Makefiles" (
cmake ^ cmake ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^ -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
.. ..
cmake --build . cmake --build .
@ -70,6 +75,7 @@ if "%CMAKE_GENERATOR:~0,13%" == "Visual Studio" (
cmake ^ cmake ^
-G "%CMAKE_GENERATOR%" ^ -G "%CMAKE_GENERATOR%" ^
-A Win32 ^ -A Win32 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^ -DCMAKE_INSTALL_PREFIX="%INSTALL_PREFIX%" ^
.. ..
cmake --build . cmake --build .

View file

@ -26,8 +26,16 @@ cd ports/deploy
git clone https://github.com/webcamoid/DeployTools.git git clone https://github.com/webcamoid/DeployTools.git
cd ../.. cd ../..
set MAKE_PATH=%TOOLSDIR%\bin\%MAKETOOL%.exe
set PATH=%QTDIR%\bin;%TOOLSDIR%\bin;%PATH%
set PYTHONPATH=%cd%\ports\deploy\DeployTools set PYTHONPATH=%cd%\ports\deploy\DeployTools
setlocal
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
cd build-x64
cmake --build . --target install
cd ..
cd build-x86
cmake --build . --target install
cd ..
endlocal
%PYTHON_PATH%\python.exe ports\deploy\deploy.py %PYTHON_PATH%\python.exe ports\deploy\deploy.py

View file

@ -19,6 +19,7 @@
# Web-Site: http://webcamoid.github.io/ # Web-Site: http://webcamoid.github.io/
BUILDSCRIPT=dockerbuild.sh BUILDSCRIPT=dockerbuild.sh
INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/ports/deploy/temp_priv/data
if [ "${TRAVIS_OS_NAME}" = linux ]; then if [ "${TRAVIS_OS_NAME}" = linux ]; then
sudo mount --bind root.x86_64 root.x86_64 sudo mount --bind root.x86_64 root.x86_64
@ -28,13 +29,16 @@ if [ "${TRAVIS_OS_NAME}" = linux ]; then
export LC_ALL=C export LC_ALL=C
export HOME=$HOME export HOME=$HOME
cd $TRAVIS_BUILD_DIR cd ${TRAVIS_BUILD_DIR}
echo echo
echo "Building x64 virtual camera driver" echo "Building x64 virtual camera driver"
echo echo
mkdir build-x64 mkdir build-x64
cd build-x64 cd build-x64
x86_64-w64-mingw32-cmake .. x86_64-w64-mingw32-cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
..
cmake --build . cmake --build .
cd .. cd ..
echo echo
@ -42,7 +46,10 @@ echo "Building x86 virtual camera driver"
echo echo
mkdir build-x86 mkdir build-x86
cd build-x86 cd build-x86
i686-w64-mingw32-cmake .. i686-w64-mingw32-cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
..
cmake --build . cmake --build .
EOF EOF
chmod +x ${BUILDSCRIPT} chmod +x ${BUILDSCRIPT}
@ -61,6 +68,9 @@ EOF
elif [ "${TRAVIS_OS_NAME}" = osx ]; then elif [ "${TRAVIS_OS_NAME}" = osx ]; then
mkdir build mkdir build
cd build cd build
cmake .. cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
..
cmake --build . cmake --build .
fi fi

View file

@ -50,6 +50,12 @@ EOF
fi fi
cat << EOF >> ${DEPLOYSCRIPT} cat << EOF >> ${DEPLOYSCRIPT}
cd build-x64
cmake --build . --target install
cd ..
cd build-x86
cmake --build . --target install
cd ..
python ports/deploy/deploy.py python ports/deploy/deploy.py
EOF EOF
chmod +x ${DEPLOYSCRIPT} chmod +x ${DEPLOYSCRIPT}
@ -59,6 +65,10 @@ EOF
sudo umount root.x86_64/$HOME sudo umount root.x86_64/$HOME
sudo umount root.x86_64 sudo umount root.x86_64
elif [ "${TRAVIS_OS_NAME}" = osx ]; then elif [ "${TRAVIS_OS_NAME}" = osx ]; then
cd build
cmake --build . --target install
cd ..
export PYTHONPATH="${PWD}/ports/deploy/DeployTools" export PYTHONPATH="${PWD}/ports/deploy/DeployTools"
python3 ports/deploy/deploy.py python3 ports/deploy/deploy.py
fi fi