cli: add --instance-name option to differenciate mulitple instances in zeroconf networks (issue #118)
This commit is contained in:
parent
dc01b51128
commit
1d1281e1d8
5 changed files with 7 additions and 3 deletions
|
|
@ -68,7 +68,7 @@ if (settings.cli) {
|
|||
launcher
|
||||
|
||||
app.on('ready',function(){
|
||||
launcher = require('./electron-window')({address:address, shortcuts:false, width:680, height:568, color:'#283143'})
|
||||
launcher = require('./electron-window')({address:address, shortcuts:false, width:680, height:597, color:'#283143'})
|
||||
})
|
||||
|
||||
process.stdout.write = (function(write) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ var oscServer = new osc.UDPPort({
|
|||
})
|
||||
|
||||
zeroconf.publish({
|
||||
name: settings.read('appName'),
|
||||
name: settings.read('appName') + (settings.read('instanceName') ? ' (' + settings.read('instanceName') + ')' : ''),
|
||||
protocol: 'udp',
|
||||
type: 'osc',
|
||||
port: oscInPort
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ express.get('*', function(req, res){
|
|||
server.listen(settings.read('httpPort'))
|
||||
|
||||
zeroconf.publish({
|
||||
name: settings.read('appName'),
|
||||
name: settings.read('appName') + (settings.read('instanceName') ? ' (' + settings.read('instanceName') + ')' : ''),
|
||||
type: 'http',
|
||||
port: settings.read('httpPort')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ var options = {
|
|||
true : 'blank session can\'t be started in read-only mode'
|
||||
}
|
||||
},
|
||||
'instance-name':{type:'string',describe:'used to differenciate multiple instances in a zeroconf network'
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -124,6 +126,7 @@ var makeDefaultConfig = function(argv){
|
|||
recentSessions: [],
|
||||
|
||||
appName: 'Open Stage Control',
|
||||
instanceName: argv['instance-name'] || false,
|
||||
syncTargets: argv.s || argv.sync || false,
|
||||
oscInPort: argv.o || 0,
|
||||
httpPort: argv.p || 8080,
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ Below are the available command-line options. Note that when running without any
|
|||
| --url-options | [url options](extras/url-options) (opt=value pairs) |
|
||||
| --disable-vsync | disable gui's vertical synchronization |
|
||||
| --read-only | disable session editing and session history changes |
|
||||
| --instance-name | used to differenciate multiple instances in a zeroconf network |
|
||||
|
||||
Command-line only :
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue