mirror of https://github.com/4yn/brokenithm-kb
add versioning info
parent
4a189cfb01
commit
3097ea5235
|
@ -4,47 +4,59 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [gh-actions]
|
||||
pull_request:
|
||||
branches: [gh-actions]
|
||||
branches: dev
|
||||
|
||||
jobs:
|
||||
windows_build:
|
||||
name: Windows build
|
||||
runs-on: windows-latest
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
windows_build:
|
||||
name: Windows build
|
||||
runs-on: windows-latest
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache vcpkg
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: vcpkg
|
||||
key: ${{ runner.os }}-vcpkg-${{ hashFiles('build.windows') }}
|
||||
|
||||
- name: vcpkg
|
||||
run: |
|
||||
if(!(Test-Path .\vcpkg))
|
||||
{
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
.\bootstrap-vcpkg.bat
|
||||
.\vcpkg.exe integrate install
|
||||
.\vcpkg.exe install '@${{ github.workspace }}/build.windows'
|
||||
}
|
||||
- name: Cache vcpkg
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: vcpkg
|
||||
key: ${{ runner.os }}-vcpkg-${{ hashFiles('build.windows') }}
|
||||
|
||||
- name: vcpkg
|
||||
run: |
|
||||
if(!(Test-Path .\vcpkg))
|
||||
{
|
||||
git clone https://github.com/microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
.\bootstrap-vcpkg.bat
|
||||
.\vcpkg.exe integrate install
|
||||
.\vcpkg.exe install '@${{ github.workspace }}/build.windows'
|
||||
}
|
||||
|
||||
- name: cmake
|
||||
run: cmake -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake -G "Visual Studio 16 2019" -A x64 .
|
||||
- name: cmake
|
||||
run: cmake -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake -G "Visual Studio 16 2019" -A x64 .
|
||||
|
||||
- name: Setup MSBuild.exe
|
||||
uses: microsoft/Setup-MSBuild@v1.0.2
|
||||
- name: Setup MSBuild.exe
|
||||
uses: microsoft/Setup-MSBuild@v1.0.2
|
||||
|
||||
- name: MSBuild
|
||||
run: msbuild brokenithm-kb.sln -p:Configuration=Release /m /verbosity:minimal
|
||||
- name: MSBuild
|
||||
run: msbuild brokenithm-kb.sln -p:Configuration=Release /m /verbosity:minimal
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Game
|
||||
path: bin
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: brokenithm-kb
|
||||
path: bin
|
||||
|
||||
- name: Zip release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: montudor/action-zip@v1
|
||||
with:
|
||||
args: zip -qq -r brokenithm-kb.zip zip
|
||||
|
||||
- name: Create release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: marvinpinto/action-automatic-releases@v1.1.2
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
draft: true
|
||||
files: brokenithm-kb.zip
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
.vs/
|
||||
build/
|
||||
res/chart/*
|
||||
!res/chart/.gitkeep
|
||||
dist/
|
||||
src/src/version.rc
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
set(CMAKE_SYSTEM_VERSION "10.0.18362")
|
||||
# set(CMAKE_SYSTEM_VERSION "10.0.19041")
|
||||
set(CMAKE_SYSTEM_VERSION "10.0.19041")
|
||||
|
||||
project(brokenithm-kb VERSION 0.2.0)
|
||||
project(brokenithm-kb VERSION 0.1.1)
|
||||
|
||||
message("Using kit " "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@ add_subdirectory(Vendor)
|
|||
|
||||
set(SRCROOT ${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
||||
|
||||
# Inject version number
|
||||
configure_file(
|
||||
${SRCROOT}/version.rc.in
|
||||
${SRCROOT}/version.rc
|
||||
@ONLY)
|
||||
|
||||
file(GLOB SRC "${SRCROOT}/*.cpp" "${SRCROOT}/*.hpp" "${SRCROOT}/*.rc")
|
||||
source_group("Sources" FILES ${SRC})
|
||||
|
||||
|
@ -17,5 +23,5 @@ target_link_libraries(brokenithm-kb PRIVATE uws optparse spdlog)
|
|||
add_custom_command(
|
||||
TARGET brokenithm-kb POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/res/ $<TARGET_FILE_DIR:brokenithm-kb>/res/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/scripts/ $<TARGET_FILE_DIR:brokenithm-kb>/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/static/ $<TARGET_FILE_DIR:brokenithm-kb>/
|
||||
)
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "KeyboardSimulator.hpp"
|
||||
#include "Utils.hpp"
|
||||
|
||||
#include "version.rc"
|
||||
|
||||
std::string banner = R"(
|
||||
_ _ _ _ _ _ _
|
||||
| |__ _ __ ___ | | _____ _ __ (_) |_| |__ _ __ ___ | | _| |__
|
||||
|
@ -12,8 +14,7 @@ std::string banner = R"(
|
|||
| |_) | | | (_) | < __/ | | | | |_| | | | | | | | |_____| <| |_) |
|
||||
|_.__/|_| \___/|_|\_\___|_| |_|_|\__|_| |_|_| |_| |_| |_|\_\_.__/
|
||||
=======================================================================
|
||||
Brokenithm controller for keyboard output, by github/@4yn
|
||||
)";
|
||||
Brokenithm controller for keyboard output, by @4yn, v)" VERSION_STRING;
|
||||
|
||||
std::string epilog = R"(
|
||||
Open the URL displayed on a touch-enabled device (big iPads recommended)
|
||||
|
@ -24,13 +25,13 @@ correct firewall access is granted.
|
|||
Built for use with simulators like Seaurchin and SUSPlayer.
|
||||
Keyboard output follows the Yuancon specification.
|
||||
|
||||
Find more options with: ./brokenithm-kb.exe -h
|
||||
)";
|
||||
Read more at https://github.com/4yn/brokenithm-kb)";
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
optparse::OptionParser parser = optparse::OptionParser()
|
||||
.description(banner.substr(1))
|
||||
.version(VERSION_STRING)
|
||||
.epilog(epilog.substr(1));
|
||||
|
||||
parser.add_option("-p", "--port").dest("port").type("int").set_default(1116).help("Port to listen on (1-65535)");
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#define VERSION_STRING "@PROJECT_VERSION@"
|
|
@ -0,0 +1,26 @@
|
|||
_ _ _ _ _ _ _
|
||||
| |__ _ __ ___ | | _____ _ __ (_) |_| |__ _ __ ___ | | _| |__
|
||||
| '_ \| '__/ _ \| |/ / _ \ '_ \| | __| '_ \| '_ ` _ \ _____| |/ / '_ \
|
||||
| |_) | | | (_) | < __/ | | | | |_| | | | | | | | |_____| <| |_) |
|
||||
|_.__/|_| \___/|_|\_\___|_| |_|_|\__|_| |_|_| |_| |_| |_|\_\_.__/
|
||||
=======================================================================
|
||||
Brokenithm controller for keyboard output, by @4yn
|
||||
|
||||
Open the URL displayed on a touch-enabled device (big iPads recommended)
|
||||
connected to the same wifi access point as your windows machine.
|
||||
Running a hotspot from your windows machine also works. Make sure
|
||||
correct firewall access is granted.
|
||||
|
||||
Built for use with simulators like Seaurchin and SUSPlayer.
|
||||
Keyboard output follows the Yuancon specification.
|
||||
|
||||
Read more at https://github.com/4yn/brokenithm-kb
|
||||
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
v0.1.1
|
||||
- Removed openssl/zlib bloat
|
||||
|
||||
v0.1
|
||||
- Initial release
|
Loading…
Reference in New Issue