Git
Netbeans
Usage
- Spell checking
- Select the world
- Press Alt-Enter
Update files in remote repository
To update your work to the remote repository, do the following steps:
- Backup - Backup your system.
- Commit - Commit your updated files to the local repository.
- Pull - To get the latest version from the remote repository.
- Test - Test that the system still work.
- Push -
- Resolve Conflicts - Resolved conflicts manually.
Backup
Backup your files.
- Small Backup
Compress all files in folder : ...\C3Systems\C3Systems\src\
Example: C:\dev\Java\C3Systems\C3Systems\src\
File Name = C3Systems-src-<DATE>-<USER>.zip
Example:C3Systems-src-170720-Rego-xxx.zip
Copy file to:
- Local: ...\C3Systems\Backup\Code\
- Net: \\ENSLIGABERGEN\Cydonia\Work\Backup\C3Systems\Code\Rego
- Net: \\HATTINFNATTARNA\Backup\C3Systems\Code\Rego
- Big Backup C3Systems
Compress all files in folder : ...\C3Systems\C3Systems\
Example: C:\dev\Java\C3Systems\C3Systems\
File Name = C3Systems-<DATE>-<USER>.zip
Example:C3Systems-170720-Rego-xxx.zip
Copy file to:
- Local: ...\C3Systems\Backup\Code\
- Net: \\ENSLIGABERGEN\Cydonia\Work\Backup\C3Systems\Code\Rego
- Net: \\HATTINFNATTARNA\Backup\C3Systems\Code\Rego
- Big Backup - C3Fire, C3Rescue, C3Conflict
Remove installation files in Export out folder.
Example: C:\dev\Java\C3Systems\C3Fire\Export\Out\
Remove Linux compressed files in the Export Scripts folder, if any.
They can be created if the zip process are interrupted.
Example: R:\Dev\C3Systems\C3Fire\Export\Scripts
Compress all files in folder : ...\C3Systems\C3Fire\
Example: C:\dev\Java\C3Systems\C3Fire\
File Name = C3Fire-<DATE>-<USER>.zip
Example:C3Fire-170720-Rego-xxx.zip
Copy file to:
- Local: ...\C3Systems\Backup\Code\
- Net: \\ENSLIGABERGEN\Cydonia\Work\Backup\C3Systems\Code\Rego
- Net: \\HATTINFNATTARNA\Backup\C3Systems\Code\Rego
Commit
Test that server working.
- Surf to GitLab server.
Commit your updated files to the local repository.
Select C3Systems in the Files structure selector.
In Netbeans menu select: Team -> Show Changes
Press <Commit>
Write a Commit Message: Example: C3Fire New UI Step 1
Press <Commit>
If the commit go well the following text will be displayed in output window.
Now Commit is done.
Pull
First pull should be done to get the latest version from the remote repository.
Start Netbeans.
Test that it work, surf to: http://192.168.1.244/gitlab/
Select C3Systems in the Files structure selector.
In Netbeans menu select: Team -> Remote -> Pull
Then this window is displayed.
Select: Specify Git Repository Location:
- Remote Name: origin
- Persist Remote: Yes
- Repository URL: http://192.168.1.244/gitlab/C3Group/C3Systems-V2.git
- Write your password
Press <Next>
master->origin/master : Should be selected
Press <Finish>
Press <Merge>
If no update is done, the following text will be displayed in the output window.
If the pull generates unresolved conflict you need to solve them manually, see below.
Now Pull is done.
Error
Merge Result: Failed
Merge of HEAD with origin/master failed because of these files:
C:\Dev\C3Systems\C3Systems\resources\C3All\Image\Object\Target.gif
Did try rebase.
Test
Test that the system works.
If large changes backup your system.
Commit
Do Team->Commit...
Push
- Starta GIT Server
- Backup GIT Server
In Netbeans select C3Systems in the Files structure selector
In Netbeans menu select: Team -> Remote -> Push
Then this window is displayed.
Select: Specify Git Repository Location:
- Remote Name: origin
- Persist Remote: Yes
- Repository URL: http://192.168.1.244/gitlab/C3Group/C3Systems-V2.git
- Write your password
Press <Next>
Select: master->master : Yes
Press <Next>
Select: master->orgin/master : Yes
Press <Finish>
If the push go well the following text will be displayed in output window.
If the push generats unresolved conflict you need to solve them manually, see below.
Now push is done.
Resolve Conflicts
If the pull or push generate unresolved conflicts you need to solve them manually.
Press <Resolve> or <Review>
Resolve
The system will resolve what it can, then you should resolve all other conflicts manually.
All unresolved files will be displayed with red text in the files selector, the folder containing unresolved files will be marked with a red database icon, see below.
To start resolve a file, mark the file in the Files selector and press <Right-Mouse-Button> to open mouse menu.
In mouse menu select GIT->Resolve Conflicts
Manual Update Resources Files
Copy resources files from repository folder to C3Fire, C3Rescue, C3Conflict and C3Game Folder structure to the development area.
For C3Fire run following scripts files:
\C3Systems\C3Systems\resources\C3Fire\C3Fire-Copy-Client-Dev.bat
\C3Systems\C3Systems\resources\C3Fire\C3Fire-Copy-Server-Dev.bat
It will copy the files at ...\C3Systems\C3Systems\resources\C3Fire\
To the development area:
...\C3Systems\C3Fire\Server\
...\C3Systems\C3Fire\Client\
...\C3Systems\C3Fire\Client\Files\Root\
The Export scripts copies the files to the export folder.
This should be done for, C3Fire, C3Rescue, C3Conflict and C3Game.
Mac
C3Fire
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire
sudo sh C3Fire-Copy-Server-Dev.sh
sudo sh C3Fire-Copy-Client-Dev.sh
C3Game
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Game
sudo sh C3Game-Copy-Server-Dev.sh
sudo sh C3Game-Copy-Client-Dev.sh
C3Rescue
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Rescue
sudo sh C3Rescue-Copy-Server-Dev.sh
sudo sh C3Rescue-Copy-Client-Dev.sh
C3Conflict
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Conflict
sudo sh C3Conflict-Copy-Server-Dev.sh
sudo sh C3Conflict-Copy-Client-Dev.sh
Linux
C3Fire
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Fire
sudo sh C3Fire-Copy-Server-Dev-Linux.sh
sudo sh C3Fire-Copy-Client-Dev-Linux.sh
C3Game
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Game
sudo sh C3Game-Copy-Server-Dev-Linux.sh
sudo sh C3Game-Copy-Client-Dev-Linux.sh
C3Rescue
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Rescue
sudo sh C3Rescue-Copy-Server-Dev-Linux.sh
sudo sh C3Rescue-Copy-Client-Dev-Linux.sh
C3Conflict
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Conflict
sudo sh C3Conflict-Copy-Server-Dev-Linux.sh
sudo sh C3Conflict-Copy-Client-Dev-Linux.sh
Netbeans Errors
Pull Errors
Example on a pull error window.
Uncommitted file
If you get the following error text, try to select the file and commit it.
Use Netbeans Team
https://netbeans.org/kb/docs/ide/git.html
https://netbeans.org/kb/docs/ide/github_nb_screencast.html
https://netbeans.org/kb/docs/ide/github_nb_screencast.html
Create new C3Systems Git Project
Create a new C3Systems project in Netbeans
Copy old Java project files to new location. Example:
From: D:\Dev\Java\C3Systems\C3Systems\ To: R:\Dev\C3Systems\C3Systems\
Remove .git folder and .gitignore file in the new ...\C3Systems\C3Systems\ folder.
Copy old C3Fire, C3Rescue, C3Conflict and C3Game folders to new location. Example:
From: D:\Dev\Java\C3Systems\C3Fire\ To: R:\Dev\C3Systems\C3Fire\
Create .gitignore file
Create a new .gitignore file and copy it to the java projects root folder.
Example: C:\Dev\C3Systems\C3Systems\.gitignore
The new .gitignore file should contain the following text.
### NetBeans ### nbproject/private/ build/ nbbuild/ dist/ nbdist/ .nb-gradle/ # End of https://www.gitignore.io/api/netbeans
A new .gitignore file can be downloaded at: https://www.gitignore.io/api/netbeans
Create a project on GitLab server
Start the GitLab server and surf to the server.
Example: http://192.168.1.244/gitlab/
Open Projects main page. Select Projects in Top-Left menu.
Create a new project.
Select project path and project Name.
Set C3Group in the project path, and enter the name.
Project path: http://192.168.1.244/gitlab/ C3Group
Project name: C3Sytems-V2
Project description: Main C3System Project 2018
Select Visibility Level : Private
Press <Create project>
When the project is created it should show this window.
Create a Local Repository in Netbeans
Open Netbeans and select the project.
In top menu select: Team->GIT->Initalize Repository
The folder with the project is selected, do not change.
Example: Root path: C:\Dev\C3Systems\C3Systems
Press button <ok>
Netbeans will write the following in Output.
==[IDE]== 13-Jan-2018 18:59:14 Initializing ... Initializing repository Creating git R:\Dev\C3Systems\C3Systems/.git directory git init R:\Dev\C3Systems\C3Systems ==[IDE]== 13-Jan-2018 18:59:19 Initializing ... finished.
- Commit
To commit the files to the local repository, select the project and:
In top menu select: Team->Commit
Write a good commit message:
Commit Massage: C3System V2 Created
Press button <Commit>
This can take time. Netbeans will write the following in Output.
==[IDE]== 13-Jan-2018 19:21:18 Committing... Git Commit ---------- git add R:\Dev\C3Systems\C3Systems\src\c3systems\tools\osm\graphhopper\routing\DijkstraBidirectionRefTest.java R:\Dev\C3Systems\C3Systems\src\c3systems\tools\osm\graphhopper\storage\AbstractDirectoryTester.java ... Commit Log revision : 417a12980dbb9b3117e800ee4fa3cdb4fb511e32 author : Rego Granlund <Rego.Granlund@gmail.com> date : 13-Jan-2018 19:25:12 summary : C3System V2 Created INFO: End of Commit ==[IDE]== 13-Jan-2018 19:25:34 Committing... finished.
Push files to remote Repository on GitLab server
Open Netbeans and select the project.
In top menu select: Team->Remote->Push
Then this window is displayed.
Select: Specify Git Repository Location:
- Remote Name: origin
- Persist Remote: Yes
- Repository URL: http://192.168.1.244/gitlab/C3Group/C3Systems-V2.git
- Write your password
Press <Next>
Select: master->master : Yes
Press <Next>
Select: master->orgin/master : Yes
Press <Finish>
Set up branch to track the remote branch.
Press button <Yes>
This can take time.
If the push go well the following text will be displayed in output window.
==[IDE]== 13-Jan-2018 20:04:02 Pushing - C3Systems git branch git remote -v setting up remote: origin git submodule status git push http://192.168.1.244/gitlab/C3Group/C3Systems-V2.git refs/heads/master:refs/heads/master hooks/pre-receive:3: warning: Insecure world writable dir /opt/gitlab/embedded/libexec/git-core in PATH, mode 040777 hooks/update:3: warning: Insecure world writable dir /opt/gitlab/embedded/libexec/git-core in PATH, mode 040777 hooks/post-receive:3: warning: Insecure world writable dir /opt/gitlab/embedded/libexec/git-core in PATH, mode 040777 Remote Repository Updates Branch Add : master Id : 417a12980dbb9b3117e800ee4fa3cdb4fb511e32 Result : OK Local Repository Updates Branch Add : origin/master Id : 417a12980dbb9b3117e800ee4fa3cdb4fb511e32 Result : NEW ==[IDE]== 13-Jan-2018 20:10:52 Setting Tracked Branch git branch --set-upstream-to origin/master master Branch master set to track origin/master ==[IDE]== 13-Jan-2018 20:10:52 Pushing - C3Systems finished. git branch --set-upstream-to origin/master master Branch "master" marked to track branch "origin/master" ==[IDE]== 13-Jan-2018 20:10:52 Setting Tracked Branch finished.
Now push is done.
Start C3System development on new computer
Test Java
Linux
java -version
- To get java file location
which java
Install Java
To get Netbeans and jarsigner to work we need java 8
C3System uses Java 8, did try 11
- Class File Version
- jdk7 = Class File Version 51
- jdk8 = Class File Version 52
- jdk9 = Class File version 53
- jdk10 = Class File version 54
- jdk11 = Class File version 55
- jdk12 = Class File version 56
- jdk13 = Class File version 57
- jdk14 = Class File version 58
Download
Download Java Platform, Standard Edition
We use Zulu and it must be JavaFX.
The current used java is saved at: Cydonia/Dev/Install/Java
Windows
Mac
Linux
- Mint already installed with good openJDK for java 8
- Install java 11 (No we uses JDK8)
Select: Java Platform (JDK) XX
Example: Java SE Development Kit 10.0.1
Windows
- Java 8
- Run C:\Dev\C3Systems\C3Fire\Export\Java\jdk-8u141-windows-x64.exe
- To folder: C:\Dev\Java\jdk1.8.0\
- Java 11
- Download file example: zulu11.29.3-ca-jdk11.0.2-win_x64.msi
- If file is new copy file to:
\\Ensligabergen\Cydonia\Dev\Install\Windows\Program\Java
- Run : zulu11.29.3-ca-jdk11.0.2-win_x64.msi
- Install to: C:\Dev\Java\jdk-11.0.2\
- <Next>
- Install jre to: C:\Program Files\Java\jre-11.0.2\
- <Next>
- copy C:\Dev\Java\jdk-11.0.2\* C:\Dev\Java\sesdk\
Linux JDK-8
- Download from
https://www.azul.com/downloads/zulu/
- Select Ubuntu, Linux glibc v2.5 or higher, 64-bit x86, JDK FX, Tar fil
- The file should be downloded to
cd /home/rego/Downloads
- Open the terminal and make the directory /usr/java to keep all the java installations at the same place.
sudo mkdir /opt/java-8
cd /opt/java-8
- Copy instalation file to java folder
sudo cp /home/rego/Downloads/zulu8.42.0.23-ca-fx-jdk8.0.232-linux_x64.tar.gz zulu8.42.0.23-ca-fx-jdk8.0.232-linux_x64.tar.gz
- Install
sudo tar -xzvf zulu8.42.0.23-ca-fx-jdk8.0.232-linux_x64.tar.gz
- Set Environment Variables, edit file
sudo pico /etc/profile
- Add at the end of this file
JAVA_HOME=/opt/java-8/zulu8.42.0.23-ca-fx-jdk8.0.232-linux_x64 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export JAVA_HOME export JRE_HOME export PATH
Linux JDK-11
- Download from
https://www.azul.com/downloads/zulu/
- Select Ubuntu, Linux glibc v2.5 or higher, 64-bit x86, JDK FX, Tar fil
- The file should be downloded to
cd /home/rego/Downloads
- Open the terminal and make the directory /usr/java to keep all the java installations at the same place.
sudo mkdir /opt/java
cd /opt/java
- Copy instalation file to java folder
sudo cp /home/rego/Downloads/zulu11.33.15-ca-fx-jdk11.0.4-linux_x64.tar.gz zulu11.33.15-ca-fx-jdk11.0.4-linux_x64.tar.gz
- Install
sudo tar -xzvf zulu11.33.15-ca-fx-jdk11.0.4-linux_x64.tar.gz
- Set Environment Variables, edit file
sudo pico /etc/profile
- Add at the end of this file
JAVA_HOME=/opt/java/zulu11.33.15-ca-fx-jdk11.0.4-linux_x64 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export JAVA_HOME export JRE_HOME export PATH
Install NetBeans
Download
Download NetBeans
Select: All
Example: netbeans-11.2-windows.exe
The current used java is saved at: Cydonia/Dev/Install/Netbeans
Windows
Netbeans 10
Unzip: incubating-netbeans-10.0-bin.zip
to: c:\Dev\NetBeans\NetBeanVx.x\
Netbeans 8
Run: netbeans-8.2-javaee-windows.exe
Install NetBean to: c:\Dev\NetBeans\NetBeanVx.x\
<Customize>
Base IDE : Yes
Java Se : Yes
java EE : Yes
Java ME : Yes
Html 5/Javasqript : Yes
PHP : Yes
C/C++ : No
Groovy : No
Java Card : No
Fetures on Deman : Yes
GlassFish : Yes
Apache Tomcat : Yesv
<next>
I accept
<next >
JUnit : Yes
Install To : C:\Dev\Java\NetBeans\NetBeans 8.2
JDK : C:\Dev\Java\sesdk
GlassFish : C:\Dev\Java\GlassFish\glassfish-4.1.1
JDK for GlassFish : C:\Dev\Java\sesdk
Tomcat : C:\Dev\Java\Tomcat\ApacheTomcat-8.0.27
<next >
Check for Updates : Yes
<next >
Linux
- Download from
https://www.apache.org/dyn/closer.cgi/incubator/netbeans/incubating-netbeans/
- The file should be downloded to
cd /home/rego/Downloads
- Open the terminal and make the directory /opt/java to keep all the java installations at the same place.
sudo mkdir /opt/java
cd /opt/java
sudo mkdir /opt/java/netbeans-11.2
cd /opt/java/netbeans-11.2
- Copy instalation file to java folder
sudo cp /home/rego/Downloads/netbeans-11.2-bin.zip netbeans-11.2-bin.zip
- Install
sudo unzip netbeans-11.2-bin.zip
- Set Path
nano ~/.bashrc
- Add the following line at the end of the file
export PATH="$PATH:/opt/java/netbeans-11.2/netbeans/bin/"
- Run
source ~/.bashrc
- Start Netbeans
cd /opt/java/netbeans-11.2/netbeans/bin
sh ./netbeans
- Create Netbeans Desktop Launcher
sudo nano /usr/share/applications/netbeans-11.2.desktop
- Add
[Desktop Entry] Name=Netbeans IDE Comment=Netbeans IDE Type=Application Encoding=UTF-8 Exec=/opt/java/netbeans-11.2/netbeans/bin/netbeans Icon=/opt/java/netbeans-11.2/netbeans/nb/netbeans.png Categories=GNOME;Application;Development; Terminal=false StartupNotify=true
Mac
- Download Netbeans
- Copy to /Applications
- Extract
- 9.0
cd /Users/regogranlund/Downloads
git clone https://github.com/carljmosca/netbeans-macos-bundle.git
cd netbeans-macos-bundle
./install.sh
Set Java
Set the java version to the installed version 8.x
- Add Java
- Tools -> Java Platform
- Select : Add Platform
- Select : Java Standar Edition
- Lin: Select : /opt/java-11/zulu8.42.0.23-ca-fx-jdk8.0.232-linux_x64
- Win: Select : C:\Dev\Java\sesdk
- Select Java
- Select project
- Right click
- Select resolve project problems
- Press Resolve
- Select the new Java version
- Also set
- Tools -> Options -> Java -> Java Shell
- Also set
- Select project
- Right click
- Select Properties
- Select Libraries
- Set Java Platform
Make the Folder structure
Create C3Ssystem folders where project should be.
Example : C:\Dev\C3Systems\
Create the \C3Systems\C3Systems folder that should contain the NetBeans project that is achieved from the Git Repository in next step.
Example : C:\Dev\C3Systems\C3Systems\
Copy C3Fire, C3Rescue, C3Conflictfiles and C3Game from an existing environment.
Example Windows:
C:\Dev\C3Systems\ C:\Dev\C3Systems\C3Systems\ C:\Dev\C3Systems\C3Fire\ C:\Dev\C3Systems\C3Rescue\ C:\Dev\C3Systems\C3Conflict\ C:\Dev\C3Systems\C3Game\
Mac
Example:
/Users/regogranlund/dev/C3Systems/ /Users/regogranlund/dev/C3Systems/C3Systems/ /Users/regogranlund/dev/C3Systems/C3Fire/ /Users/regogranlund/dev/C3Systems/C3Rescue/ /Users/regogranlund/dev/C3Systems/C3Conflict/ /Users/regogranlund/dev/C3Systems/C3Game/
mkdir /Users/regogranlund/dev/C3Systems/
mkdir /Users/regogranlund/dev/C3Systems/C3Systems/
mkdir /Users/regogranlund/dev/C3Systems/C3Fire/
mkdir /Users/regogranlund/dev/C3Systems/C3Rescue/
mkdir /Users/regogranlund/dev/C3Systems/C3Conflict/
mkdir /Users/regogranlund/dev/C3Systems/C3Game/
Set read write permissions for the C3System foder structure. Depending on how you are using your system you may need to set the permissions to 777.
sudo chmod -R 777 /Users/regogranlund/dev/C3Systems/
Copy C3Fire, C3Rescue, C3Conflictfiles and C3Game from an existing environment.
Linux
Example
mkdir /home/rego/dev/
mkdir /home/rego/dev/C3Systems/
mkdir /home/rego/dev/C3Systems/C3Systems/
mkdir /home/rego/dev/C3Systems/C3Fire/
mkdir /home/rego/dev/C3Systems/C3Rescue/
mkdir /home/rego/dev/C3Systems/C3Conflict/
mkdir /home/rego/dev/C3Systems/C3Game/
Set read write permissions for the C3System foder structure. Depending on how you are using your system you may need to set the permissions to 777.
sudo chmod -R 777 /home/rego/dev/C3Systems/
Copy C3Fire, C3Rescue, C3Conflictfiles and C3Game from an existing environment.
Clone the Git Repository
- Test that server running
In Netbeans menu select: Team -> Git -> Clone
Enter the repository URL, and where the C3Systems NetBeans project folder should be.
Observe that the Clone Into folder should be, example: C:\Dev\C3Systems without the ending \C3Systems\ folder.
- Remote Repository
- Repository URL: http://192.168.1.244/gitlab/C3Group/C3Systems-V3.git
- User: rego
- Windows Clone Into: C:\Dev\C3Systems
- Mac Clone Into: /Users/regogranlund/dev/C3Systems
- Linux Clone Into: /home/rego/dev/C3Systems
Press: <Next>
Mark, Master : Yes
Press <Next>
- Destination Directory
- Parent Directory: C:\Dev\C3Systems
- Clone Name: C3Systems
- Checkout Branch: Master*
- Remote Name: origin
Press <Finish>
After the clone process the following window should be visible.
The following text should be written to the NetBeans Output.
==[IDE]== Jan 14, 2018 12:54:19 PM Validating destination... ==[IDE]== Jan 14, 2018 12:54:19 PM Validating destination... finished. ==[IDE]== Jan 14, 2018 12:54:19 PM Cloning git init D:\Dev\Java\C3Systems\C3Systems git fetch http://192.168.1.244/gitlab/C3Group/C3Systems-V2.git +refs/heads/master:refs/remotes/origin/master Total 2493 (delta 1206), reused 2493 (delta 1206) Branch : origin/master Old Id : null New Id : 417a12980dbb9b3117e800ee4fa3cdb4fb511e32 Result : NEW setting up remote: origin git branch --track master origin/master git checkout master git reset --hard master git submodule status ==[IDE]== Jan 14, 2018 12:55:06 PM Cloning finished.
Update Java
Manual Update Resources Files
Copy resources files from repository folder to C3Fire, C3Rescue, C3Conflict and C3Game Folder structure to the development area.
For C3Fire run following scripts files:
\C3Systems\C3Systems\resources\C3Fire\C3Fire-Copy-Client-Dev.bat
\C3Systems\C3Systems\resources\C3Fire\C3Fire-Copy-Server-Dev.bat
It will copy the files at ...\C3Systems\C3Systems\resources\C3Fire\
To the development area:
...\C3Systems\C3Fire\Server\
...\C3Systems\C3Fire\Client\
...\C3Systems\C3Fire\Client\Files\Root\
The Export scripts copies the files to the export folder.
This should be done for, C3Fire, C3Rescue, C3Conflict and C3Game.
Mac
C3Fire
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire
sudo sh C3Fire-Copy-Server-Dev.sh
sudo sh C3Fire-Copy-Client-Dev.sh
C3Game
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Game
sudo sh C3Game-Copy-Server-Dev.sh
sudo sh C3Game-Copy-Client-Dev.sh
C3Rescue
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Rescue
sudo sh C3Rescue-Copy-Server-Dev.sh
sudo sh C3Rescue-Copy-Client-Dev.sh
C3Conflict
cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Conflict
sudo sh C3Conflict-Copy-Server-Dev.sh
sudo sh C3Conflict-Copy-Client-Dev.sh
Linux
C3Fire
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Fire
sudo sh C3Fire-Copy-Server-Dev-Linux.sh
sudo sh C3Fire-Copy-Client-Dev-Linux.sh
C3Game
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Game
sudo sh C3Game-Copy-Server-Dev-Linux.sh
sudo sh C3Game-Copy-Client-Dev-Linux.sh
C3Rescue
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Rescue
sudo sh C3Rescue-Copy-Server-Dev-Linux.sh
sudo sh C3Rescue-Copy-Client-Dev-Linux.sh
C3Conflict
cd /home/rego/dev/C3Systems/C3Systems/resources/C3Conflict
sudo sh C3Conflict-Copy-Server-Dev-Linux.sh
sudo sh C3Conflict-Copy-Client-Dev-Linux.sh
Copy License File
The C3Fire system needs a license file to be able to start.
The license file is supplied by C3 Learning Labs. If you do not have a license file, require a system license at the license page.
The license file should have the nameC3Fire.license
, the case of the letter is important.
The license file should be copied to the folder: ...\C3Systems\C3Fire\Server
Update Project Properties
- C3Conflict Client
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3ConflictClientConfig-Dev.xml SystemType=Conflict
- Working directory:
- Win
..\C3Conflict\Client
- Mac
../C3Conflict/Client
- Linux
../C3Conflict/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Conflict.policy
- C3Conflict Manager
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3ConflictClientConfig-Dev-Manager.xml SystemType=Conflict
- Working directory:
- Win
..\C3Conflict\Client
- Mac
../C3Conflict/Client
- Linux
../C3Conflict/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Conflict.policy
- C3Conflict Player
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3ConflictClientConfig-Dev-Player.xml SystemType=Conflict
- Working directory:
- Win
..\C3Conflict\Client
- Mac
../C3Conflict/Client
- Linux
../C3Conflict/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Conflict.policy
- C3Conflict Server
- Main Class:
c3systems.server.server.Server
- Arguments:
-c C3ConflictServerConfig-Dev.xml -type Conflict -ui Yes
- Working directory:
- Win
..\C3Conflict\Server
- Mac
../C3Conflict/Server
- Linux
../C3Conflict/Server
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Conflict.policy
- C3Fire Client
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3FireClientConfig-Dev.xml SystemType=Fire
- Working directory:
- Win
..\C3Fire\Client
- Mac
../C3Fire/Client
- Linux
../C3Fire/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Fire.policy
- C3Fire Manager
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3FireClientConfig-Dev-Manager.xml SystemType=Fire
- Working directory:
- Win
..\C3Fire\Client
- Mac
../C3Fire/Client
- Linux
../C3Fire/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Fire.policy
- C3Fire Player
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3FireClientConfig-Dev-Player.xml SystemType=Fire
- Working directory:
- Win
..\C3Fire\Client
- Mac
../C3Fire/Client
- Linux
../C3Fire/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Fire.policy
- C3Fire Server
- Main Class:
c3systems.server.server.Server
- Arguments:
-c C3FireServerConfig-Dev.xml -type Fire -ui Yes
- Working directory:
- Win
..\C3Fire\Server
- Mac
../C3Fire/Server
- Linux
../C3Fire/Server
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Fire.policy
- C3Fire Server uiNo
- Main Class:
c3systems.server.server.Server
- Arguments:
-c C3FireServerConfig-Dev.xml -type Fire -ui No
- Working directory:
- Win
..\C3Fire\Server
- Mac
../C3Fire/Server
- Linux
../C3Fire/Server
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Fire.policy
- C3Rescue Client
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3RescueClientConfig-Dev.xml SystemType=Rescue
- Working directory:
- Win
..\C3Rescue\Client
- Mac
../C3Rescue/Client
- Linux
../C3Rescue/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Rescue.policy
- C3Rescue Manager
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3RescueClientConfig-Dev-Manager.xml SystemType=Rescue
- Working directory:
- Win
..\C3Rescue\Client
- Mac
../C3Rescue/Client
- Linux
../C3Rescue/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Rescue.policy
- C3Rescue Player
- Main Class:
c3systems.client.client.applet.Application
- Arguments:
Config=C3RescueClientConfig-Dev-Player.xml SystemType=Rescue
- Working directory:
..\C3Rescue\Client
- Win
..\C3Rescue\Client
- Mac
../C3Rescue/Client
- Linux
../C3Rescue/Client
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Rescue.policy
- C3Rescue Server
- Main Class:
c3systems.server.server.Server
- Arguments:
-c C3RescueServerConfig-Dev.xml -type Rescue -ui Yes
- Working directory:
- Win
..\C3Rescue\Server
- Mac
../C3Rescue/Server
- Linux
../C3Rescue/Server
- Win
- VM Options:
-Xmx2500m -Xms1000m -Djava.security.policy=C3Rescue.policy
Update Lib
Depending on the Java installed on the computer some Lib/jar files may need to be installed.
- Test installed Java
- Linux
java -version
- Linux
- Netbeans activated Java
- Tools -> Java Platforms
- Tools -> Options -> Java -> Java Shell
- Java Platform : JDK 11
If needed update the export lib, see Export Lib instructions
The original lib files are located at:
...\C3Systems\C3Systems\resources\C3All\Lib\Client\Lib\
...\C3Systems\C3Systems\resources\C3All\Lib\Server\Lib\
NetBeans lib files are located at:
...\C3Systems\C3Systems\lib\
Example com.sun.javafx.geom
Found jar file at: https://jar-download.com
Download and copy to Netbeans lib folder
...\C3Systems\C3Systems\lib\
Add Lib to Netbeans Tools -> Librarries
- Select :Librarries locations : ...\C3Systems\C3Systems\lib\nblibraries.properties
- Press: New Library
- Enter Name: JavaFX
- Select: JavaFX
- Press AddJar/Folder
- Select: jar files, not folder
- Press: ok
- Fix Project
- Select project C3Systems
- Rigth press
- select Properties
- Select Libraries
- Select Tab Compile
- Select classpath (then press ... then press add something)
- Press Edit
- Select Folder
Appearance
Tools -> Options -> Appearance
Tab placement = Right
- Dark mode
- Install Plugin Dracula
- http://plugins.netbeans.org/plugin/62424/darcula-laf-for-netbeans
- smb://ensligabergen/cydonia/Dev/Install/Netbeans/Plugin/Dracula
- Create folder
- Lin: /home/rego/.netbeans/11.0/plugins
- Copy plugin to
- Lin: /home/rego/.netbeans/11.0/plugins
- Tools -> Plugins
- Select Tab : Downloaded
- Press : Add Plugins
- Select : Dracula
- Select : Dracula
- Press : Install
- Press : ... Restart Netbeans
GitLab Server
Install
Set root Password
Open console terminal
gitlab-rails console production user = User.where(id: 1).first user.password = 'secret_pass' user.password_confirmation = 'secret_pass' user.save!
Command Console
Log into your server with root privileges. Then start a Ruby on Rails console.
Start the console with this command:
sudo gitlab-rails console production
Users
Groups and Users
Groups are created globally.
To manage users for a Groups:
Open Groups main page. Select Groups in Top-Left menu.
To add a users, open Members page in Top menu.
Start Server
- Starta computer that contain GitLab server.
- Open putty ssh terminal: 192.168.1.244 : Mifslan
- Stop Apache server that are running on the server.
sudo service apache2 stop
- Surf to GitLab server.
Web page information
Login to the GitLab server.
Surf to: http://192.168.1.244/gitlab/
Backup
Resources: https://docs.gitlab.com/omnibus/settings/backups.html
- Backup Git data files
Run the backup script.
sudo gitlab-rake gitlab:backup:create
The backupscript will create a tar file in folder.
/var/opt/gitlab/backups
Example: /var/opt/gitlab/backups/1515012321_2018_01_03_9.3.3_gitlab_backup.tar
- Backup security files
Backup the security files that are stored in folder: /etc/gitlab.
It is not recommended to store the security files with the git data, but we do that.
Go to the backup folder.
cd /var/opt/gitlab/backups
Make compressed tar file of all security files
tar -pczf gitlab-security-$(date +%Y-%m-%d).tar.gz /etc/gitlab
The commands creates a file as:
Example: /var/opt/gitlab/backups/gitlab-security-2018-01-03.tar.gz
- Save bakup files
Ftp the data and security backup files to a safe storage.
Make the backup readable for you.
sudo chmod -R 777 /var/opt/gitlab/backups
Ftp the backup files to: \\Hattenfnattarna\Backup\C3Systems\Git\
/var/opt/gitlab/backups/1515012321_2018_01_03_9.3.3_gitlab_backup.tar
/var/opt/gitlab/backups/gitlab-security-2018-01-03.tar.gz
GitLab Error
SSH Error
If you get the following ssh error message, you can ignore it, if you updating with Netbeans.
Netbeans will fix it!
Short read of block
https://docs.gitlab.com/ce/administration/repository_checks.html
git fsck
sudo gitlab-rake gitlab:git:fsck
https://docs.gitlab.com/ce/administration/raketasks/check.html
sudo chmod -R 777 /opt/gitlab
sudo gitlab-rake gitlab:user:check_repos