Pass os=linux GET parameter to online update checker, and sync .deb filename with Windows installer filename

This commit is contained in:
Ansgar Becker
2025-05-06 17:46:50 +02:00
parent 82b950036a
commit 80764bf46f
3 changed files with 9 additions and 5 deletions

5
.gitignore vendored
View File

@@ -27,4 +27,7 @@ backup/
lib/
# Application bundle for Mac OS
*.app/
*.app/
# Compiled translations
/out/locale/heidisql.*.mo

View File

@@ -39,7 +39,7 @@ echo Build executable...
lazbuild heidisql.lpi
# create directory and prepare files
packageDir="$APPNAME-$fullVer"
packageDir="$APPNAME_$fullVer"
echo Creating package directory $packageDir
cp -R deb-package-skeleton $packageDir
rm $packageDir/usr/share/heidisql/locale/.gitkeep

View File

@@ -149,7 +149,7 @@ begin
// Prepare download
CheckfileDownload := THttpDownload.Create(Self);
CheckfileDownload.TimeOut := 5;
CheckfileDownload.URL := APPDOMAIN+'updatecheck.php?r='+IntToStr(Mainform.AppVerRevision)+'&bits='+IntToStr(GetExecutableBits)+'&t='+EncodeURLParam(DateTimeToStr(Now));
CheckfileDownload.URL := APPDOMAIN+'updatecheck.php?r='+IntToStr(Mainform.AppVerRevision)+'&bits='+IntToStr(GetExecutableBits)+'&os='+EncodeURLParam(GetOS.ToLower)+'&t='+EncodeURLParam(DateTimeToStr(Now));
CheckFilename := GetTempDir + APPNAME + '_updatecheck.ini';
// Download the check file
@@ -256,9 +256,10 @@ end;
function TfrmUpdateCheck.GetLinkUrl(Sender: TObject; LinkType: String): String;
var
DownloadParam, PlaceParam: String;
DownloadParam, PlaceParam, OsParam: String;
begin
PlaceParam := 'place='+EncodeURLParam(TWinControl(Sender).Name);
OsParam := 'os='+EncodeURLParam(GetOS.ToLower);
if LinkType = SLinkDownloadRelease then begin
if AppSettings.PortableMode then begin
@@ -269,7 +270,7 @@ begin
end else begin
DownloadParam := 'download=installer';
end;
Result := 'download.php?'+DownloadParam+'&'+PlaceParam;
Result := 'download.php?'+DownloadParam+'&'+PlaceParam+'&'+OsParam;
end
else if LinkType = SLinkChangelog then begin