commit f75a18a95e92143c137ae7d7d94dd8fe6f678f5e Author: Joel Wetzell Date: Thu Jun 17 10:35:22 2021 -0500 Initial Commit diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..424a117 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Deploy Package + +on: + push: + branches: + -master + tags: + - '*' + +jobs: + build: + + runs-on: windows-latest + + steps: + - name: Pull Source Files + uses: actions/checkout@v1 + + - name: Setup Nuget.exe + uses: warrenbuckley/Setup-Nuget@v1 + + - name: Update version in .qplug file + run: | + $TAG = $Env:GITHUB_REF.Replace("refs/tags/","") + # Will get exactly the first instance of a .qplug file + $QPLUG = (Get-ChildItem -Path "content" -Include *.qplug -Force -Recurse -File | Select-Object -First 1).Name + ((Get-Content -path content\$QPLUG -Raw) -replace '0.0.0.0-master',$TAG) | Set-Content content\$QPLUG + + + - name: Pack with nuget.exe + run: | + nuget pack -Version $Env:GITHUB_REF.Replace("refs/tags/","") diff --git a/content/images/NovaStar-logo.png b/content/images/NovaStar-logo.png new file mode 100644 index 0000000..d823827 Binary files /dev/null and b/content/images/NovaStar-logo.png differ diff --git a/content/novastar.qplug b/content/novastar.qplug new file mode 100644 index 0000000..c09944f --- /dev/null +++ b/content/novastar.qplug @@ -0,0 +1,277 @@ +-- Plugin for Lightware Devices by Solo Works London +-- Built in Lua +-- For source, contact https://soloworks.co.uk + +PluginInfo = { + Name = "NovaStar~VX4S/VX6S/ProHD/ProHDJr/MCTRL4K", -- The tilde here indicates folder structure in the Shematic Elements pane + Version = "0.0.0-master", + Id = "novastar.plugin.0.0.0-master", -- show this is just a unique id. Show some commented out 'fun' unique ids + Description = "Plugin for controlling NovaStar video wall controllers", + ShowDebug = true, + Author = "Joel Wetzell" +} + +-- Once you've drawn your plugin in Designer, you can determine what colors you use a lot. Save yourself some time by putting them in a table, and then simply calling them later. +local Colors = { + White = {255, 255, 255}, + Black = {0, 0, 0}, + Red = {255, 0, 0}, + Green = {0, 255, 0}, + Blue = {0, 0, 255} +} + +-- We can let users determine some of the plugin properties by exposing them here +-- While this function can be very useful, it is completely optional and not always needed. +-- If no Properties are set here, only the position and fill properties of your plugin will show in the Properties pane +function GetProperties() + props = { + { + Name = "host", + Type = "string", + Value = "127.0.0.1" + }, + { + Name = "port", + Type = "integer", + Min = 1024, + Max = 65535, + Value = 9990 + } + } + return props +end + +-- The below function is optional (like GetProperties() is), but it can allow further customization of what users can and can't do with your plugin. +-- In this example, when Model 1 is selected in the properties pane, the ability to modify some of the properties will be hidden, only allowing customization with Model 2 +-- Another application of this is if you have different input/output types for different models, and want those properties to be dynamic in the Properties pane +function RectifyProperties(props) + return props +end + +-- The below function is where you will populate the controls for your plugin. +-- If you've written some of the Runtime code already, simply use the control names you populated in Text Controller/Control Script, and use their Properties to inform the values here +-- ControlType can be Button, Knob, Indicator or Text +-- ButtonType ( ControlType == Button ) can be Momentary, Toggle or Trigger +-- IndicatorType ( ControlType == Indicator ) can be Led, Meter, Text or Status +-- ControlUnit ( ControlType == Knob ) can be Hz, Float, Integer, Pan, Percent, Position or Seconds +function GetControls(props) + ctls = { + -- ControlType == Indicator + { + Name = "IndicatorLed", + ControlType = "Indicator", + IndicatorType = "Led", + PinStyle = "Output", + UserPin = true + }, + { + Name = "IndicatorMeter", + ControlType = "Indicator", + IndicatorType = "Meter", + PinStyle = "Output", + UserPin = true + }, + { + Name = "IndicatorText", + ControlType = "Indicator", + IndicatorType = "Text", + PinStyle = "Output", + UserPin = true + }, + { + Name = "IndicatorStatus", + ControlType = "Indicator", + IndicatorType = "Status", + PinStyle = "Output", + UserPin = true + }, + -- ControlType == Button + { + Name = "ButtonMomentary", + ControlType = "Button", + ButtonType = "Toggle", + PinStyle = "Input", + Count = 1, + UserPin = true + }, + { + Name = "ButtonToggle", + ControlType = "Button", + ButtonType = "Toggle", + PinStyle = "Input", + Count = 1, + UserPin = true + }, + { + Name = "ButtonTrigger", + ControlType = "Button", + ButtonType = "Trigger", + PinStyle = "Input", + Count = 1, + UserPin = true + }, + -- ControlType == Knob + { + Name = "KnobHz", + ControlType = "Knob", + ControlUnit = "Hz", + PinStyle = "Output", + Count = 1, + UserPin = true + }, + { + Name = "KnobFloat", + ControlType = "Knob", + ControlUnit = "Float", + PinStyle = "Output", + Count = 1, + UserPin = true + }, + { + Name = "KnobInteger", + ControlType = "Knob", + ControlUnit = "Integer", + PinStyle = "Output", + Count = 1, + UserPin = true + }, + { + Name = "KnobPan", + ControlType = "Knob", + ControlUnit = "Pan", + PinStyle = "Output", + Count = 1, + UserPin = true + }, + { + Name = "KnobPercent", + ControlType = "Knob", + ControlUnit = "Percent", + PinStyle = "Output", + Count = 1, + UserPin = true + }, + { + Name = "KnobPosition", + ControlType = "Knob", + ControlUnit = "Position", + PinStyle = "Output", + Count = 1, + UserPin = true + }, + { + Name = "KnobSeconds", + ControlType = "Knob", + ControlUnit = "Seconds", + PinStyle = "Output", + Count = 1, + UserPin = true + } + } + return ctls +end + +-- Variable holding Page Names for ease +local pagenames = {"System"} + +-- This function allows you to populate pages in your plugin. +function GetPages(props) + pages = {} + table.insert(pages, {name = pagenames[1]}) + return pages +end + +-- This function allows you to layout pages in your plugin. +function GetControlLayout(props) + -- layout holds representaiton of Controls + local layout = {} + -- graphics holds aesthetic & design items + local graphics = {} + -- ctl_str is a helper string to get around system not indexing single value as [1] + --local ctl_str = tostring(props["SomeValue"].Value == 1 and "" or " " .. PageIndex) + -- x,y allows an easy method of knowing where you are relative to the section being designed + local x, y = 0, 0 + + -- Graphics Section + table.insert( + graphics, + { + Type = "GroupBox", -- This is the overall groupbox that will give the plugin a more 'contained' look + Text = "Design Elements", + HTextAlign = "Left", + Fill = Colors.White, + CornerRadius = 8, + StrokeColor = Colors.Black, + StrokeWidth = 1, + Position = {x, y}, + Size = {220, 140} -- The width of the main GroupBox is dependent on how many channels the user specified. More channels means a wider group box + } + ) + table.insert( + graphics, + { + Type = "Text", + Text = "My Text Field", + Font = "Roboto", + FontSize = 12, + FontStyle = "Bold", + HTextAlign = "Left", + Color = Colors.Black, + Position = {x + 5, y + 20}, + Size = {100, 20} + } + ) + -- Buttons Section + y = y + 150 + table.insert( + graphics, + { + Type = "GroupBox", -- This is the overall groupbox that will give the plugin a more 'contained' look + Text = "Button Elements", + HTextAlign = "Left", + Fill = Colors.White, + CornerRadius = 8, + StrokeColor = Colors.Black, + StrokeWidth = 1, + Position = {x, y}, + Size = {220, 140} -- The width of the main GroupBox is dependent on how many channels the user specified. More channels means a wider group box + } + ) + -- Indicator Section + y = y + 150 + table.insert( + graphics, + { + Type = "GroupBox", -- This is the overall groupbox that will give the plugin a more 'contained' look + Text = "Indicator Elements", + HTextAlign = "Left", + Fill = Colors.White, + CornerRadius = 8, + StrokeColor = Colors.Black, + StrokeWidth = 1, + Position = {x, y}, + Size = {220, 140} -- The width of the main GroupBox is dependent on how many channels the user specified. More channels means a wider group box + } + ) + -- Knob Section + y = y + 150 + table.insert( + graphics, + { + Type = "GroupBox", -- This is the overall groupbox that will give the plugin a more 'contained' look + Text = "Knob Elements", + HTextAlign = "Left", + Fill = Colors.White, + CornerRadius = 8, + StrokeColor = Colors.Black, + StrokeWidth = 1, + Position = {x, y}, + Size = {220, 140} -- The width of the main GroupBox is dependent on how many channels the user specified. More channels means a wider group box + } + ) + + return layout, graphics +end + +if Controls then +end diff --git a/novastar.nuspec b/novastar.nuspec new file mode 100644 index 0000000..129bd6e --- /dev/null +++ b/novastar.nuspec @@ -0,0 +1,23 @@ + + + + + NovaStar + 0.0.0.0-master + NovaStar Controller + Joel Wetzell + Joel Wetzell + GPL-3.0-or-later + https://github.com/jwetzell/q-sys-plugin-novastar + http://content/images/NovaStar-logo.png + false + NovaStar Controller Plugin + AutoGenerateFromGitCommitMessages + Copyright 2021 + NovaStar VX4S VX6S + A plugin for control of NovaStar Video Wall controllers + + + + + \ No newline at end of file