mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-30 15:23:01 +00:00
ci: Build Installers and rename to StreamFX
This commit is contained in:
parent
133d8cf599
commit
a99030f5c0
4 changed files with 53 additions and 46 deletions
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
@ -25,17 +25,20 @@ jobs:
|
|||
with:
|
||||
node-version: 10
|
||||
- name: Configure & Compile
|
||||
shell: bash
|
||||
env:
|
||||
CMAKE_GENERATOR_32: ${{ matrix.generator_32 }}
|
||||
CMAKE_GENERATOR_64: ${{ matrix.generator_64 }}
|
||||
CMAKE_SYSTEM_VERSION: ${{ matrix.sysversion }}
|
||||
run: node ./ci/builder.js
|
||||
- name: Package
|
||||
shell: bash
|
||||
env:
|
||||
CMAKE_GENERATOR_32: ${{ matrix.generator_32 }}
|
||||
CMAKE_GENERATOR_64: ${{ matrix.generator_64 }}
|
||||
run: |
|
||||
mkdir build/package
|
||||
ls build/
|
||||
node ./ci/packager.js
|
||||
- name: "Package Installer (Prereqs)"
|
||||
run: |
|
||||
|
|
|
@ -38,7 +38,7 @@ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
|
|||
set(VERSION_TWEAK ${GIT_OUTPUT})
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND git rev-parse HEAD
|
||||
COMMAND git rev-parse --short=8 HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
RESULT_VARIABLE GIT_RESULT
|
||||
OUTPUT_VARIABLE GIT_OUTPUT
|
||||
|
@ -51,11 +51,11 @@ endif()
|
|||
|
||||
# Define Project
|
||||
project(
|
||||
obs-stream-effects
|
||||
StreamFX
|
||||
VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}
|
||||
)
|
||||
set(PROJECT_FULL_NAME "Stream Effects for OBS Studio")
|
||||
set(PROJECT_DESCRIPTION "New Sources, Filters and Transitions for OBS Studio")
|
||||
set(PROJECT_FULL_NAME "StreamFX for OBS Studio")
|
||||
set(PROJECT_DESCRIPTION "Adds new Effects, like Sources, Transitions and Filters to OBS Studio.")
|
||||
set(PROJECT_AUTHORS "Michael Fabian 'Xaymar' Dirks <info@xaymar.com>")
|
||||
set(PROJECT_COPYRIGHT_YEARS "2018 - 2019")
|
||||
|
||||
|
@ -81,7 +81,7 @@ endif()
|
|||
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
|
||||
if("${BITS}" STREQUAL "32")
|
||||
set(ARCH "x86")
|
||||
message(STATUS "Stream Effects no longer supports 32-bit builds, you are on your own if you continue.")
|
||||
message(STATUS "StreamFX no longer supports 32-bit builds, you are on your own if you continue.")
|
||||
else()
|
||||
set(ARCH "x64")
|
||||
endif()
|
||||
|
@ -121,7 +121,28 @@ set(_CXX_STANDARD 17)
|
|||
set(_CXX_EXTENSIONS OFF)
|
||||
|
||||
################################################################################
|
||||
# CMake / Compiler
|
||||
# Options
|
||||
################################################################################
|
||||
set(${PropertyPrefix}OBS_NATIVE FALSE CACHE BOOL "Use native obs-studio build" FORCE)
|
||||
set(${PropertyPrefix}OBS_REFERENCE FALSE CACHE BOOL "Use referenced obs-studio build" FORCE)
|
||||
set(${PropertyPrefix}OBS_PACKAGE FALSE CACHE BOOL "Use packaged obs-studio build" FORCE)
|
||||
set(${PropertyPrefix}OBS_DOWNLOAD FALSE CACHE BOOL "Use downloaded obs-studio build" FORCE)
|
||||
mark_as_advanced(FORCE OBS_NATIVE OBS_PACKAGE OBS_REFERENCE OBS_DOWNLOAD)
|
||||
|
||||
if(NOT TARGET libobs)
|
||||
set(${PropertyPrefix}OBS_STUDIO_DIR "" CACHE PATH "OBS Studio Source/Package Directory")
|
||||
set(${PropertyPrefix}OBS_DOWNLOAD_VERSION "24.0.3-ci" CACHE STRING "OBS Studio Version to download")
|
||||
endif()
|
||||
|
||||
if(NOT ${PropertyPrefix}OBS_NATIVE)
|
||||
set(${PropertyPrefix}OBS_DEPENDENCIES_DIR "" CACHE PATH "Path to OBS Dependencies")
|
||||
set(CMAKE_PACKAGE_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "Path for generated archives.")
|
||||
set(CMAKE_PACKAGE_NAME "${PROJECT_NAME}" CACHE STRING "Name for the generated archives.")
|
||||
set(CMAKE_PACKAGE_SUFFIX_OVERRIDE "" CACHE STRING "Override for the suffix.")
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
# CMake / Compiler Dependencies
|
||||
################################################################################
|
||||
|
||||
# Configure Version Header
|
||||
|
@ -134,9 +155,23 @@ configure_file(
|
|||
"${PROJECT_BINARY_DIR}/source/module.cpp"
|
||||
)
|
||||
|
||||
# Packaging
|
||||
if("${CMAKE_PACKAGE_SUFFIX_OVERRIDE}" STREQUAL "")
|
||||
set(_PACKAGE_SUFFIX_OVERRIDE "${PROJECT_VERSION}-${PROJECT_COMMIT}")
|
||||
else()
|
||||
set(_PACKAGE_SUFFIX_OVERRIDE "${CMAKE_PACKAGE_SUFFIX_OVERRIDE}")
|
||||
endif()
|
||||
set(_PACKAGE_FULL_NAME "${CMAKE_PACKAGE_PREFIX}/${CMAKE_PACKAGE_NAME}-${_PACKAGE_SUFFIX_OVERRIDE}")
|
||||
|
||||
# Windows
|
||||
if(WIN32)
|
||||
## Installer (InnoSetup)
|
||||
get_filename_component(ISS_FILES_DIR "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
|
||||
file(TO_NATIVE_PATH "${ISS_FILES_DIR}" ISS_FILES_DIR)
|
||||
get_filename_component(ISS_PACKAGE_DIR "${CMAKE_PACKAGE_PREFIX}" ABSOLUTE)
|
||||
file(TO_NATIVE_PATH "${ISS_PACKAGE_DIR}" ISS_PACKAGE_DIR)
|
||||
get_filename_component(ISS_SOURCE_DIR "${PROJECT_SOURCE_DIR}" ABSOLUTE)
|
||||
file(TO_NATIVE_PATH "${ISS_SOURCE_DIR}" ISS_SOURCE_DIR)
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/cmake/installer.iss.in"
|
||||
"${PROJECT_BINARY_DIR}/installer.iss"
|
||||
|
@ -156,31 +191,6 @@ if(WIN32)
|
|||
)
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
# Options
|
||||
################################################################################
|
||||
set(${PropertyPrefix}OBS_NATIVE FALSE CACHE BOOL "Use native obs-studio build" FORCE)
|
||||
set(${PropertyPrefix}OBS_REFERENCE FALSE CACHE BOOL "Use referenced obs-studio build" FORCE)
|
||||
set(${PropertyPrefix}OBS_PACKAGE FALSE CACHE BOOL "Use packaged obs-studio build" FORCE)
|
||||
set(${PropertyPrefix}OBS_DOWNLOAD FALSE CACHE BOOL "Use downloaded obs-studio build" FORCE)
|
||||
mark_as_advanced(FORCE OBS_NATIVE OBS_PACKAGE OBS_REFERENCE OBS_DOWNLOAD)
|
||||
|
||||
if(NOT TARGET libobs)
|
||||
set(${PropertyPrefix}OBS_STUDIO_DIR "" CACHE PATH "OBS Studio Source/Package Directory")
|
||||
set(${PropertyPrefix}OBS_DOWNLOAD_VERSION "24.0.0-rc2-ci" CACHE STRING "OBS Studio Version to download")
|
||||
endif()
|
||||
|
||||
if(NOT ${PropertyPrefix}OBS_NATIVE)
|
||||
set(${PropertyPrefix}OBS_DEPENDENCIES_DIR "" CACHE PATH "Path to OBS Dependencies")
|
||||
set(CMAKE_PACKAGE_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "Path for generated archives.")
|
||||
set(CMAKE_PACKAGE_NAME "${PROJECT_NAME}" CACHE STRING "Name for the generated archives.")
|
||||
set(CMAKE_PACKAGE_SUFFIX_OVERRIDE "" CACHE STRING "Override for the suffix.")
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
# Dependencies
|
||||
################################################################################
|
||||
|
||||
# Detect OBS Studio Type
|
||||
if(TARGET libobs)
|
||||
message(STATUS "${PROJECT_NAME}: Using native obs-studio.")
|
||||
|
@ -568,22 +578,16 @@ else()
|
|||
DESTINATION "./data/obs-plugins/${PROJECT_NAME}/"
|
||||
)
|
||||
|
||||
if("${CMAKE_PACKAGE_SUFFIX_OVERRIDE}" STREQUAL "")
|
||||
set(PackageFullName "${CMAKE_PACKAGE_PREFIX}/${CMAKE_PACKAGE_NAME}-${PROJECT_VERSION}")
|
||||
else()
|
||||
set(PackageFullName "${CMAKE_PACKAGE_PREFIX}/${CMAKE_PACKAGE_NAME}-${CMAKE_PACKAGE_SUFFIX_OVERRIDE}")
|
||||
endif()
|
||||
|
||||
add_custom_target(
|
||||
PACKAGE_7Z
|
||||
${CMAKE_COMMAND} -E tar cfv "${PackageFullName}.7z" --format=7zip --
|
||||
${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.7z" --format=7zip --
|
||||
"${CMAKE_INSTALL_PREFIX}/obs-plugins"
|
||||
"${CMAKE_INSTALL_PREFIX}/data"
|
||||
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
add_custom_target(
|
||||
PACKAGE_ZIP
|
||||
${CMAKE_COMMAND} -E tar cfv "${PackageFullName}.zip" --format=zip --
|
||||
${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.zip" --format=zip --
|
||||
"${CMAKE_INSTALL_PREFIX}/obs-plugins"
|
||||
"${CMAKE_INSTALL_PREFIX}/data"
|
||||
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
|
||||
|
|
|
@ -11,9 +11,9 @@ if ((process.platform == "win32") || (process.platform == "win64")) {
|
|||
// Windows
|
||||
let extra_conf = [
|
||||
`-DCMAKE_SYSTEM_VERSION=${process.env.CMAKE_SYSTEM_VERSION}`,
|
||||
`-DCMAKE_PACKAGE_NAME=obs-ffmpeg-encoder`,
|
||||
'-DCMAKE_INSTALL_PREFIX="build/distrib/"',
|
||||
'-DCMAKE_PACKAGE_PREFIX="build/package/"',
|
||||
`-DCMAKE_PACKAGE_NAME=StreamFX`,
|
||||
'-DCMAKE_INSTALL_PREFIX="build/distrib"',
|
||||
'-DCMAKE_PACKAGE_PREFIX="build/package"',
|
||||
];
|
||||
let extra_build = [
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ AppUpdatesURL={#MyAppURL}
|
|||
DefaultDirName={code:GetDirName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
AllowNoIcons=yes
|
||||
LicenseFile="@PROJECT_SOURCE_DIR@/LICENSE"
|
||||
OutputDir="@CMAKE_INSTALL_PREFIX@/../"
|
||||
OutputBaseFilename=obs-stream-effects-{#MyAppVersion}-@PROJECT_COMMIT@
|
||||
LicenseFile="@ISS_SOURCE_DIR@/LICENSE"
|
||||
OutputDir="@ISS_PACKAGE_DIR@"
|
||||
OutputBaseFilename=@CMAKE_PACKAGE_NAME@-@_PACKAGE_SUFFIX_OVERRIDE@
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
VersionInfoVersion={#MyAppVersion}
|
||||
|
@ -34,7 +34,7 @@ VersionInfoDescription={#MyAppName} Setup
|
|||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Files]
|
||||
Source: "@CMAKE_INSTALL_PREFIX@/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "@ISS_FILES_DIR@/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
|
|
Loading…
Reference in a new issue