Skip to content

Commit

Permalink
Merge pull request #62 from oblivioncth/feature/fp_12
Browse files Browse the repository at this point in the history
Migrate support to Flashpoint 12
  • Loading branch information
oblivioncth authored Jul 24, 2023
2 parents 8b3af91 + d9a485c commit 3e49604
Show file tree
Hide file tree
Showing 62 changed files with 2,443 additions and 1,592 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build-clifp-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
compiler: [gcc, clang]
compiler: [clang]
lib_linkage: [shared, static]
include:
- os: ubuntu-20.04
compiler: gcc
c_comp: gcc-10
cxx_comp: g++-10
qt_comp: clang12
- os: ubuntu-20.04
compiler: clang
c_comp: clang-12
Expand All @@ -36,6 +31,13 @@ jobs:
c_comp: gcc-12
cxx_comp: g++-12
qt_comp: clang14
lib_linkage: shared
- os: ubuntu-22.04
compiler: gcc
c_comp: gcc-12
cxx_comp: g++-12
qt_comp: clang14
lib_linkage: static
- os: ubuntu-22.04
compiler: clang
c_comp: clang-14
Expand All @@ -44,7 +46,7 @@ jobs:
- lib_linkage: shared
cmake_bsl: ON
- lib_linkage: static
cmake_bsl: OFF
cmake_bsl: OFF
runs-on: ${{ matrix.os }}
env:
cmake_gen: Ninja Multi-Config
Expand Down
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.24.0...3.25.0)
project(CLIFp
VERSION 0.9.4.1
LANGUAGES CXX
DESCRIPTION "Command-line Interface for Flashpoint"
DESCRIPTION "Command-line Interface for Flashpoint Archive"
)

# Get helper scripts
Expand All @@ -21,7 +21,7 @@ ob_standard_project_setup()

# Additional Project Variables
set(PROJECT_FORMAL_NAME "CLI Flashpoint")
set(TARGET_FP_VERSION_PREFIX 11.1)
set(TARGET_FP_VERSION_PREFIX 12.0)

# Configuration options
# Handled by fetched libs, but set this here formally since they aren't part of the main project
Expand Down Expand Up @@ -72,18 +72,18 @@ endif()

include(OB/FetchQx)
ob_fetch_qx(
REF "v0.5.0.1"
REF "5c4b3a0f84f6d4e42da9a431f887aafdfb9aae32"
COMPONENTS
${CLIFP_QX_COMPONENTS}
)

# Fetch libfp (build and import from source)
include(OB/Fetchlibfp)
ob_fetch_libfp("v0.3.1")
ob_fetch_libfp("7107ca019544ae8c656ff7280f6f46f7c921ac8d")

# Fetch QI-QMP (build and import from source)
include(OB/FetchQI-QMP)
ob_fetch_qi_qmp("v0.2.1")
ob_fetch_qi_qmp("b99be49cd0ec71f9c3c398676be147cb68452bb9")

# Fetch QuaZip (build and import from source)
include(OB/FetchQuaZip)
Expand All @@ -94,7 +94,7 @@ ob_fetch_quazip(

# Fetch Neargye's Magic Enum
include(OB/FetchMagicEnum)
ob_fetch_magicenum("v0.8.0")
ob_fetch_magicenum("v0.9.3")

# Process Targets
set(APP_TARGET_NAME ${PROJECT_NAMESPACE_LC}_${PROJECT_NAMESPACE_LC})
Expand All @@ -118,4 +118,3 @@ ob_standard_project_misc_install()

include(OB/Packaging)
ob_standard_project_package(VENDOR "oblivioncth")

53 changes: 2 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CLIFp (Command-line Interface for Flashpoint)
<img align="left" src="https://i.imgur.com/U6aDFSt.png" width=20%>

CLIFp (pronounced "Cliff-P") is a command-line interface for [BlueMaxima's Flashpoint](https://bluemaxima.org/flashpoint/) project that allows starting games/animations from within the collection via a system's command parser and contextual arguments. While it is a separate application, CLIFp functions closely to that of a native CLI by parsing the configuration of the Flashpoint install it is deployed into and therefore launches games/animation in the same manner as the standard GUI launcher.
CLIFp (pronounced "Cliff-P") is a command-line interface for [Flashpoint Archive](https://flashpointarchive.org/) that allows starting games/animations from within the collection via a system's command parser and contextual arguments. While it is a separate application, CLIFp functions closely to that of a native CLI by parsing the configuration of the Flashpoint install it is deployed into and therefore launches games/animation in the same manner as the standard GUI launcher.

Other than a few pop-up dialogs used for alerts and errors, CLIFp runs completely in the background so that the only windows seen during use are the same ones present while running standard Flashpoint. It automatically terminates once the target application has exited, requiring no manual tasks or clean-up by the user.

Expand All @@ -22,7 +22,7 @@ All Flashpoint features are supported, other than editing the local database and
While testing for complete compatibility is infeasible given the size of Flashpoint, CLIFp was designed with full compatibility in mind and theoretically is 100% compatible with the Flashpoint collection. Games are slightly prioritized when it comes to testing the application however.

### Version Matching
Each release of this application targets a specific version series of BlueMaxima’s Flashpoint, which are composed of a major and minor version number, and are designed to work with all Flashpoint updates within that series. For example, a FIL release that targets Flashpoint 10.1 is intended to be used with any version of Flashpoint that fits the scheme `10.1.x.x`, such as `10.1`, `10.1.0.3`, `10.1.2`, etc, but **not** `10.2`.
Each release of this application targets a specific version series of Flashpoint Archive, which are composed of a major and minor version number, and are designed to work with all Flashpoint updates within that series. For example, a FIL release that targets Flashpoint 10.1 is intended to be used with any version of Flashpoint that fits the scheme `10.1.x.x`, such as `10.1`, `10.1.0.3`, `10.1.2`, etc, but **not** `10.2`.

Using a version of CLIFp with a version of Flashpoint different than its target version is discouraged as some features may not work correctly or at all and in some cases the utility may fail to function entirely; **however**, given its design, CLIFp is likely to continue working with newer versions of FP that are released without requiring an update, unless that new version contains significant technical changes.

Expand Down Expand Up @@ -208,55 +208,6 @@ CLIFp displays a system tray icon so that one can be sure it is still running. T

The functionality of the tray icon may be expanded upon in future releases.

## Exit Codes
Once CLIFp has finished executing an exit code is reported that indicates the "error status" of the program, which can be useful for recording/determining issues. The exit code can be obtained by running the application in the following manner, or by examining CLIFp.log:

**Windows:**

start /wait CLIFp.exe [parameters]
echo %errorlevel%

**Linux:**

./clifp [parameters]
echo $?


| Value | Code | Description |
|-------|--------------------------|-----------------------------------------------------------------------------------------------------------|
| 0 | NO_ERR | The application completed successfully |
| 1 | ALREADY_OPEN | Another instance of CLIFp is already running |
| 2 | INVALID_ARGS | The arguments provided were not recognized or were formatted incorrectly |
| 3 | LAUNCHER_OPEN | The application could not start because the Flashpoint Launcher is currently open |
| 4 | INSTALL_INVALID | The Flashpoint install that CLIFp is deployed in is corrupted or not compatible with its current version |
| 5 | CONFIG_SERVER_MISSING | The server entry specified in config.json was not found in services.json |
| 6 | SQL_ERROR | An unexpected SQL error occurred while reading flashpoint.sqlite |
| 7 | SQL_MISMATCH | Received a different form of result from an SQL query than expected |
| 8 | EXECUTABLE_NOT_FOUND | An enqueued executable was not found at the specified path |
| 9 | EXECUTABLE_NOT_VALID | An file with the name of an enqueued executable was found but is not actually an executable |
| 10 | PROCESS_START_FAIL | An enqueued executable failed to start |
| 11 | WAIT_PROCESS_NOT_HANDLED | A handle to a "wait-on" process (usually for .bat based titles) could not be obtained |
| 12 | WAIT_PROCESS_NOT_HOOKED | A wait task returned before its "wait-on" process (usually for .bat based titles) finished executing |
| 13 | CANT_READ_BAT_FILE | Failed to read a batch script for checking if it contains a use of a "wait-on" process |
| 14 | ID_NOT_VALID | The specified string is not a valid 128-bit UUID |
| 15 | ID_NOT_FOUND | The specified UUID is not associated with any title in the Flashpoint database |
| 16 | ID_DUPLICATE | The specified UUID is associated with more than one title (possible collision) |
| 17 | TITLE_NOT_FOUND | The specified title was not found in the Flashpoint database |
| 18 | CANT_OBTAIN_DATA_PACK | Failed to download the selected title's Data Pack |
| 19 | DATA_PACK_INVALID | The selected title's Data Pack checksum did not match it's known value after download |
| 20 | EXTRA_NOT_FOUND | The specified or auto-determined extra was not found in the Extras folder |
| 21 | QMP_CONNECTION_FAIL | CLIFp failed to connect to Flashpoint's QEMU instance via QMP |
| 22 | QMP_COMMUNICATION_FAIL | A communication error occurred with Flashpoint's QEMU instance |
| 23 | QMP_COMMAND_FAIL | A command error occurred with Flashpoint's QEMU instance |
| 24 | PHP_MOUNT_FAIL | The QEMU server failed to mount a data pack |
| 25 | PACK_EXTRACT_FAIL | Data pack extraction failed |
| 26 | CANT_LISTEN_DOCKER | CLIFp could not connect to Docker to listen for the server's start signal |
| 27 | DOCKER_DIDNT_START | The docker server never started |
| 28 | TOO_MANY_RESULTS | Too many results were returned from a database query |
| 101 | RAND_FILTER_NOT_VALID | The provided string for random operation was not a valid filter |
| 102 | PARENT_INVALID | The parent ID of the target additional app is missing or invalid |
| 201 | INVALID_SHORTCUT_PARAM | The provided shortcut path is not valid or there was a permissions issue |

## Limitations

- Although general compatibility is quite high, compatibility with every single title cannot be assured. Issues with a title or group of titles will be fixed as they are discovered
Expand Down
9 changes: 7 additions & 2 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set(CLIFP_SOURCE
kernel/core.cpp
kernel/driver.h
kernel/driver.cpp
kernel/errorcode.h
kernel/errorstatus.h
kernel/errorstatus.cpp
command/command.h
command/command.cpp
command/c-link.h
Expand All @@ -19,6 +20,8 @@ set(CLIFP_SOURCE
command/c-run.cpp
command/c-show.cpp
command/c-show.h
command/title-command.h
command/title-command.cpp
task/task.h
task/task.cpp
task/t-download.h
Expand All @@ -29,6 +32,8 @@ set(CLIFP_SOURCE
task/t-extra.cpp
task/t-extract.h
task/t-extract.cpp
task/t-generic.h
task/t-generic.cpp
task/t-message.h
task/t-message.cpp
task/t-mount.h
Expand Down Expand Up @@ -129,7 +134,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
FILE_VER ${PROJECT_VERSION}
PRODUCT_VER ${TARGET_FP_VERSION_PREFIX}
COMPANY_NAME "oblivioncth"
FILE_DESC "CLI for BlueMaxima's Flashpoint"
FILE_DESC "CLI for Flashpoint Archive"
INTERNAL_NAME "CLIFp"
COPYRIGHT "Open Source @ 2022 oblivioncth"
TRADEMARKS_ONE "All Rights Reserved"
Expand Down
Loading

0 comments on commit 3e49604

Please sign in to comment.