some fixes and core refactoring

This commit is contained in:
Petr Hlozek 2022-04-24 13:25:40 +02:00
parent 3ddb35084a
commit 75b684206b
3 changed files with 28 additions and 22 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us">
<head>
<title>CQRLOG - SUBJECT HERE</title></head>
<title>CQRLOG - Starting for the first time</title></head>
<body>
<table border="0" cellpadding="5" cellspacing="2" width="100%">
<tbody>
@ -27,9 +27,9 @@
<br>
<div style="text-align: left;"><strong>CQRLOG for LINUX by OK2CQR &amp; OK1RR</strong></div>
<p align="center"><img src="img/line.png"></p>
<H2>Starting Cqrlog first time</H2>
<p>First start of Cqrlog is important.
<br>Thanks for opening the help to your web browser during this first run. Help has many answers to your future questions and you can open it again from many menus of Cqrlog.
<H2>Starting CQRLOG for the first time</H2>
<p>First start of CQRLOG is important.
<br>Thanks for opening the help to your web browser during this first run. Help has many answers to your future questions and you can open it again from many menus of CQRLOG.
We hope that you at least check now the left frame to see what topics you may find from help if needed.
</p><p> Then you have to decide where you put your logs. You have three ways to save logs and each of them has it's good and bad sides.
<br><br><img src="img/firsts1.png" >
@ -38,22 +38,22 @@
<H4>your Linux user folder</H4>
This is the default way. If you close <b>Select SQL for logs</b> window, without pressing <b>OK</b>, this selection is used.
<br>Log data is saved to ~/.config/cqrlog/database folder. Access to that data is done by starting a new SQL server thread for that.
<br>This makes full backup very easy. Just copy the ~/.config/cqrlog folder with all files and subfolders. You can also move your cqrlog to another PC that uses same version SQL engine, and has Cqrlog installed, by
<br>This makes full backup very easy. Just copy the ~/.config/cqrlog folder with all files and subfolders. You can also move your CQRLOG to another PC that uses same version SQL engine, and has CQRLOG installed, by
just copying ~/.config/cqrlog to another PC's user folder. How ever if username (actually user ID) there is different you have to run chown command to set the ownership of all files and folders for current username.
<br><br>Unfortunately using this way to save logs causes most of database connection problems with Cqrlog mostly because of modern Linux security settings.
<br><br>Unfortunately using this way to save logs causes most of database connection problems with CQRLOG mostly because of modern Linux security settings.
</p><p>
<h4>local machine's SQL server</h4>
This option uses SQL server already installed to your machine during Cqrlog installation.
<br>When using this option cqrlog tries first to create SQL user with proper privileges to use the SQL server and then set proper values to "Database connection" window.
<br>Cqrlog will create two scripts to your home folder: <b>create_cqr_user.sh</b> and <b>backup_all_cqr.sh</b>
This option uses SQL server already installed to your machine during CQRLOG installation.
<br>When using this option CQRLOG tries first to create SQL user with proper privileges to use the SQL server and then set proper values to "Database connection" window.
<br>CQRLOG will create two scripts to your home folder: <b>create_cqr_user.sh</b> and <b>backup_all_cqr.sh</b>
<br>The first one creates database user and is normally used only once. It needs your Linux user password to run this script with sudo.
<br>The second one allows you to make full backup of all cqrlog logs currently in database by starting this scipt in command-line terminal.
This script needs program mysqldump and cqrlog database users username and password to access database same way as Cqrlog itself does.
<br>The second one allows you to make full backup of all CQRLOG logs currently in database by starting this scipt in command-line terminal.
This script needs program mysqldump and cqrlog database users username and password to access database same way as CQRLOG itself does.
Backup creates <b>allcqrlogs.sql</b> in <b>/tmp</b> folder. You have to move this file to safe place because most Linuxes do clean up /tmp folder during startup.
<br>It is also recommended to save <b>~/.config/cqrlog folder with allcqrlogs.sql </b>file. Script tells you how you can restore all logs back.
<br><br>Cqrlog tries to open most common terminals <b>xterm, gnome-terminal </b>or<b> lxterminal</b> to execute <b>create_cqr_user.sh</b>. If that fails you have to run script manually from your command-line terminal.
<br><br>CQRLOG tries to open most common terminals <b>xterm, gnome-terminal </b>or<b> lxterminal</b> to execute <b>create_cqr_user.sh</b>. If that fails you have to run script manually from your command-line terminal.
</p>
<h4>external networked SQL server</h4>
With this option you have to define values to connect SQL server by yourself. Address, port, user and passord are required to connect to external SQL server.
@ -61,14 +61,14 @@ With this option you have to define values to connect SQL server by yourself. Ad
<br>It can exist in your home network or in Internet. When using internet SQL servers it is most recommended to use VPN or SSH tunnel connection for security reasons.
</p>
<p><br>
After any of these options is selected, <b>OK</b> button pressed, and connection to SQL database established, Cqrlog tries to create first empty Log. This can take some time, so plese be patient.
<br>When log is ready you can open it and go to <b>NewQSO/File/Preferences</b> to set all station details and other settings affecting to Cqrlog.
After any of these options is selected, <b>OK</b> button pressed, and connection to SQL database established, CQRLOG tries to create first empty Log. This can take some time, so plese be patient.
<br>When log is ready you can open it and go to <b>NewQSO/File/Preferences</b> to set all station details and other settings affecting to CQRLOG.
In case of local and external SQL servers there might already be a log, or logs. Then no new log is created.<br><br><b>NOTE:</b> All settings are log based. You can have other logs with different settings and station information.
<br>Once you have got all settings ready you can export them to file. It happens at Cqrlog start in <b>Database connection</b> window with <b>Utils/Export/configuration</b>.
<br>Once you have got all settings ready you can export them to file. It happens at CQRLOG start in <b>Database connection</b> window with <b>Utils/Export/configuration</b>.
<br>When a new log is created you can use <b>Utils/Import/configuration</b> from your file to get all log settings similar with this new log.
</p><p>
<b>NOTE:</b> If you can not get one of these options work then remove <b>~/.config/cqrlog</b> folder to get new fresh start. There is no need to reinstall Cqrlog.
After done that start Cqrlog again to try with another of these options.<b> Removing this folder removes all local logs and settings !</b>
<b>NOTE:</b> If you can not get one of these options work then remove <b>~/.config/cqrlog</b> folder to get new fresh start. There is no need to reinstall CQRLOG.
After done that start CQRLOG again to try with another of these options.<b> Removing this folder removes all local logs and settings!</b>
<p align="center"><img src="img/line.png"></p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, Buttons;
ExtCtrls, Buttons, LazFileUtils;
type
@ -292,10 +292,17 @@ end;
procedure TfrmDbSqlSel.btnHelpClick(Sender: TObject);
var
wb: string;
xdg: string;
pathToHelp : string;
begin
wb := FileSearch('xdg-open', C_PATH, True);
if wb <> '' then dmUtils.RunOnBackground(wb + ' /usr/share/cqrlog/help/firsttime.html');
xdg := FileSearch('xdg-open', C_PATH, True);
if xdg <> '' then
begin
pathToHelp := ExpandFileNameUTF8('..' + DirectorySeparator + 'share' + DirectorySeparator + 'cqrlog' + DirectorySeparator +
'help' + DirectorySeparator + 'firsttime.html');
dmUtils.RunOnBackground(xdg + ' ' + pathToHelp);
end;
end;
procedure TfrmDbSqlSel.ChkValues;
@ -359,7 +366,6 @@ begin
end;
procedure TfrmDbSqlSel.FormCreate(Sender: TObject);
begin
ip := 'localhost';
port := '64000';