add versioning info

dev
4yn 2021-05-05 15:52:01 +08:00
parent 4a189cfb01
commit 3097ea5235
9 changed files with 91 additions and 47 deletions

View File

@ -4,9 +4,7 @@ name: Build
on:
push:
branches: [gh-actions]
pull_request:
branches: [gh-actions]
branches: dev
jobs:
windows_build:
@ -46,5 +44,19 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@master
with:
name: Game
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

3
.gitignore vendored
View File

@ -1,5 +1,4 @@
.vs/
build/
res/chart/*
!res/chart/.gitkeep
dist/
src/src/version.rc

View File

@ -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}")

View File

@ -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>/
)

View File

@ -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)");

View File

@ -0,0 +1 @@
#define VERSION_STRING "@PROJECT_VERSION@"

26
static/README.txt 100644
View File

@ -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