Skip to content

Commit

Permalink
version 0.6.0
Browse files Browse the repository at this point in the history
compatibility with open cue service 0.5.0
  • Loading branch information
Legion2 committed Dec 27, 2020
1 parent 2549eea commit a5f9b64
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
java-version: 14
- name: Gradle Build
run: gradle runtimeZip
run: ./gradlew runtimeZip
- name: Upload distribution archive
uses: actions/upload-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
java-version: 14
- name: Gradle Build
run: gradle runtimeZip
run: ./gradlew runtimeZip
- name: Get upload url
id: release-id
run: |
Expand Down
11 changes: 7 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ On Windows this is `C:\ProgramData\Corsair\CUE\GameSdkEffects` for [iCUE 3.32.80
These profiles are just the exported files when you export a profile in iCUE.
When export profiles from iCUE only select "Lighting Effects" in the export settings.

Profiles are grouped into games, this is because the SDK was designed for iCUE Game integration.
So each subdirectory of `GameSdkEffects` represents a game and contains all its profiles and a `priorities.cfg` file.
Profiles are grouped into directories, which normally belong to games because the SDK was designed for iCUE Game integration.
Each subdirectory of `GameSdkEffects` is a group of profiles and contains a `priorities.cfg` file.

### Use own profiles/effects
The subdirectories of `GameSdkEffects` correspond to games, but you can also create own subdirectories.
The subdirectories of `GameSdkEffects` normally correspond to games, but you can also create own subdirectories.
If you want to add your own profiles/effects, create a new directory in the `GameSdkEffects` directory called `profiles`.
Create a new text file named `priorities.cfg` in the `profiles` directory.

Expand All @@ -69,9 +69,12 @@ The priorities comes into play when you activate two profiles, then the profile
See [Open CUE Service Troubleshooting](https://github.com/Legion2/open-cue-service#troubleshooting)

## Packaging of this application
This package is provide as zip containing optimized executable runtime image.
This package is provided as zip containing optimized executable runtime image.
Just download the [zip archive for your platform](https://github.com/Legion2/open-cue-cli/releases), extract it where you want and then execute one of the executable scripts from the extracted archive.

You can also build the project yourself: `./gradlew runtimeZip`
The output can be found in the `build` directory.

### Why not provide native executable
Native executables require curl or other native implementations to do http calls.
The linking in kotlin is very complex and dynamic linking is uncommon on Windows.
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/github/legion2/open_cue_cli/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fun createCLI(): OpenCueCli {
return OpenCueCli().subcommands(
SdkCommand().subcommands(
SdkInfo(),
CurrentGame(),
CurrentProfilesDirectoryName(),
SdkControl(),
StopAllEvents(),
DeactivateAllProfiles()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OpenCueCli : CliktCommand(name = "open-cue-cli", autoCompleteEnvvar = "OPE
metavar = "<host or ip>").default("localhost")

init {
versionOption("0.5.1")
versionOption("0.6.0")
context {
console = OpenCueConsole()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CueSdkHttpServer(private val host: String = "localhost", private val port:
return URLBuilder(host = host, port = port, parameters = httpParameters).path(path).build()
}

suspend fun currentGame(): String = client.get(url("api/sdk/game"))
suspend fun currentProfilesDirectoryName(): String = client.get(url("api/sdk/profiles-directory-name"))

suspend fun sdkInfo(): SdkDetails = client.get(url("api/sdk/details"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import io.github.legion2.open_cue_cli.echoString
import io.github.legion2.open_cue_cli.model.echoString
import kotlinx.coroutines.runBlocking

class ListProfiles : CliktCommand("List all available profiles for the current game sorted by priority", name = "list") {
class ListProfiles : CliktCommand("List all available profiles for the current group sorted by priority", name = "list") {
private val details by option("-d", "--with-details", help = "Show the priority and state of all profiles").flag()
private val activeProfiles by option("-a", "--active", help = "Only list active profiles").flag()
private val cliContext by requireObject<CliContext>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import com.github.ajalt.clikt.core.requireObject
import io.github.legion2.open_cue_cli.CliContext
import kotlinx.coroutines.runBlocking

class CurrentGame : CliktCommand(name = "game") {
class CurrentProfilesDirectoryName : CliktCommand(name = "profiles-directory-name") {
private val cliContext by requireObject<CliContext>()
override fun run() = runBlocking {
echo(cliContext.sdkClient.currentGame())
echo(cliContext.sdkClient.currentProfilesDirectoryName())
}
}

0 comments on commit a5f9b64

Please sign in to comment.