Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
artem78 committed Sep 8, 2023
2 parents bcb4e67 + 7758126 commit 5fef914
Show file tree
Hide file tree
Showing 30 changed files with 1,286 additions and 233 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ dunit.ini
/Test/AutoScreenshotTest
/Test/AutoScreenshotTestGUI
/*log.txt

# Linux build files
/DEBUILD/
/DEBUILD.sh
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libs/Cross.Codebot"]
path = libs/Cross.Codebot
url = ../../sysrpl/Cross.Codebot.git
url = [email protected]:artem78/Cross.Codebot.git
111 changes: 109 additions & 2 deletions AutoScreenshot.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,87 @@
<MinorVersionNr Value="12"/>
<StringTable FileDescription="Automatic screenshot maker" ProductName="Auto Screenshot" ProductVersion="1.12"/>
</VersionInfo>
<CustomData Count="13">
<Item0 Name="lazpackager/copyright" Value="2020-2023, Artem Demin &lt;[email protected]>"/>
<Item1 Name="lazpackager/deb/ppa" Value="ppa:artem78/autoscreenshot"/>
<Item2 Name="lazpackager/deb/series" Value="precise"/>
<Item3 Name="lazpackager/deb/tpl_changelog" Value="?PACKAGE_NAME? (?FULLVERSION?) ?SERIES?; urgency=low
* Original version ?VERSION? packaged with lazdebian
-- ?MAINTAINER? &lt;?MAINTAINER_EMAIL?> ?DATER?
"/>
<Item4 Name="lazpackager/deb/tpl_control" Value="Source: ?PACKAGE_NAME?
Maintainer: ?MAINTAINER? &lt;?MAINTAINER_EMAIL?>
Section: misc
Priority: optional
Standards-Version: 3.9.3
Build-Depends: fpc, lazarus, lcl, lcl-utils, debhelper (>= 8)
Homepage: https://github.com/artem78/AutoScreenshot
Vcs-Git: https://github.com/artem78/AutoScreenshot.git
Vcs-Browser: https://github.com/artem78/AutoScreenshot
Package: ?PACKAGE_NAME?
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, openssl
Description: ?DESCRIPTION?
?DESCRIPTION_LONG?
"/>
<Item5 Name="lazpackager/deb/tpl_copyright" Value="Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/artem78/AutoScreenshot
Upstream-Contact: ?MAINTAINER? &lt;?MAINTAINER_EMAIL?>
Files: *
Copyright: ?COPYRIGHT?
License: GPL-3
"/>
<Item6 Name="lazpackager/deb/tpl_rules" Value="#!/usr/bin/make -f
ROOT = $(CURDIR)/debian/?PACKAGE_NAME?
override_dh_auto_clean:
$(RM) -r lib
$(RM) lib *.res ?EXECUTABLE?
override_dh_auto_build:
lazbuild --build-mode=&quot;Release&quot; ?PROJECT?
override_dh_auto_install:
install -d -m 755 &quot;$(ROOT)/usr/bin&quot;
install -s -m 755 ?EXECUTABLE? &quot;$(ROOT)/usr/bin/autoscreenshot&quot;
install -d -m 755 &quot;$(ROOT)/usr/share/autoscreenshot/lang&quot;
cp lang/*.ini &quot;$(ROOT)/usr/share/autoscreenshot/lang/&quot;
chmod -R 644 &quot;$(ROOT)/usr/share/autoscreenshot/lang/&quot;
install -d -m 755 &quot;$(ROOT)/usr/share/applications&quot;
sed -e &apos;/^\s*#/d; /^\s*$$/d&apos; &quot;autoscreenshot.desktop&quot; > &quot;autoscreenshot_tmp.desktop&quot;
install -m 644 &quot;autoscreenshot_tmp.desktop&quot; &quot;$(ROOT)/usr/share/applications/autoscreenshot.desktop&quot;
for size in $$(ls -1 res | egrep -o main_icon_[0-9]+px.png | egrep -o [0-9]+); do \
install -d -m 755 &quot;$(ROOT)/usr/share/icons/hicolor/$${size}x$${size}/apps&quot;; \
install -m 644 -T &quot;res/main_icon_$${size}px.png&quot; &quot;$(ROOT)/usr/share/icons/hicolor/$${size}x$${size}/apps/autoscreenshot.png&quot;; \
done
%:
dh $@
"/>
<Item7 Name="lazpackager/description" Value="Automatic screenshot maker"/>
<Item8 Name="lazpackager/description_long" Value="Auto Screenshot — application for automatic taking screenshots with specified time interval."/>
<Item9 Name="lazpackager/export_cmd" Value="?CP? *.lpi ?TEMPFOLDER?/
?CP? *.lpr ?TEMPFOLDER?/
?CP? *.pas ?TEMPFOLDER?/
?CP? *.lfm ?TEMPFOLDER?/
?CP? *.ico ?TEMPFOLDER?/
?CP? -r res/ ?TEMPFOLDER?/
?CP? *.inc ?TEMPFOLDER?/
?CP? -r libs/ ?TEMPFOLDER?/
?CP? -r lang/ ?TEMPFOLDER?/
?CP? *.desktop ?TEMPFOLDER?/
?CP? -rf debian ?TEMPFOLDER?/"/>
<Item10 Name="lazpackager/maintainer" Value="Artem Demin"/>
<Item11 Name="lazpackager/maintainer_email" Value="[email protected]"/>
<Item12 Name="lazpackager/package_name" Value="autoscreenshot"/>
</CustomData>
<BuildModes Count="5">
<Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
Expand Down Expand Up @@ -88,7 +169,20 @@
</Options>
</Linking>
<Other>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CustomOptions Value="-dBorland
-dVer150
-dDelphi7
-dCompiler6_Up
-dPUREPASCAL
-dSIMULATE_OLD_FILES_DELETION"/>
<OtherDefines Count="6">
<Define0 Value="Borland"/>
<Define1 Value="Ver150"/>
<Define2 Value="Delphi7"/>
<Define3 Value="Compiler6_Up"/>
<Define4 Value="PUREPASCAL"/>
<Define5 Value="SIMULATE_OLD_FILES_DELETION"/>
</OtherDefines>
</Other>
</CompilerOptions>
</Item2>
Expand Down Expand Up @@ -226,7 +320,7 @@
<PackageName Value="LCL"/>
</Item4>
</RequiredPackages>
<Units Count="17">
<Units Count="19">
<Unit0>
<Filename Value="AutoScreenshot.lpr"/>
<IsPartOfProject Value="True"/>
Expand Down Expand Up @@ -319,6 +413,19 @@
<IsPartOfProject Value="True"/>
<UnitName Value="Codebot.Input.Hotkeys"/>
</Unit16>
<Unit17>
<Filename Value="oldscreenshotcleaner.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="OldScreenshotCleaner"/>
</Unit17>
<Unit18>
<Filename Value="udonateform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="DonateForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="uDonateForm"/>
</Unit18>
</Units>
</ProjectOptions>
<CompilerOptions>
Expand Down
10 changes: 9 additions & 1 deletion MakeInstallerAndZip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ function MakeZip(){
cp -v --preserve=timestamps lang/*.ini "$BuildDir/lang/"
echo "Done!"
echo ""

# Move files to subfolder
TmpDir=$(mktemp -d --suffix "-AutoScreenshotBuild")
echo "TmpDir=${TmpDir}"
#mkdir -p "$TmpDir/AutoScreenshot_${ProgramVersion}"
cp -R --preserve=timestamps "$BuildDir" "$TmpDir/AutoScreenshot_${ProgramVersion}"

# Pack to ZIP archive
### Note! For MinGW (Git Bash) see https://stackoverflow.com/a/55749636 ###
Expand All @@ -96,11 +102,13 @@ function MakeZip(){
fi
ZipPath="$TargetZipDir/AutoScreenshot_${ProgramVersion}_${OsTypeName}_portable.zip"
rm -f "$ZipPath"
cd "$BuildDir"
cd "$TmpDir"
zip -r "$ZipPath" *
#tar -C "$BuildDir" -cvf "$ZipPath" "$BuildDir/*"
echo "Done!"
echo ""

rm -rf "$TmpDir"
}

function MakeInstaller(){
Expand Down
1 change: 1 addition & 0 deletions Test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
out/
21 changes: 15 additions & 6 deletions Test/AutoScreenshotTest.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,29 @@
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="4">
<Item1>
<PackageName Value="fpcunittestrunner"/>
<PackageName Value="BGRABitmapPack"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
<PackageName Value="fpcunittestrunner"/>
</Item2>
<Item3>
<PackageName Value="FCL"/>
<PackageName Value="LCL"/>
</Item3>
<Item4>
<PackageName Value="FCL"/>
</Item4>
</RequiredPackages>
<Units Count="5">
<Units Count="6">
<Unit0>
<Filename Value="AutoScreenshotTest.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="uTestCases.pas"/>
<Filename Value="utilstests.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="UtilsTests"/>
</Unit1>
<Unit2>
<Filename Value="..\uUtils.pas"/>
Expand All @@ -62,6 +66,11 @@
<IsPartOfProject Value="True"/>
<UnitName Value="uUtilsMore"/>
</Unit4>
<Unit5>
<Filename Value="grabbertests.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="GrabberTests"/>
</Unit5>
</Units>
</ProjectOptions>
<CompilerOptions>
Expand Down
3 changes: 2 additions & 1 deletion Test/AutoScreenshotTest.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{$mode objfpc}{$H+}

uses
Interfaces, Forms, consoletestrunner, fpcunittestrunner, uTestCases;
Interfaces, Forms, consoletestrunner, fpcunittestrunner, UtilsTests,
GrabberTests;

{$R *.res}

Expand Down
21 changes: 15 additions & 6 deletions Test/AutoScreenshotTestGUI.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,29 @@
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="3">
<RequiredPackages Count="4">
<Item1>
<PackageName Value="fpcunittestrunner"/>
<PackageName Value="BGRABitmapPack"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
<PackageName Value="fpcunittestrunner"/>
</Item2>
<Item3>
<PackageName Value="FCL"/>
<PackageName Value="LCL"/>
</Item3>
<Item4>
<PackageName Value="FCL"/>
</Item4>
</RequiredPackages>
<Units Count="5">
<Units Count="6">
<Unit0>
<Filename Value="AutoScreenshotTestGUI.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="uTestCases.pas"/>
<Filename Value="utilstests.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="UtilsTests"/>
</Unit1>
<Unit2>
<Filename Value="..\uUtils.pas"/>
Expand All @@ -62,6 +66,11 @@
<IsPartOfProject Value="True"/>
<UnitName Value="uUtilsMore"/>
</Unit4>
<Unit5>
<Filename Value="grabbertests.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="GrabberTests"/>
</Unit5>
</Units>
</ProjectOptions>
<CompilerOptions>
Expand Down
3 changes: 2 additions & 1 deletion Test/AutoScreenshotTestGUI.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{$mode objfpc}{$H+}

uses
Interfaces, Forms, GuiTestRunner, fpcunittestrunner, uTestCases;
Interfaces, Forms, GuiTestRunner, fpcunittestrunner, UtilsTests,
GrabberTests;

{$R *.res}

Expand Down
Loading

0 comments on commit 5fef914

Please sign in to comment.