Skip to content

Commit

Permalink
Final tweaks of v3.3.4 re environment checker for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsmith committed Nov 1, 2023
1 parent 1732f62 commit 5d91883
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 30 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Quickhash-GUI is a cross platform, free, open-source data hashing tool to text s
It ships with some dependancies so if everything is unzipped properly and to the same folder, the pre-compiled binary program
should work on all three platforms, perhaps with some security permissions being required or being adjusted to execute.<br>

For Windows, it comes as an exe with some DLLs. For Apple OSX it comes as a .app. For Linux it comes as a Debian package. <br>
For Windows, it comes as an exe with some DLLs. For Apple OSX it comes as a DMG where the app can be copied to the /Applications folder. For Linux it comes as a Debian package. <br>

For those wishing to compile the program themselves, from source, instructions to do so are below, along with instructions on compiling the dependant files from their respective source libraries too. <br>

Expand All @@ -23,23 +23,22 @@ After installation of Lazarus and Freepascal, you need to set some things up.<br
HashLib4Pascal package: The library is included in the GitHub QuickHash project but more ideally it is within the Lazarus IDE via the Online Package Manager (ideally use that). If you want to use the shipped package, simply choose "Package" from the main Lazarus IDE menu, then "Open Package File (lpk)".<br>
Choose and navigate to `HashLib4Pascal/HashLib/src/Packages/FPC/HashLib4PascalPackage.lpk` then click the 'Compile' button. Then later, when you open the QuickHash project, you need to add it to the project via the Dependancies section of the Object Inspector, but that will be explained later.<br>

DateTimePicker : Repeat the same process for the package [DateTimePicker](http://wiki.lazarus.freepascal.org/ZVDateTimeControls_Package) which was added in v2.8.3 to enable scheduled hashing.<br>
So again simply choose 'Package --> Open Package File (lpk)' from the top menu of Lazarus and navigate to `DateTimePicker/zvdatetimectrls.lpk`, choose "Compile" and then Install to ensure it is part of the IDE.<br>
DateTimePicker : Using the Lazarus Install and Uninstall Packages feature, ensure DateTimeCtrls 1.5.1 or above is installed<br>

LazDBExport : in Lazarus, go to Package --> Install\Uninstall Packages --> find 'lazdbexport' 1.0' in the right hand pane under 'Available for installation'. Select the package and click 'Install Selection' button.<br>
Click 'Save and Rebuild IDE'. The next window will show a list of installed packages and the ones to be installed. Click 'Continue'. The IDE will rebuild, although since v3.3.0, this may not be required for much longer, if at all.<br>

SQLdb Tab : You MAY also need to ensure you have the 'SQLdb' tab in your Lazarus IDE interface. It is important since v3.0.0 because it uses the 'TSQLDBLibraryLoader', which is used to try and enable QuickHash to load the default SQLite library on your system. It is possible your IDE will not have this tab (most do, but I've experienced it not to be there). To get it, ensure the SQLdbLaz package is installed, again via 'Tools --> Install\Uninstall Packages', find SQLdbLaz in the right and add it to the "To be installed" pane.<br>

Windows developers also need to ensure they have the DLL files in the "libs\x64" and "libs\x86" subfolder (as of v3.3.0 - they were in the root folder in v3.2.0 and below). <br>
Windows developers also need to ensure they have the DLL files in the "libs\x64" and "libs\x86" subfolder (as of v3.3.0 - they were in the root folder in v3.2.0 and below). <br>
Otherwise, when they compile and run, the exe will not find the DLLs it needs to build the SQLite tables.
SQLite DLL's for 32 and 64 bit systems are part of the main download from www.quickhash-gui.org if you want to get them from there.
Or you can compile them from source, yourself (instructions are below).<br>

Now you can open the QuickHash project itself. Choose "Project --> Open Project". Lazarus looks for LPI files by default (local config file for a project) but there often is not one in the GitHub project, although I do often include when just as a guide. If there is not one, or if the one supplied does not work, simply adjust the drop down menu for file type (bottom right) to "All files", and then select the LPR file instead. Lazarus will then warn you that a project session file is missing and would you like to create one.
Choose "Yes" and then just click OK in the next window (the one that asks what type of project you are making - it should default to 'Application'). After clicking OK for the last time, a local LPI file will be created for your computer session.<br>

Assuming it opens OK, when you go to compile it, Lazarus may report that the project can not find certain packages that are declared in the uses clauses. So use the "Package" menu again to ensure it knows where these units are. So choose "Open loaded package", and for "HashLib4Pascal" package and "LazDBExport" package and "ZVDateTimeCtrls" package, select each one (one at a time) and choose "open". Once open in the package manager, choose "Use --> Add to Project". Now when you compile, it should find all the units and compile OK. You may also need to do this for SQLDb package.<br>
Assuming it opens OK, when you go to compile it, Lazarus may report that the project can not find certain packages that are declared in the uses clauses. So use the "Package" menu again to ensure it knows where these units are. So choose "Open loaded package", and for "HashLib4Pascal" package and "LazDBExport" package, select each one (one at a time) and choose "open". Once open in the package manager, choose "Use --> Add to Project". Now when you compile, it should find all the units and compile OK. You may also need to do this for SQLDb package.<br>

Now save your project (Project --> Save Project) which will create a new LPI file. Then you can compile QuickHash yourself using Lazarus, but it will not run properly without the SQLite DLLs (on Windows at least).<br>

Expand Down
34 changes: 19 additions & 15 deletions quickhash.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<ComponentName Value="frmTechSpecs"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="10"/>
<EditorIndex Value="11"/>
<UsageCount Value="206"/>
<Loaded Value="True"/>
</Unit11>
Expand All @@ -182,7 +182,7 @@
<ComponentName Value="frmSQLiteDBases"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="12"/>
<EditorIndex Value="13"/>
<CursorPos X="129" Y="1895"/>
<UsageCount Value="206"/>
<Loaded Value="True"/>
Expand All @@ -194,7 +194,7 @@
<ComponentName Value="frmDiskHashingModule"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="6"/>
<EditorIndex Value="7"/>
<CursorPos X="52" Y="28"/>
<UsageCount Value="206"/>
<Loaded Value="True"/>
Expand Down Expand Up @@ -224,7 +224,7 @@
<Unit17>
<Filename Value="uGPT.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="8"/>
<EditorIndex Value="9"/>
<CursorPos X="28" Y="10"/>
<UsageCount Value="206"/>
<Loaded Value="True"/>
Expand All @@ -248,7 +248,7 @@
<IsVisibleTab Value="True"/>
<EditorIndex Value="3"/>
<TopLine Value="79"/>
<CursorPos X="20" Y="84"/>
<CursorPos X="36" Y="109"/>
<UsageCount Value="206"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
Expand All @@ -260,7 +260,7 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="uProgress"/>
<EditorIndex Value="7"/>
<EditorIndex Value="8"/>
<TopLine Value="36"/>
<CursorPos X="40" Y="60"/>
<UsageCount Value="206"/>
Expand All @@ -272,7 +272,7 @@
<ComponentName Value="frmDisplayGrid3"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="11"/>
<EditorIndex Value="12"/>
<CursorPos X="51" Y="147"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
Expand Down Expand Up @@ -312,7 +312,7 @@
<Filename Value="ulibewf.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="uLibEWF"/>
<EditorIndex Value="5"/>
<EditorIndex Value="6"/>
<UsageCount Value="208"/>
<Loaded Value="True"/>
</Unit26>
Expand All @@ -339,9 +339,9 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="uEnvironmentChecker"/>
<EditorIndex Value="4"/>
<TopLine Value="98"/>
<CursorPos X="9" Y="101"/>
<EditorIndex Value="5"/>
<TopLine Value="152"/>
<CursorPos X="37" Y="156"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
Expand Down Expand Up @@ -413,7 +413,7 @@
</Unit38>
<Unit39>
<Filename Value="GPTMBR.pas"/>
<EditorIndex Value="9"/>
<EditorIndex Value="10"/>
<CursorPos X="28" Y="9"/>
<UsageCount Value="30"/>
<Loaded Value="True"/>
Expand Down Expand Up @@ -443,12 +443,12 @@
<Unit43>
<Filename Value="../../../../../../lazarus/components/datetimectrls/datetimepicker.pas"/>
<UnitName Value="DateTimePicker"/>
<EditorIndex Value="-1"/>
<CursorPos X="32" Y="24"/>
<EditorIndex Value="4"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit43>
</Units>
<JumpHistory Count="29" HistoryIndex="28">
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="diskmodule.pas"/>
<Caret Line="153" Column="18" TopLine="121"/>
Expand Down Expand Up @@ -565,6 +565,10 @@
<Filename Value="unit2.pas"/>
<Caret Line="114" Column="25" TopLine="106"/>
</Position29>
<Position30>
<Filename Value="unit2.pas"/>
<Caret Line="109" Column="36" TopLine="79"/>
</Position30>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
Expand Down
2 changes: 1 addition & 1 deletion uenvironmentchecker.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object frmEnvironmentCheck: TfrmEnvironmentCheck
ClientWidth = 769
OnCreate = FormCreate
Position = poDesktopCenter
LCLVersion = '2.0.12.0'
LCLVersion = '2.2.4.0'
object memEnvList: TMemo
Left = 16
Height = 351
Expand Down
12 changes: 6 additions & 6 deletions uenvironmentchecker.lrs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ LazarusResources.Add('TfrmEnvironmentCheck','FORMDATA',[
'TPF0'#20'TfrmEnvironmentCheck'#19'frmEnvironmentCheck'#4'Left'#3#148#1#6'Hei'
+'ght'#3#157#1#3'Top'#3#10#1#5'Width'#3#1#3#7'Caption'#6'!QuickHash-GUI Envir'
+'onment Checker'#12'ClientHeight'#3#157#1#11'ClientWidth'#3#1#3#8'OnCreate'#7
+#10'FormCreate'#8'Position'#7#15'poDesktopCenter'#10'LCLVersion'#6#8'2.0.12.'
+'0'#0#5'TMemo'#10'memEnvList'#4'Left'#2#16#6'Height'#3'_'#1#3'Top'#2'0'#5'Wi'
+'dth'#3#226#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'S'
+'crollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#7'TButton'#11'btnCheckNow'#4
+'Left'#2#16#6'Height'#2#25#3'Top'#2#8#5'Width'#2's'#7'Caption'#6#11'Check No'
+'w..'#7'OnClick'#7#16'btnCheckNowClick'#8'TabOrder'#2#1#0#0#0
+#10'FormCreate'#8'Position'#7#15'poDesktopCenter'#10'LCLVersion'#6#7'2.2.4.0'
+#0#5'TMemo'#10'memEnvList'#4'Left'#2#16#6'Height'#3'_'#1#3'Top'#2'0'#5'Width'
+#3#226#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'Scroll'
+'Bars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#7'TButton'#11'btnCheckNow'#4'Lef'
+'t'#2#16#6'Height'#2#25#3'Top'#2#8#5'Width'#2's'#7'Caption'#6#11'Check Now..'
+#7'OnClick'#7#16'btnCheckNowClick'#8'TabOrder'#2#1#0#0#0
]);
5 changes: 2 additions & 3 deletions uenvironmentchecker.pas
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ function TfrmEnvironmentCheck.DLLScan(expectedPath : rawbytestring) : Boolean;
{$endif}

{$ifdef Linux}
memEnvList.Text:= 'Number of SO files expected : 1' + LineEnding +
'Expected SO files and SHA-1 hashes: ' + LineEnding +
'libewf-Linux-x64.so' + #9#9 + '2376C9092754ABF401CFA1D17C00801DAAB4D143' + Lineending;
memEnvList.Text:= 'Number of SO files expected : 1' + LineEnding +
'Expected SO file: libewf-Linux-x64.so' + Lineending;
{$endif}
try
memEnvList.Lines.Add('Found these libraries and computed SHA-1 hashes:');
Expand Down

0 comments on commit 5d91883

Please sign in to comment.