Skip to content

Commit

Permalink
Add .f postfix to version number (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
lighterowl authored Apr 1, 2023
1 parent 4dd6ade commit 9984b83
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/build_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ chmod +x linuxdeploy-x86_64.AppImage
curl -L -O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage

VERSION= ./linuxdeploy-x86_64.AppImage -e transgui --create-desktop-file \
app_ver=$(cat ../VERSION.txt)
VERSION=$app_ver ./linuxdeploy-x86_64.AppImage -e transgui --create-desktop-file \
--appdir AppDir --output appimage -i ../transgui.png --plugin qt
sha256sum transgui--x86_64.AppImage
sha256sum transgui-${app_ver}-x86_64.AppImage
mv transgui-${app_ver}-x86_64.AppImage transgui-x86_64.AppImage
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: TransGUI Linux
path: units/transgui--x86_64.AppImage
path: units/transgui-x86_64.AppImage
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.18.0
5.18.0.f
43 changes: 36 additions & 7 deletions main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ interface
Graphics, Dialogs, ComCtrls, Menus, ActnList, LCLVersion,
httpsend, StdCtrls, fpjson, jsonparser, ExtCtrls, rpc, syncobjs, variants, varlist, IpResolver,
zipper, ResTranslator, VarGrid, StrUtils, LCLProc, Grids, BaseForm, utils, AddTorrent, Types,
LazFileUtils, LazUTF8, StringToVK, passwcon, GContnrs,lineinfo, RegExpr;

const
AppName = 'Transmission Remote GUI';
AppVersion = '5.18.0';
LazFileUtils, LazUTF8, StringToVK, passwcon, GContnrs,lineinfo, RegExpr,
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
fileinfo, winpeimagereader, elfreader, machoreader;

resourcestring
sAll = 'All torrents';
Expand Down Expand Up @@ -793,6 +793,8 @@ TMainForm = class(TBaseForm)
procedure _onException(Sender: TObject; E: Exception);
end;

function AppName: string;
function AppVersion: string;
function ExcludeInvalidChar (path: string): string; // PETROV
function GetBiDi: TBiDiMode;
function CheckAppParams: boolean;
Expand Down Expand Up @@ -979,10 +981,36 @@ implementation
SizeNames: array[1..5] of string = (sByte, sKByte, sMByte, sGByte, sTByte);

var
FAppName: string;
FAppVersion: string;
TR_STATUS_STOPPED, TR_STATUS_CHECK_WAIT, TR_STATUS_CHECK, TR_STATUS_DOWNLOAD_WAIT, TR_STATUS_DOWNLOAD, TR_STATUS_SEED_WAIT, TR_STATUS_SEED: integer;

function AppName: string;
begin
Result := FAppName;
end;

{$ifdef windows}
function AppVersion: string;
begin
Result := FAppVersion;
end;

procedure ReadVersionInfo;
var
file_ver_info : TFileVersionInfo;
begin
{{ https://wiki.lazarus.freepascal.org/Show_Application_Title,_Version,_and_Company }}
file_ver_info := TFileVersionInfo.Create(nil);
try
file_ver_info.ReadFileInfo;
FAppName := file_ver_info.VersionStrings.Values['ProductName'];
FAppVersion := file_ver_info.VersionStrings.Values['ProductVersion'];
finally
file_ver_info.Free;
end;
end;

{$ifdef windows}
function WndCallback(Ahwnd: HWND; uMsg: UINT; wParam: WParam; lParam: LParam):LRESULT; stdcall;
begin
if (uMsg=WM_HOTKEY) and (WParam=HotKeyID) then
Expand All @@ -995,7 +1023,7 @@ function WndCallback(Ahwnd: HWND; uMsg: UINT; wParam: WParam; lParam: LParam):LR
result:=CallWindowProc(PrevWndProc,Ahwnd, uMsg, WParam, LParam);
end;

{$endif windows}
{$endif windows}

function IsHash(Hash: String): boolean;
var i: integer;
Expand Down Expand Up @@ -8032,6 +8060,7 @@ procedure TMainForm.FillSpeedsMenu;

initialization
{$I main.lrs}
ReadVersionInfo;

finalization
try
Expand Down
2 changes: 1 addition & 1 deletion transgui.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="5"/>
<MinorVersionNr Value="18"/>
<StringTable CompanyName="Transmission Remote GUI working group" FileDescription="Transmission Remote GUI" InternalName="transgui" LegalCopyright="Copyright (c) 2008-2019 by Yury Sidorov &amp; Transmission Remote GUI working group" OriginalFilename="transgui.exe" ProductName="Transmission Remote GUI" ProductVersion="5.18.0"/>
<StringTable CompanyName="Transmission Remote GUI working group" FileDescription="Transmission Remote GUI" InternalName="transgui" LegalCopyright="Copyright (c) 2008-2019 by Yury Sidorov &amp; Transmission Remote GUI working group" OriginalFilename="transgui.exe" ProductName="Transmission Remote GUI" ProductVersion="5.18.0.f"/>
</VersionInfo>
<BuildModes>
<Item Name="Debug" Default="True"/>
Expand Down

0 comments on commit 9984b83

Please sign in to comment.