Difference between revisions of "C3Fire:Config/Session Example"

From C3LearningLabs
(Set Default Configuration Files)
(Set Default Configuration Files)
 
Line 64: Line 64:
 
   ScenarioFile              = "<FILE_NAME>.sce"
 
   ScenarioFile              = "<FILE_NAME>.sce"
 
</source>
 
</source>
 +
 +
{| class="wikitable"
 +
|+
 +
|-
 +
!style="text-align: left;" |
 +
Property
 +
!style="text-align: left;" |
 +
Value
 +
|-
 +
|style="background-color:#bbeeff; vertical-align: text-top;"|
 +
SessionConfigDirectory
 +
|style="vertical-align: text-top;"|
 +
The default directory where the session configuration files are stored. This property does not need to be<br> defined.
 +
 +
Value example = "C:\c3fire\server\SessionConfig"
 +
|-
 +
|style="background-color:#bbeeff; vertical-align: text-top;"|
 +
ScenarioDirectory
 +
|style="vertical-align: text-top;"|
 +
The default directory where the session scenario configuration files are stored. This property does not need<br> to be defined.
 +
 +
Value example = "C:\c3fire\server\SessionScenario"
 +
|-
 +
|style="background-color:#bbeeff; vertical-align: text-top;"|
 +
SessionConfigFile
 +
|style="vertical-align: text-top;"|
 +
The session configuration default file. This property does not need to be defined.
 +
 +
Value example = "XY.con"
 +
|-
 +
|style="background-color:#bbeeff; vertical-align: text-top;"|
 +
ScenarioFile
 +
|style="vertical-align: text-top;"|
 +
The session scenario default file. This property does not need to be defined.
 +
 +
Value example = "Dev.sce"
 +
|-
 +
|}
  
 
== Linux Commands==
 
== Linux Commands==

Latest revision as of 10:29, 10 September 2019

Demo Configurations


Project Configurations




Copy existing configuration

Set Default Configuration Files

To make the change easy set the default configuration files,
So you don't need to manually select them when developing the new configuration.

Edit the file you uses
C3FireClientConfig-Lin.xml
C3FireClientConfig-Mac.xml
C3FireClientConfig-Win.xml

<DefaultFiles 
  SessionConfigDirectory   = "../../SessionDef/<CONFIG-FOLDER>"
  ...
  ScenarioDirectory        = "../../SessionDef/<CONFIG-FOLDER>"
  ...
  SessionConfigFile         = "<FILE_NAME>.con"
  ...
  ScenarioFile              = "<FILE_NAME>.sce"

Property

Value

SessionConfigDirectory

The default directory where the session configuration files are stored. This property does not need to be
defined.

Value example = "C:\c3fire\server\SessionConfig"

ScenarioDirectory

The default directory where the session scenario configuration files are stored. This property does not need
to be defined.

Value example = "C:\c3fire\server\SessionScenario"

SessionConfigFile

The session configuration default file. This property does not need to be defined.

Value example = "XY.con"

ScenarioFile

The session scenario default file. This property does not need to be defined.

Value example = "Dev.sce"

Linux Commands

Rename multiple files in folder

Install Linux: sudo apt-get install mmv
Install Mac: brew install mmv
mmv <FROM>\* <TO>\#1

Example:

$ ls
a1.txt a2.txt a3.txt
mmv a\* b\#1
ls
b1.txt b2.txt b3.txt

Example:

Mac
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
mmv P8F3WR3U2\* P4FWRU\#1


Linux
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
mmv P8F3WR3U2\* P4FWRU\#1

Replace string in multiple files

sudo find . -type f -name "*.txt" -print0 | xargs -0 sed -i "" -e 's/[FROM]/[TO]/g'

Example:

Mac
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
sudo find . -type f -name "*.con*" -print0 | xargs -0 sed -i "" -e 's/P8F3WR3U2/P4FWRU/g'


Linux (Works but give error message "sed: can't read : No such file or directory")
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1
sudo find . -type f -name "*.con*" -print0 | xargs -0 sed -i "" -e 's/P8F3WR3U2/P4FWRU/g'