-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
580 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: releaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+alpha[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+beta[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
shell: cmd | ||
run: | | ||
mkdir build | ||
cd build | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | ||
cmake -G "Visual Studio 17" -A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_EXE=1 .. | ||
cmake --build . --config Release | ||
- name: Upload binaries | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: exe | ||
path: | | ||
build/src/exe/Release/* | ||
create-release: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} | ||
- uses: actions/checkout@v3 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
- name: Build package | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DBUILD_PACKAGE=1 .. | ||
cmake --build . --target copy_script | ||
- name: Copy binary | ||
run: | | ||
rm exe/aviutl_browser.exp | ||
rm exe/aviutl_browser.lib | ||
mv exe build/bin/script/browser/ | ||
- name: Zip | ||
run: cd build/bin && zip -r ../../${{ steps.get_version.outputs.tag }}.zip * | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
body: | | ||
### ダウンロード | ||
- [aviutl_browser_${{ steps.get_version.outputs.tag }}.zip](https://github.com/oov/aviutl_browser/releases/download/${{ steps.get_version.outputs.tag }}/aviutl_browser_${{ steps.get_version.outputs.tag }}.zip) | ||
### 変更点 | ||
- **** | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./${{ steps.get_version.outputs.tag }}.zip | ||
asset_name: aviutl_browser_${{ steps.get_version.outputs.tag }}.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,223 +1,45 @@ | ||
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights | ||
# reserved. Use of this source code is governed by a BSD-style license that | ||
# can be found in the LICENSE file. | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
project(aviutl_browser_package NONE) | ||
|
||
if("${BUILD_PACKAGE}" STREQUAL "1") | ||
|
||
set(EMOJI_VERSION "v0.0.2") | ||
set(EMOJI_URL "https://github.com/oov/aviutl_browser_emoji/releases/download/${EMOJI_VERSION}/aviutl_browser_emoji_${EMOJI_VERSION}.zip") | ||
set(EMOJI_PATH "${CMAKE_CURRENT_BINARY_DIR}/emoji.zip") | ||
set(EMOJI_DIR "${CMAKE_CURRENT_BINARY_DIR}/emoji") | ||
if(NOT EXISTS "${EMOJI_PATH}") | ||
file(DOWNLOAD "${EMOJI_URL}" "${EMOJI_PATH}") | ||
endif() | ||
if(NOT EXISTS "${EMOJI_DIR}") | ||
file(MAKE_DIRECTORY "${EMOJI_DIR}") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvzf "${EMOJI_PATH}" WORKING_DIRECTORY "${EMOJI_DIR}") | ||
endif() | ||
|
||
set(MARKDOWN_VERSION "v0.0.3") | ||
set(MARKDOWN_URL "https://github.com/oov/aviutl_browser_markdown/releases/download/${MARKDOWN_VERSION}/aviutl_browser_markdown_${MARKDOWN_VERSION}.zip") | ||
set(MARKDOWN_PATH "${CMAKE_CURRENT_BINARY_DIR}/markdown.zip") | ||
set(MARKDOWN_DIR "${CMAKE_CURRENT_BINARY_DIR}/markdown") | ||
if(NOT EXISTS "${MARKDOWN_PATH}") | ||
file(DOWNLOAD "${MARKDOWN_URL}" "${MARKDOWN_PATH}") | ||
endif() | ||
if(NOT EXISTS "${MARKDOWN_DIR}") | ||
file(MAKE_DIRECTORY "${MARKDOWN_DIR}") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvzf "${MARKDOWN_PATH}" WORKING_DIRECTORY "${MARKDOWN_DIR}") | ||
endif() | ||
|
||
add_custom_target(copy_script | ||
COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/README.md" "${PROJECT_BINARY_DIR}/bin/aviutl_browser.txt" | ||
COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/LICENSES.chromium.html" "${PROJECT_BINARY_DIR}/bin/LICENSES.chromium.html" | ||
COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/src/lua/browser.lua" "${PROJECT_BINARY_DIR}/bin/script/browser/browser.lua" | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${EMOJI_DIR}" "${PROJECT_BINARY_DIR}/bin" | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${MARKDOWN_DIR}" "${PROJECT_BINARY_DIR}/bin" | ||
) | ||
|
||
# OVERVIEW | ||
# | ||
# CMake is a cross-platform open-source build system that can generate project | ||
# files in many different formats. It can be downloaded from | ||
# http://www.cmake.org or installed via a platform package manager. | ||
# | ||
# CMake-generated project formats that have been tested with this CEF binary | ||
# distribution include: | ||
# | ||
# Linux: Ninja, GCC 7.5.0+, Unix Makefiles | ||
# MacOS: Ninja, Xcode 12.2 to 13.0 | ||
# Windows: Ninja, Visual Studio 2019+ | ||
# | ||
# Ninja is a cross-platform open-source tool for running fast builds using | ||
# pre-installed platform toolchains (GNU, clang, Xcode or MSVC). It can be | ||
# downloaded from http://martine.github.io/ninja/ or installed via a platform | ||
# package manager. | ||
# | ||
# CMAKE STRUCTURE | ||
# | ||
# This CEF binary distribution includes the following CMake files: | ||
# | ||
# CMakeLists.txt Bootstrap that sets up the CMake environment. | ||
# cmake/*.cmake CEF configuration files shared by all targets. | ||
# libcef_dll/CMakeLists.txt Defines the libcef_dll_wrapper target. | ||
# tests/*/CMakeLists.txt Defines the test application target. | ||
# | ||
# See the "TODO:" comments below for guidance on how to integrate this CEF | ||
# binary distribution into a new or existing CMake project. | ||
# | ||
# BUILD REQUIREMENTS | ||
# | ||
# The below requirements must be met to build this CEF binary distribution. | ||
# | ||
# - CMake version 3.19 or newer. | ||
# | ||
# - Linux requirements: | ||
# Currently supported distributions include Debian 10 (Buster), Ubuntu 18 | ||
# (Bionic Beaver), and related. Ubuntu 18.04 64-bit with GCC 7.5.0+ is | ||
# recommended. Newer versions will likely also work but may not have been | ||
# tested. | ||
# Required packages include: | ||
# build-essential | ||
# libgtk3.0-dev (required by the cefclient target only) | ||
# | ||
# - MacOS requirements: | ||
# Xcode 12.2 to 13.0 building on MacOS 10.15.4 (Catalina) or newer. Only | ||
# 64-bit builds are supported. The Xcode command-line tools must also be | ||
# installed. Newer Xcode versions may not have been been tested and are not | ||
# recommended. | ||
# | ||
# - Windows requirements: | ||
# Visual Studio 2019 or newer building on Windows 7 or newer. Windows 10 | ||
# 64-bit is recommended. Newer versions will likely also work but may not have | ||
# been tested. | ||
# | ||
# BUILD EXAMPLES | ||
# | ||
# The below commands will generate project files and create a Debug build of all | ||
# CEF targets using CMake and the platform toolchain. | ||
# | ||
# Start by creating and entering the CMake build output directory: | ||
# > cd path/to/cef_binary_* | ||
# > mkdir build && cd build | ||
# | ||
# To perform a Linux build using a 32-bit CEF binary distribution on a 32-bit | ||
# Linux platform or a 64-bit CEF binary distribution on a 64-bit Linux platform: | ||
# Using Unix Makefiles: | ||
# > cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. | ||
# > make -j4 cefclient cefsimple | ||
# | ||
# Using Ninja: | ||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. | ||
# > ninja cefclient cefsimple | ||
# | ||
# To perform a MacOS build using a 64-bit CEF binary distribution: | ||
# Using the Xcode IDE: | ||
# > cmake -G "Xcode" -DPROJECT_ARCH="x86_64" .. | ||
# Open build\cef.xcodeproj in Xcode and select Product > Build. | ||
# | ||
# Using Ninja: | ||
# > cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=Debug .. | ||
# > ninja cefclient cefsimple | ||
# | ||
# To perform a MacOS build using an ARM64 CEF binary distribution: | ||
# Using the Xcode IDE: | ||
# > cmake -G "Xcode" -DPROJECT_ARCH="arm64" .. | ||
# Open build\cef.xcodeproj in Xcode and select Product > Build. | ||
# | ||
# Using Ninja: | ||
# > cmake -G "Ninja" -DPROJECT_ARCH="arm64" -DCMAKE_BUILD_TYPE=Debug .. | ||
# > ninja cefclient cefsimple | ||
# | ||
# To perform a Windows build using a 32-bit CEF binary distribution: | ||
# Using the Visual Studio 2019 IDE: | ||
# > cmake -G "Visual Studio 16" -A Win32 .. | ||
# Open build\cef.sln in Visual Studio and select Build > Build Solution. | ||
# | ||
# Using Ninja with Visual Studio 2019 command-line tools: | ||
# (this path may be different depending on your Visual Studio installation) | ||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat" | ||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. | ||
# > ninja cefclient cefsimple | ||
# | ||
# To perform a Windows build using a 64-bit CEF binary distribution: | ||
# Using the Visual Studio 2019 IDE: | ||
# > cmake -G "Visual Studio 16" -A x64 .. | ||
# Open build\cef.sln in Visual Studio and select Build > Build Solution. | ||
# | ||
# Using Ninja with Visual Studio 2019 command-line tools: | ||
# (this path may be different depending on your Visual Studio installation) | ||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" | ||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. | ||
# > ninja cefclient cefsimple | ||
# | ||
# To perform a Windows build using an ARM64 CEF binary distribution: | ||
# Using the Visual Studio 2019 IDE: | ||
# > cmake -G "Visual Studio 16" -A arm64 .. | ||
# Open build\cef.sln in Visual Studio and select Build > Build Solution. | ||
# | ||
# Using Ninja with Visual Studio 2019 command-line tools: | ||
# (this path may be different depending on your Visual Studio installation) | ||
# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" | ||
# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. | ||
# > ninja cefsimple | ||
|
||
# | ||
# Global setup. | ||
# | ||
|
||
# For VS2019 and Xcode 12+ support. | ||
cmake_minimum_required(VERSION 3.19) | ||
|
||
# Only generate Debug and Release configuration types. | ||
set(CMAKE_CONFIGURATION_TYPES Debug Release) | ||
|
||
# Project name. | ||
# TODO: Change this line to match your project name when you copy this file. | ||
project(aviutl_browser) | ||
|
||
# Use folders in the resulting project files. | ||
set_property(GLOBAL PROPERTY OS_FOLDERS ON) | ||
|
||
|
||
# | ||
# CEF_ROOT setup. | ||
# This variable must be set to locate the binary distribution. | ||
|
||
set(CEF_URL "https://cef-builds.spotifycdn.com/cef_binary_99.2.14%2Bg3f796b8%2Bchromium-99.0.4844.84_windows64_minimal.tar.bz2") | ||
set(CEF_ARCHIVE_PATH "${CMAKE_BINARY_DIR}/cef.tar.bz2") | ||
set(CEF_DIR "${CMAKE_BINARY_DIR}/cef") | ||
|
||
set(CEF_ROOT "${CEF_DIR}") | ||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CEF_ROOT}/cmake") | ||
|
||
if(NOT EXISTS "${CEF_ARCHIVE_PATH}") | ||
file(DOWNLOAD "${CEF_URL}" "${CEF_ARCHIVE_PATH}") | ||
endif() | ||
|
||
if(NOT EXISTS "${CEF_DIR}") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvzf "${CEF_ARCHIVE_PATH}" WORKING_DIRECTORY "${CMAKE_BINARY_DIR}") | ||
file(GLOB old_dir LIST_DIRECTORIES true "${CMAKE_BINARY_DIR}/cef_binary_*") | ||
file(RENAME "${old_dir}" "${CEF_DIR}") | ||
endif() | ||
if("${BUILD_EXE}" STREQUAL "1") | ||
|
||
set(EMOJI_VERSION "v0.0.2") | ||
set(EMOJI_URL "https://github.com/oov/aviutl_browser_emoji/releases/download/${EMOJI_VERSION}/aviutl_browser_emoji_${EMOJI_VERSION}.zip") | ||
set(EMOJI_PATH "${CMAKE_CURRENT_BINARY_DIR}/emoji.zip") | ||
set(EMOJI_DIR "${CMAKE_CURRENT_BINARY_DIR}/emoji") | ||
if(NOT EXISTS "${EMOJI_PATH}") | ||
file(DOWNLOAD "${EMOJI_URL}" "${EMOJI_PATH}") | ||
endif() | ||
if(NOT EXISTS "${EMOJI_DIR}") | ||
file(MAKE_DIRECTORY "${EMOJI_DIR}") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvzf "${EMOJI_PATH}" WORKING_DIRECTORY "${EMOJI_DIR}") | ||
endif() | ||
add_subdirectory(src) | ||
|
||
set(MARKDOWN_VERSION "v0.0.3") | ||
set(MARKDOWN_URL "https://github.com/oov/aviutl_browser_markdown/releases/download/${MARKDOWN_VERSION}/aviutl_browser_markdown_${MARKDOWN_VERSION}.zip") | ||
set(MARKDOWN_PATH "${CMAKE_CURRENT_BINARY_DIR}/markdown.zip") | ||
set(MARKDOWN_DIR "${CMAKE_CURRENT_BINARY_DIR}/markdown") | ||
if(NOT EXISTS "${MARKDOWN_PATH}") | ||
file(DOWNLOAD "${MARKDOWN_URL}" "${MARKDOWN_PATH}") | ||
endif() | ||
if(NOT EXISTS "${MARKDOWN_DIR}") | ||
file(MAKE_DIRECTORY "${MARKDOWN_DIR}") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvzf "${MARKDOWN_PATH}" WORKING_DIRECTORY "${MARKDOWN_DIR}") | ||
endif() | ||
|
||
add_custom_target(copy_script | ||
COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/README.md" "${PROJECT_BINARY_DIR}/bin/aviutl_browser.txt" | ||
COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/LICENSES.chromium.html" "${PROJECT_BINARY_DIR}/bin/LICENSES.chromium.html" | ||
COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/src/lua/browser.lua" "${PROJECT_BINARY_DIR}/bin/script/browser/browser.lua" | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${EMOJI_DIR}" "${PROJECT_BINARY_DIR}/bin" | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${MARKDOWN_DIR}" "${PROJECT_BINARY_DIR}/bin" | ||
) | ||
|
||
# | ||
# Load the CEF configuration. | ||
# | ||
|
||
# Execute FindCEF.cmake which must exist in CMAKE_MODULE_PATH. | ||
find_package(CEF REQUIRED) | ||
|
||
|
||
# | ||
# Define CEF-based targets. | ||
# | ||
|
||
# Include the libcef_dll_wrapper target. | ||
# Comes from the libcef_dll/CMakeLists.txt file in the binary distribution | ||
# directory. | ||
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper) | ||
|
||
add_subdirectory(src) | ||
|
||
# Display configuration settings. | ||
PRINT_CEF_CONFIG() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.