Compare commits

...

2,294 commits

Author SHA1 Message Date
rich2014
b1f7784288 UPD: update Finder Icon in Modern ToolBar on macOS 2026-06-21 16:07:30 +08:00
rich2014
b2d943430e UPD: when copying files from iCloud to Stash, set the App MountPoint path to the App path 2026-06-21 11:01:57 +08:00
rich2014
c393e90939 FIX: the resources cleaned up issue in Wcx/Zip 2026-06-20 22:28:17 +08:00
rich2014
59e3bdce3c FIX: the issue that resources were not properly cleaned up when user canceled in MultiArchive/7z 2026-06-20 22:14:23 +08:00
rich2014
ed6d2a875d FIX: CurrentFileFrom/CurrentFileTo update in MultiArchive/7z 2026-06-20 16:45:23 +08:00
rich2014
35c02857da UPD: more accurate TotalFiles and TotalBytes in TarWriter 2026-06-20 16:38:14 +08:00
rich2014
b8cd177ba3 FIX: DoneBytes error caused by enabling OperationProgressHandler() in oneByOne mode in MultiArchive/7z 2026-06-20 16:35:52 +08:00
rich2014
f857fb19fd FIX: progress calc in MultiArchive/7z 2026-06-20 15:10:03 +08:00
rich2014
e26d1c1cdb FIX: progress calc in Wcx/zip 2026-06-20 09:44:14 +08:00
rich2014
10428e142b FIX: progress calc in TarWriter 2026-06-20 09:40:54 +08:00
rich2014
64a37d0c69 DEL: remove TTarWriter.ProcessTree() (TarBegin/TarFiles/TarEnd instead) 2026-06-19 14:59:59 +08:00
rich2014
54d6654ad1 UPD: improve sourcePath/targetPath when copying from iCloud to MultiArchive/7z 2026-06-18 21:21:42 +08:00
rich2014
0e7285f3e0 UPD: after copying files to Wcx/Zip, reload all FileViews that have that Wcx/Zip open 2026-06-18 13:12:53 +08:00
rich2014
487a3602cc UPD: disable flatview in Stash 2026-06-18 09:22:19 +08:00
rich2014
780a53bffc FIX: dangling(FMultiArcItem) and leak(FOutputParser) in uMultiArchiveFileSource 2026-06-18 09:06:41 +08:00
rich2014
44b1ebfb9a UPD: refactor to merge self doPackFilesOneByOne() and doMultiPackFiles() 2026-06-17 22:47:09 +08:00
rich2014
a26474651f UPD: Maintaining the correct destination path structure when copying multiple files from Virtual FileSource with '%F' to MultiArchive/7z 2026-06-17 19:48:29 +08:00
rich2014
2f70adb75b FIX: the issue that iCloud can't be packed by MultiArchive/7z 2026-06-17 16:29:57 +08:00
rich2014
af2894c6ef UPD: Maintaining the correct destination path structure when copying multiple files from Virtual FileSource to MultiArchive/Tar 2026-06-17 15:29:19 +08:00
rich2014
887f34e670 UPD: improve removeFiles handling in ArchiveCopyInOperation 2026-06-17 13:25:11 +08:00
rich2014
b2cb9435c5 UPD: Maintaining the correct destination path structure when copying multiple files from Virtual FileSource to MultiArchive/7z 2026-06-17 11:56:32 +08:00
rich2014
9b4c0854da UPD: apply 'cm_openstash' in TStashFileSource.GetMainIcon() 2026-06-17 09:38:53 +08:00
rich2014
6d0fcfee45 ADD: support iconName/svg in DarwinImage 2026-06-17 09:36:27 +08:00
rich2014
9597fcd28d UPD: Maintaining the correct destination path structure when copying multiple files from Virtual FileSource to Wcx/Tar 2026-06-17 08:26:45 +08:00
rich2014
55006f111a ADD: TarBegin/TarFiles/TarEnd in TarWriter to support ProcessFilesWithMultiRootPath() 2026-06-17 08:26:45 +08:00
Alexander Koblov
e853d5237e UPD: Russian language file 2026-06-16 18:32:59 +03:00
rich2014
81f889e677 FIX: If a temporary tar file is generated during the pack process, and the user subsequently cancels, the temporary tar file will not be deleted 2026-06-15 22:36:26 +08:00
rich2014
dae67778de UPD: simplify TWcxArchiveCopyInOperation.MainExecute() by ProcessFilesWithMultiRootPath() 2026-06-15 22:27:11 +08:00
rich2014
630c19c2f2 ADD: ProcessFilesWithMultiRootPath() in uArchiveFileSourceUtil 2026-06-15 22:25:32 +08:00
rich2014
35304eb238 FIX: the issue that FArcFileList in WcxArchiveFileSource was not cleared after the ArchiveFile were removed 2026-06-15 13:12:25 +08:00
rich2014
9b49371938 ADD: Count() in TThreadObjectList 2026-06-15 13:08:57 +08:00
rich2014
9add69adef UPD: improve packFileOneByOne() to packFilesPathByPath() in uWcxArchiveCopyInOperation 2026-06-14 23:32:59 +08:00
rich2014
dd3f3f70db ADD: sort() in TFiles 2026-06-14 23:32:04 +08:00
rich2014
77a97865cf FIX: pack files from Stash to iCloud 2026-06-14 19:32:12 +08:00
Alexander Koblov
4cc05afbf0 UPD: DCTheme icon theme cache file 2026-06-14 14:24:44 +03:00
Alexander Koblov
d586796cc0 ADD: Stash actions icons 2026-06-14 14:24:44 +03:00
rich2014
fda9362805 ADD: apply fsoPack/TFileSourceProcessor in cm_PackFiles() to support various FileSources 2026-06-14 13:49:06 +08:00
rich2014
be807fdb54 ADD: support fsoPack in TMountedFileSourceProcessor/iCloud 2026-06-14 13:26:16 +08:00
rich2014
4594d225d5 ADD: support fsoPack in TSearchResultFileSourceProcessor 2026-06-14 13:25:22 +08:00
rich2014
7db7e41489 ADD: support fsoPack in TStashFileSourceProcessor 2026-06-14 13:24:41 +08:00
rich2014
53f9c3c42f ADD: fsoPack/TDefaultFileSourceProcessor.consultPackOperation() 2026-06-14 10:25:38 +08:00
VenusGirl❤
9cabced1e8
UPD: Korean language file (#2928) 2026-06-13 23:59:57 +03:00
Alexander Koblov
ef570c9af4 FIX: Background context menu in the special file sources (like search results) 2026-06-13 16:24:28 +03:00
Alexander Koblov
1d49ade80b ADD: Stash context menu items 2026-06-13 15:17:35 +03:00
rich2014
3276638149 UPD: simplify TMountedFileSourceProcessor.detectIfSupportOperation() by TFiles.params.files.allFilesAtSamePath() 2026-06-12 19:24:41 +08:00
rich2014
969fc8d240 UPD: improve copying multi difference paths from Search Result 2026-06-12 19:21:57 +08:00
rich2014
33bf56ea9b UPD: improve copying multi difference paths from Stash FileSource 2026-06-12 19:20:59 +08:00
rich2014
34013fda7d UPD: Maintaining the correct destination path structure when copying multiple files from Virtual FileSource to Wcx/Zip 2026-06-12 19:19:14 +08:00
rich2014
e9c05e6aaf ADD: infrastructure for Virtual FileSource in TFiles 2026-06-12 19:18:59 +08:00
rich2014
a260581a01 FIX: the issue that the List would refresh multiple times after updating the Archive (trigger EFileSourceOperationAborting) 2026-06-12 08:30:57 +08:00
rich2014
3e869b4d9a FIX: TStashFileSource.GetMainIcon() in Stash on Windows 2026-06-12 08:29:35 +08:00
Alexander Koblov
818a171374 FIX: Stash context menu 2026-06-11 21:53:56 +03:00
rich2014
9781239310 UPD: '..' returns the path that does not end with PathDelimiter #2924 2026-06-11 09:39:34 +08:00
rich2014
39ef1ea0f3 FIX: the issue related to '..' at the top of FileSource #2922 2026-06-11 00:31:41 +08:00
rich2014
56a26c8568 UPD: improve prompt in TfrmMain.MoveFiles() 2026-06-10 19:41:41 +08:00
rich2014
7a22f56648 UPD: replace with fspDirectAccess for better compatibility with various FileSources in TMountedFileSourceProcessor 2026-06-10 19:40:54 +08:00
rich2014
888b9ee558 FIX: remove fspSearchable from TSearchResultFileSource.GetProperties() if it's created from Wcx/Zip 2026-06-10 19:39:55 +08:00
rich2014
5dec42098a FIX: the issue of moving files from SearchResult 2026-06-10 19:24:44 +08:00
rich2014
55299c7771 FIX: the issue of copying files from SearchResult 2026-06-10 18:51:44 +08:00
rich2014
18bc5f7a6e FIX: consultResult may be changed by the subclass 2026-06-10 15:05:23 +08:00
rich2014
0439ed958b UPD: add fspImmutable for immutable File Source (eg. search result) 2026-06-09 18:11:18 +08:00
rich2014
de67618dd8 ADD/StashFS: step-31: improve TStashFileSourceProcessor 2026-06-09 18:11:08 +08:00
rich2014
ed2cc821b2 UPD: the buttons in Modern ToolBar can be enabled or disabled based on FileSource.Properties on macOS 2026-06-09 13:29:59 +08:00
rich2014
bebe20e6f9 UPD: remove unreachable code in TFileSystemFileSourceProcessor.consultCopyOperation() 2026-06-09 10:20:20 +08:00
rich2014
e9f3c49ed8 ADD/StashFS: step-30: forbid Copying/Moving between Stash FileViews 2026-06-09 10:09:44 +08:00
rich2014
0702ce507b UPD: remove unused units 2026-06-09 09:48:30 +08:00
rich2014
d47f5f91af ADD/StashFS: step-29: support multi-thread in StashFilesBackend 2026-06-09 09:47:21 +08:00
rich2014
cf6e1725e1 ADD/StashFS: step-28: support Copy/Move options 2026-06-09 09:30:40 +08:00
rich2014
145a333a44 ADD/StashFS: step-27: improve context menu and path name 2026-06-09 08:33:51 +08:00
rich2014
08cc9d88c4 UPD: update zh_TW 2026-06-09 08:33:51 +08:00
rich2014
ec5afcc3b0 UPD: update zh_CN 2026-06-09 08:33:51 +08:00
rich2014
f2ffcd3e56 ADD/StashFS: step-26: i18n 2026-06-09 08:33:51 +08:00
rich2014
f08d3af019 ADD/StashFS: step-25: add cm_RemoveFromStash/cm_EmptyStash 2026-06-09 08:33:51 +08:00
rich2014
89ce532f2c ADD/StashFS: step-24: add actOpenStash/cm_OpenStash/"Open Stash" Menu Item, 2026-06-09 08:33:51 +08:00
rich2014
b5ceffa7c4 ADD/StashFS: step-23: support Move Files 2026-06-09 08:33:51 +08:00
rich2014
de9e30608c FIX: keep the handling of OperationOptionsUIClass consistent with CopyFiles() in MoveFiles 2026-06-09 08:33:51 +08:00
Alexander Koblov
33ec2efc9f UPD: DCTheme icon theme 2026-06-08 20:11:01 +03:00
rich2014
733fb94cd7 UPD: replace with fspSaveableLoadable for better compatibility with various FileSources in TFileView.SaveConfiguration() 2026-06-08 11:37:51 +08:00
rich2014
5ccb678297 UPD: replace with fspDirectAccess for better compatibility with various FileSources in ShowExtractDlg() 2026-06-08 10:44:39 +08:00
rich2014
a7e860aa16 UPD: implement GetRealPath() in SearchResultFileSource/StashFileSource 2026-06-08 10:08:43 +08:00
rich2014
a3b021ee76 UPD: replace with CurrentRealPath() for better compatibility with various FileSources in UpdatePrompt() 2026-06-08 09:49:59 +08:00
rich2014
32a3016ee0 ADD/StashFS: step-22: support execute/testArchive 2026-06-08 09:31:21 +08:00
rich2014
f5b670bc2d UPD: replace the check on TFileSystemFileSource with fspDirectAccess in cm_FileProperties and TestArchive. 2026-06-08 09:30:30 +08:00
rich2014
4e7a2ccba3 ADD/StashFS: step-21: support wipe/split/combine/calcStatistics 2026-06-08 00:02:14 +08:00
rich2014
160cf95492 FIX: the potential file list exception that might be triggered when adding a FileSource (eg. Search Result)
it's done by clearing the current file list that shouldn't be cloned, as they will be replaced during AddFileSource
2026-06-07 18:41:53 +08:00
rich2014
76e7585c30 FIX: the issue that original file list and new file list competed for updates when changing folders in FileView
it's because the original file list was not cleared, and there was another update before the new file list was loaded
2026-06-07 18:35:10 +08:00
rich2014
714d00fcec UPD: use GoToPrevHistory instead of RemoveCurrentFileSource to navigate to the parent when the current FileSource is at the Root 2026-06-07 10:16:39 +08:00
rich2014
d843b84a80 FIX: the '..' issue in TFile.SplitIntoNameAndExtension() 2026-06-06 16:36:14 +08:00
rich2014
19bfc7bc06 UPD: change the default terminal parameter from '%D' to '%d0' on macOS 2026-06-06 16:36:10 +08:00
rich2014
5af28c634e UPD: improve handling when ".." is selected in ReplaceVarParams() 2026-06-06 16:36:07 +08:00
rich2014
c007bfa8e8 ADD/StashFS: step-20: forbid creating directories 2026-06-06 16:36:03 +08:00
rich2014
7e82c17bcf ADD/StashFS: step-19: support deleting files 2026-06-06 16:35:59 +08:00
rich2014
9f4bca8c66 FIX: Compilation error on Windows and Linux 2026-06-05 23:56:37 +08:00
rich2014
b32aac982c ADD/StashFS: step-18: improve in TStashFileSource.IsSupportedPath()/TrailingPathDelimiter 2026-06-05 22:57:11 +08:00
rich2014
744a272ba7 ADD/StashFS: step-17: support search in Stash 2026-06-05 22:57:07 +08:00
rich2014
09c3f0de70 ADD/StashFS: step-16: support GetCustomIcon()/GetDisplayFileName() 2026-06-05 22:57:03 +08:00
rich2014
6a1bb39235 ADD/StashFS: step-15: enable StashFileSource 2026-06-05 20:29:02 +08:00
rich2014
4e5db6ccf0 ADD/StashFS: step-14: synchronize Stash changes across each FileViews of the StashFileSource 2026-06-05 20:02:51 +08:00
rich2014
8ba4152f6d FIX: the FileSource that requires singleton may also be created multiple times (FileSystem/iCloud/Stash)
1. turn GetFileSource() to virtual, and apply it in TFileView.LoadConfiguration()
2. add Address in TVfsModule, and apply it in uFileSourceUtil.ChooseFileSource()
2026-06-05 20:02:44 +08:00
rich2014
edccfff2c2 ADD/StashFS: step-13: remove "Add to Stash" in ContextMenu in StashFileSource 2026-06-05 12:06:28 +08:00
rich2014
ee966f872f ADD/StashFS: step-12: "Add to Stash" in ContextMenu/Internal command/Short Cuts 2026-06-05 11:18:20 +08:00
rich2014
a6cdd5849a ADD/StashFS: step-11: addPaths in StashFilesBackend 2026-06-05 11:18:17 +08:00
rich2014
0a146e0119 ADD/StashFS: step-10: context menu for StashFileSource (Remove Stash Items/Empty Stash) 2026-06-05 11:18:13 +08:00
rich2014
89154db05d ADD/StashFS: step-9: improve StashFilesBackend 2026-06-05 11:18:06 +08:00
rich2014
2347cc3f30 ADD/StashFS: step-8: register Stash to VFS 2026-06-05 08:55:40 +08:00
rich2014
3764ee267c ADD/StashFS: step-7: support reload when files changed 2026-06-05 08:54:40 +08:00
rich2014
7749d73320 ADD/StashFS: step-6: remove files that no longer exist from Stash in TStashListOperation 2026-06-05 08:54:34 +08:00
rich2014
a5a8437211 ADD/StashFS: step-5: support rename in StashFileSource 2026-06-05 08:54:30 +08:00
rich2014
6ace022260 ADD/StashFS: step-4: support Change Path in StashFileSource (eliminate TSearchResultFileSource workaround) 2026-06-05 08:54:25 +08:00
rich2014
7084211fc6 ADD/StashFS: step-3: base uStashFileSource 2026-06-05 08:54:18 +08:00
rich2014
bdfb57b282 ADD/StashFS: step-2: base uStashFileSourceOperation 2026-06-05 08:54:04 +08:00
rich2014
844cfd64a8 ADD/StashFS: step-1: base uStashFilesBackend 2026-06-05 08:53:45 +08:00
rich2014
7f6e77ae73 UPD: apply TDCCocoaModernFormUtils to simplify code 2026-06-02 13:39:52 +08:00
rich2014
e864d3458a UPD: update zh_TW 2026-06-02 13:12:09 +08:00
rich2014
da0d4e5c56 UPD: update zh_CN 2026-06-02 13:05:44 +08:00
rich2014
05b135967a UPD: improve the tips of Privilege on macOS 2026-06-02 12:50:05 +08:00
rich2014
a62f046a94 ADD: check if Full Disk Access permission has been granted, if so hide the Privilege Button on the ToolBar 2026-06-02 12:11:27 +08:00
rich2014
05c1e0e6bb ADD: TDarwinApplicationUtil.hasFullDiskAccess() on macOS 2026-06-02 11:56:03 +08:00
rich2014
98533a9d15 ADD: fspSearchable to TFileSourceProperties, and appy in TMainCommands.cm_Search() 2026-06-01 23:10:44 +08:00
rich2014
b1426fd06d ADD: support search files in SearchResultFileSource 2026-06-01 21:20:30 +08:00
rich2014
df9eb65110 ADD: implement AddSearchPath() in TSearchResultFileSource 2026-06-01 21:19:30 +08:00
rich2014
fe307c98e4 UPD: move AddSearchPath() from LocalFileSource into FileSource 2026-06-01 21:18:24 +08:00
rich2014
214e61eb13 FIX: the state of cmbFindPathStart may be incorrect when FindDlg reopened 2026-06-01 20:01:21 +08:00
rich2014
4bde5beaee UPD: fine-tune filename in TfrmFileProperties 2026-06-01 10:19:59 +08:00
rich2014
ef92d2660b UPD: fine-tune TFileSource.GetFilesForPathAndType() 2026-06-01 10:12:12 +08:00
rich2014
9213dd929e FIX: the issue of not clearing the files when handling invalid paths in MountedListOperation 2026-06-01 10:04:59 +08:00
rich2014
d61293302e UPD: comparison can be performed even for TFiles without AttributesProperty in FilesSortFoldersFirst() 2026-06-01 09:47:46 +08:00
rich2014
523c15e297 FIX: the persistent sorting issue in FilesSortFoldersFirst() that was incorrect when comparing two regular files 2026-06-01 09:42:16 +08:00
rich2014
d2971bd587 UPD: improve in TFileSource.GetFilesForPathAndType() 2026-05-31 23:31:23 +08:00
rich2014
1682fc7690 DEL: restore uOSUtils, remove GetFilesInDir() 2026-05-31 23:31:23 +08:00
rich2014
ef724fa7d2 ADD: implement IKASPathEditMate in TfrmCopyDlg, autocomplete is supported on various file sources 2026-05-31 23:31:23 +08:00
rich2014
5267c3387f ADD: implement IKASPathEditMate in TFileViewHeader, autocomplete is supported on various file sources 2026-05-31 23:31:23 +08:00
rich2014
8db33ee722 ADD: IKASPathEditMate in KASPathEdit for further refactor 2026-05-31 23:31:23 +08:00
rich2014
879ef8c6da ADD: GetFilesForPathAndType() in IFileSource, and implement it in TFileSource base on GetFiles() 2026-05-31 23:31:23 +08:00
Alexander Koblov
7bcf801792 ADD: JSONC highlighter (issue #2898) 2026-05-31 16:58:48 +03:00
Alexander Koblov
f5ed3acdfa DEL: Blurry icons 2026-05-31 16:47:39 +03:00
rich2014
c0e020f675 FIX: Compilation error, revert GetFilesInDir() from DCOSUtils into OSUtils 2026-05-31 10:28:45 +08:00
rich2014
a588ff1c95 FIX: the issue of incorrect path Auto Complete in the Copy/Move Dialog 2026-05-31 08:41:45 +08:00
rich2014
701927f0de FIX: the issue of incorrect path Auto Complete in the KASEditPath of FileView 2026-05-31 08:41:44 +08:00
rich2014
5b7cddf5c5 UPD: decouple file functionality from KASPathEdit by TKASPathEditGetFilesFunc, and remove GetFilesInDir() 2026-05-31 08:41:44 +08:00
rich2014
ed931d1894 UPD: copy GetFilesInDir() from KASPathEdit into DCOSUtils to further refactor 2026-05-31 08:41:44 +08:00
VenusGirl❤
c25aeeafb6
UPD: Korean language file (#2900) 2026-05-30 23:44:21 +03:00
Alexander Koblov
5d2ec82799 UPD: Russian language file 2026-05-30 21:03:26 +03:00
Alexander Koblov
0b6f62b153 DEL: Obsolete code 2026-05-30 20:10:53 +03:00
Alexander Koblov
7af7de1d8a FIX: Workaround - missing arrows on the toolbar buttons under Qt6 (issue #2750) 2026-05-30 18:40:46 +03:00
Alexander Koblov
b5f9bae122 FIX: Malformed parameter 2026-05-30 17:03:28 +03:00
Alexander Koblov
7c0b46c0e7 FIX: Wrong scaling (Gtk3) 2026-05-30 16:51:30 +03:00
Alexander Koblov
7d1f047d86 UPD: Korean language file (fixes #2853) 2026-05-30 16:12:21 +03:00
Alexander Koblov
2e4316dd39 UPD: Language files 2026-05-30 16:08:18 +03:00
Alexander Koblov
4178f6e58f ADD: Display RabbitVCS and GVfs emblems when overlay icons enabled 2026-05-30 13:48:46 +03:00
Alexander Koblov
b51733f25e UPD: Always display overlay icons for symbolic links, like other file managers (issue #2854) 2026-05-30 12:51:32 +03:00
Alexander Koblov
45895ad0ed ADD: More extensions to INI highlighter (issue #2898) 2026-05-30 12:45:37 +03:00
Alexander Koblov
0fa82eceb8 UPD: Wfx-plugins - read-only check 2026-05-29 23:27:54 +03:00
Alexander Koblov
d90959dbf0 UPD: Wfx-plugins - display read-only delete confirmation only for files with NTFS attributes 2026-05-29 20:06:09 +03:00
Alexander Koblov
56098e1312 ADD: Editor - Word wrap option (fixes #2886) 2026-05-29 19:59:01 +03:00
rich2014
b05b79bc9a FIX: in the FileViewHeader, the PathEdit will be in the wrong position when the address is visible 2026-05-29 21:56:09 +08:00
rich2014
3fabe6aef5 FIX: Name may be empty in virtual FileSource (root path in Mounted Drive) 2026-05-29 10:44:45 +08:00
Alexander Koblov
6b1a346caa FIX: Build snapshots 2026-05-28 20:49:27 +03:00
EH
3e601a1940
FIX: Virtual terminal - AutoFollow off-by-one and clear resets viewport (#2876) 2026-05-28 20:41:25 +03:00
rich2014
0ec7b7e32b FIX: the issue that TKASCDEdit could not gain focus when clicked 2026-05-28 17:30:15 +08:00
EH
307a682f27
FIX: SyncDirs — enable smooth progress bars (#2893)
Co-authored-by: heredie <heredie@localhost>
2026-05-26 20:46:25 +03:00
EH
adb32099c9
FIX: SyncDirs — preserve symlink timestamps on Linux (bug #3) (#2888) 2026-05-26 20:45:53 +03:00
EH
59607049b2
FIX: SyncDirs — preserve symlink follow/skip choice across file batches (#2887)
When TreeBuilder.BuildFromFiles() runs and the user answers 'follow all'
or 'skip all', the choice is stored in TreeBuilder.FSymLinkOption.
But after FreeAndNil(TreeBuilder) the choice was lost, so each new batch
of files started fresh with gOperationOptionSymLinks (default: ask), and
the dialog re-appeared for every symlink in every subsequent batch.

Fix: write back TreeBuilder.SymLinkOption to Self.SymLinkOption before
freeing the builder so the answer carries forward.

Co-authored-by: heredie <heredie@localhost>
2026-05-26 11:53:55 +03:00
rich2014
246f410673 UPD: simplified expression in UpdateRenameFileEditPosition() 2026-05-26 14:07:44 +08:00
rich2014
92fdf16192 UPD: update i18n for LCL 2026-05-26 14:04:55 +08:00
rich2014
a4c174d5ba UPD: update i18n for LCL 2026-05-25 12:29:43 +08:00
EH
6123a21ed0
FIX: Zip plugin - allow cancelling TAR archive packing mid-operation (#2874)
* FIX: zip plugin - allow cancelling TAR archive packing mid-operation

TAbTarArchive.SaveArchive iterated all items without ever checking
the abort flag, making it impossible to cancel a TAR/TGZ/TBZ2 pack
operation until all files had been written.

Add a DoArchiveProgress call with abort check after each item in the
save loop, identical to the pattern already used in TAbZipArchive.SaveArchive
(abziptyp.pas) and in all extract loops (abarctyp.pas).

When the user cancels, EAbUserAbort is raised, caught in PackFilesW,
and the incomplete archive is deleted if it did not exist before packing.

* FIX: zip plugin - prevent crash on TAR abort inside GZip archive

When TAbUserAbort propagates out of TAbTarArchive.SaveArchive (e.g.
from the abort check added to the save loop), it exits the IsGzippedTar
branch of TAbGzipArchive.SaveArchive without calling SwapToGzip. The
outer finally block then compares FStream (which equals FTarStream,
possibly nil) with NewStream (FGzStream) and incorrectly frees
NewStream. The destructor later calls SwapToGzip (restoring FStream to
the already-freed FGzStream) and then frees FStream a second time,
causing an access violation.

Fix: compare FGzStream instead of FStream in the finally condition.
FGzStream always holds the original gzip stream reference and is never
changed by SwapToTar/SwapToGzip, so the NewStream ownership check is
correct regardless of which swap state the archive is in.

---------

Co-authored-by: heredie <heredie@localhost>
2026-05-23 12:12:23 +03:00
rich2014
10a51f880a UPD: adjust vert alignment type in FileView in Lazarus 4.99 2026-05-23 10:55:00 +08:00
rich2014
617493ec78 UPD: fine-tune the position of the Inplace Rename Button on macOS 2026-05-22 11:33:26 +08:00
rich2014
4843768305 UPD: simplify vert alignment in edtRename in FileView in Lazarus 4.99 2026-05-22 10:47:48 +08:00
PhoebosL
d0140b8834
UPD: NormalizeAccentedChar function (#2865)
* UPD: NormalizeAccentedChar function

Changes in function logic to improve its performance especially in quick search / filter
 instead of Result := Result + cWorkingChar, which allocates memory on each iteration
the changed function in PR now works like so
allocate memory for string -> fill in accent-striped characters -> trim excess of space

* Update uaccentsutils.pas

---------

Co-authored-by: Alexander Koblov <alexx2000@mail.ru>
2026-05-21 10:01:52 +03:00
rich2014
27ca1b3be0 UPD: update zh_CN/zh_TW 2026-05-19 17:58:40 +08:00
rich2014
5e7a25c691 UPD: i18n for 'Open with default App' Modern ToolBar Item in ViewForm on macOS 2026-05-19 14:41:00 +08:00
rich2014
0291126ba2 ADD: 'Open with default App' Modern ToolBar Item in ViewForm on macOS 2026-05-19 14:40:21 +08:00
rich2014
7cf22b45ea FIX: the issue of misaligned image positions after cropping in ViewerForm 2026-05-19 12:40:23 +08:00
rich2014
8918485f72 FIX: Image.Cursor switching issue in ViewerForm 2026-05-19 12:12:32 +08:00
rich2014
f695bd75ae UPD: Remove unnecessary checks on ToolBar1.Visible; checks on btnHightlight.Down are sufficient (especially since ToolBar1 is always hidden on macOS) 2026-05-19 11:32:05 +08:00
rich2014
c6ff324ae8 UPD: refactor UndoXXX into TNormalizedRect in ViewerForm 2026-05-19 10:11:45 +08:00
rich2014
ebbe447b1d FIX: the issue of the selection exceed bounds in Highlight 2026-05-19 09:42:27 +08:00
rich2014
8c3e18eee8 FIX: macOS does not support XOR; when eliminating the selection in Highlight, redrawing is used instead of XOR 2026-05-19 08:47:52 +08:00
rich2014
961eeb5e24 FIX: the issue with incorrect direction when drawing FocusRect in ViewerForm 2026-05-19 08:47:52 +08:00
rich2014
acf007f698 UPD: simplify drawing Rectangle/Ellipse 2026-05-19 08:47:52 +08:00
Alexander Koblov
ab77a7183f FIX: Lazarus 4.6 compatibility 2026-05-18 19:16:56 +03:00
rich2014
e49ddec96c UPD: refactor Undo Rect calc 2026-05-18 21:39:48 +08:00
rich2014
e7d8c81a34 FIX: the issue with incorrect direction when drawing rectangles/ellipses in ViewerForm 2026-05-18 18:19:08 +08:00
rich2014
9088062dec FIX: the issue with incorrect restore area when drawing rectangles/ellipses in ViewerForm 2026-05-18 17:15:47 +08:00
rich2014
77a97a25ed UPD: i18n for Highlight/Paint Modern ToolBar Item in ViewerForm 2026-05-18 12:57:59 +08:00
rich2014
e0f075beea UPD: i18n for GIF Modern ToolBar Item in ViewerForm 2026-05-18 12:57:35 +08:00
rich2014
34c7eb23c0 UPD: i18n for Modern ToolBar Item on middle side in ViewerForm 2026-05-18 12:28:06 +08:00
rich2014
44a15d3e09 UPD: i18n for Modern ToolBar Item on left side in ViewerForm 2026-05-18 11:49:08 +08:00
rich2014
79ccbfddb3 UPD: move translateItemConfig() from ucocoamodernformconfig_editor to ucocoamodernformconfig 2026-05-18 11:47:41 +08:00
rich2014
72d5efc80e UPD: adjust some Icons in Modern Tool Bar in ViewerForm on macOS 2026-05-18 11:09:32 +08:00
rich2014
6e5a8a4d21 UPD: hide the LCL Toolbar in ViewerForm on macOS 11+ again 2026-05-17 22:52:49 +08:00
rich2014
f0a56568d1 ADD: check Slide/PenWidth Modern Form ToolBar selected menu Item in ViewerForm on macOS 2026-05-17 22:44:09 +08:00
rich2014
ec59b39ddb UPD: Lazarus/Cocoa 4.99 compatible 2026-05-17 20:07:08 +08:00
rich2014
91d2178bc7 UPD: don't active quicksearch/filter when Fn Key held 2026-05-16 15:38:20 +08:00
rich2014
d8426b25b6 ADD: support 'Fn' key as modifier for ShortCut on macOS 2026-05-16 15:36:30 +08:00
Alexander Koblov
837cc08394 FIX: Process commands with single quotes (fixes #2862) 2026-05-15 17:40:43 +03:00
Alexander Koblov
d03fa06aee FIX: KASButton - incorrect enabled state 2026-05-15 17:40:43 +03:00
rich2014
198b296abc UPD: improve Paint Modern Tool Bar Item in ViewerForm on macOS 2026-05-15 20:50:46 +08:00
rich2014
65d7f5180c UPD: improve PenColor Modern Tool Bar Item in ViewerForm on macOS 2026-05-15 19:18:56 +08:00
Alexander Koblov
d002cdc373 UPD: Dialog position 2026-05-14 18:29:57 +03:00
Alexander Koblov
7c34dfe389 FIX: Blurry icons 2026-05-14 18:27:51 +03:00
rich2014
043cb97b90 UPD: apply ColorWell in PenColor Modern Tool Bar Item in ViewerForm on macOS 2026-05-14 21:40:55 +08:00
rich2014
97ca989239 UPD: apply emphasize icon in HighLight/Paint Modern Tool Bar Item in ViewerForm on macOS 2026-05-12 20:40:27 +08:00
rich2014
7851fb014f UPD: simplify Gif/Slide Modern Tool Bar Item Icon switching in ViewerForm on macOS base on the new version of Lazaurs 2026-05-12 11:18:19 +08:00
rich2014
be400728aa UPD: disable minimize button in Modeless Form on macOS
on macOS, it's inconvenient to restore minimized non-MainForms, and they're easily forgotten.
it's more convenient to switch between the forms by Command+`, rather than minimizing them.
2026-05-12 11:13:46 +08:00
rich2014
b44064eb2c FIX: fullscreen in ViewerForm 2026-05-12 09:11:58 +08:00
Alexander Koblov
d9920c2839 UPD: Snapshots workflow 2026-05-11 12:10:46 +03:00
rich2014
a5bf4ea880 UPD: improve Resize Modern Tool Bar Item on macOS 2026-05-10 22:49:32 +08:00
rich2014
9d285f8e4b UPD: on macOS, changed Slide Modern Tool Bar Item to the fixed Part (left side), it should work for any file type, not only image 2026-05-10 22:25:12 +08:00
rich2014
12d6002a70 FIX: TimerViewer related in ViewerForm on macOS 2026-05-10 22:22:02 +08:00
rich2014
e5926d7329 FIX: the enabled state of the tool bar items in ViewerForm on macOS 2026-05-10 18:22:56 +08:00
rich2014
b3f9dd2b3f FIX: the issue of Full Screen in ViewerForm 2026-05-10 18:22:03 +08:00
rich2014
b7ea4cdf03 FIX: the issue of attaching/deattaching image edit toolbar on macOS 2026-05-10 09:44:41 +08:00
rich2014
015e8f3ff5 UPD: support entering full-screen by the window's native button in ViewerForm 2026-05-09 23:30:44 +08:00
rich2014
4d6c1e86ad UPD: hide the LCL Toolbar in ViewerForm on macOS 11+ (because of the native Toolbar) 2026-05-09 22:15:35 +08:00
rich2014
c550a0443d UPD: auto hide Modern Form Style ToolBar in Full Screen in Viewer Form on macOS 2026-05-09 21:01:22 +08:00
Alexander Koblov
2b8a209a21 UPD: Use icons from image list 2026-05-09 14:38:54 +03:00
Alexander Koblov
ecf3b8196a FIX: Hide menus icons size option under Qt 2026-05-09 14:38:54 +03:00
rich2014
ae48e071ca ADD: actions to the Slide Modern ToolBar Items in ViewerForm on macOS 11+ 2026-05-09 17:49:55 +08:00
rich2014
e4931b1235 ADD: actions to the Resize Modern ToolBar Items in ViewerForm on macOS 11+ 2026-05-09 12:42:01 +08:00
rich2014
bbb0653d14 ADD: actions to the Paint Modern ToolBar Items in ViewerForm on macOS 11+ 2026-05-09 12:42:01 +08:00
rich2014
2c401b9945 ADD: actions to the HighLight Modern ToolBar Items in ViewerForm on macOS 11+ 2026-05-09 12:42:01 +08:00
rich2014
75954f00f6 ADD: actions to the GIF Modern ToolBar Items in ViewerForm on macOS 11+ 2026-05-09 12:42:01 +08:00
rich2014
c753d6f3cc ADD: actions to the Zoom/Rotate Modern ToolBar Items in ViewerForm on macOS 11+ 2026-05-09 12:42:01 +08:00
rich2014
35ac84e565 ADD: actions to the Preview/Control Modern ToolBar Items in ViewerForm on macOS 11+ 2026-05-09 12:42:01 +08:00
rich2014
765825f714 ADD: support dynamic attach/deattach Image ToolBar Items in ViewerForm 2026-05-09 12:42:01 +08:00
rich2014
cb25db5dac ADD: facilities for dynamically attaching/deattaching ToolBar Items 2026-05-09 12:42:01 +08:00
rich2014
765391e798 ADD: Modern Form Toolbar (UI only) for ViewerForm on macOS 11+ 2026-05-09 12:42:01 +08:00
Alexander Koblov
d2a14e9c26 FIX: Blurry icons 2026-05-08 21:13:36 +03:00
Alexander Koblov
93b08bfeca UPD: Use icons from image list 2026-05-08 17:18:02 +03:00
Alexander Koblov
1cf4aa5876 UPD: DCTheme icon theme cache file 2026-05-08 17:15:36 +03:00
Alexander Koblov
eb40609250 ADD: Lua 5.5 compatibility 2026-05-08 00:14:01 +03:00
Alexander Koblov
151b8faf18 FIX: Viewer - crash under macOS (issue #2815) 2026-05-07 21:28:07 +03:00
Alexander Koblov
84fbc76bb3 FIX: Load history items with leading or trailing space 2026-05-07 00:32:28 +03:00
Demetrius flavious
092b9c716b
UPD: Move DirectoryHotList to localconfig.xml (#2796) 2026-05-07 00:27:26 +03:00
Alexander Koblov
31ea6a2032 UPD: Snapshots workflow 2026-05-06 18:06:15 +03:00
Alexander Koblov
e748d401cc FIX: Remove ScrollWidth (fixes #2847) 2026-05-06 18:02:28 +03:00
Alexander Koblov
a48a556ee6 FIX: Enable auto-sizing 2026-05-05 23:09:12 +03:00
Alexander Koblov
22020d2e85 FIX: Controls alignment 2026-05-05 22:06:18 +03:00
Alexander Koblov
b812db501c FIX: KASButton - draw gray icon when button disabled 2026-05-05 21:24:03 +03:00
Alexander Koblov
b90bfebe33 UPD: Restored the filter icon 2026-05-05 20:46:28 +03:00
Alexander Koblov
f9108d3e0c UPD: Use TKASButton control 2026-05-05 20:38:56 +03:00
Alexander Koblov
6ab558fbef FIX: Lazarus 4.6 compatibility 2026-05-05 20:08:41 +03:00
rich2014
86cb17aa1b FIX: Compilation Temporary with Lazarus 4.99 2026-05-05 12:15:28 +08:00
rich2014
218e68fc40 FIX: the issue that withExt was still being overridden by parameters when the inplace rename editor was already active 2026-05-05 09:40:41 +08:00
Alexander Koblov
dced7dd931 FIX: Build snapshots 2026-05-04 18:23:10 +03:00
rich2014
ad51ed749e UPD: the default gExtraLineSpan is larger on macOS 2026-05-03 23:04:18 +08:00
rich2014
5f8743c335 UPD: update zh_TW 2026-05-03 22:44:51 +08:00
rich2014
1d9a690049 UPD: update zh_CN 2026-05-03 22:43:35 +08:00
rich2014
5383506866 ADD: add 'ExtraLineSpan' setting in Options - Files views extra 2026-05-03 16:33:41 +08:00
rich2014
685a15bcdf UPD: fine-tune the position of the Inplace Rename Button in Columns View Mode 2026-05-02 09:58:31 +08:00
rich2014
c7784ec536 UPD: the inline editor will not occupy the Extension Column when cm_RenameOnly is called with extension=no in Columns View Mode 2026-05-01 23:31:02 +08:00
rich2014
c202082fa9 ADD: 'extension' param for cm_RenameOnly #2597 2026-05-01 16:26:59 +08:00
rich2014
5b2f484fd7 ADD: WithExt in TFileViewWithMainCtrl 2026-05-01 16:14:23 +08:00
Alexander Koblov
3838d61125 FIX: Detect Wayland under Qt6 < 6.9.1 (issue #2752) 2026-04-23 01:44:22 +03:00
Alexander Koblov
d561e7f146 FIX: Enable auto-sizing 2026-04-21 21:21:34 +03:00
Alexander Koblov
3b1c244ed9 UPD: DCTheme icon theme 2026-04-21 20:14:21 +03:00
Alexander Koblov
26733e1ad9 UPD: DCTheme icon theme 2026-04-21 19:36:33 +03:00
Alexander Koblov
b95e3a0aa4 UPD: Use icons from image list 2026-04-20 18:55:31 +03:00
Alexander Koblov
92a94be1a8 UPD: DCTheme icon theme 2026-04-20 18:22:57 +03:00
Alexander Koblov
028529f5d4 FIX: Multi-rename - preset with leading space dropping the space (fixes #1734) 2026-04-20 17:49:44 +03:00
Alexander Koblov
6f9517675e UPD: Use icons from image list 2026-04-20 17:46:07 +03:00
Alexander Koblov
f8cec8aa5b FIX: Blurry icons 2026-04-19 18:44:29 +03:00
Alexander Koblov
cd0df9ff03 UPD: Use icons from image list 2026-04-19 18:29:23 +03:00
Alexander Koblov
ef5b6ce6f5 UPD: Use icons from image list 2026-04-19 18:02:59 +03:00
Alexander Koblov
60e0f669fd UPD: DCTheme icon theme cache file 2026-04-19 15:06:22 +03:00
Alexander Koblov
72e8732ed6 UPD: Use icons from image list 2026-04-19 15:00:05 +03:00
Alexander Koblov
84f71abbc0 UPD: DCTheme icon theme 2026-04-19 15:00:05 +03:00
Alexander Koblov
bc6c15ca9a ADD: Load media-playback-start icon 2026-04-19 15:00:05 +03:00
Alexander Koblov
09e7229cc8 ADD: Load auto-complete icon 2026-04-19 15:00:05 +03:00
Alexander Koblov
7283d74399 UPD: Use icons from image list 2026-04-19 15:00:05 +03:00
Alexander Koblov
5c4f6d0299 FIX: Blurry icons 2026-04-19 15:00:05 +03:00
Alexander Koblov
3ddb204fdc UPD: DCTheme icon theme 2026-04-19 15:00:05 +03:00
rich2014
5e067cbc0b FIX: new version Lazarus compatibility 2026-04-19 17:59:32 +08:00
Alexander Koblov
a20e0931b3 UPD: Buttons use icons from the image list 2026-04-19 00:50:23 +03:00
Alexander Koblov
0368a6e40d ADD: Load open-picture-dialog icon 2026-04-18 21:12:48 +03:00
Alexander Koblov
a9d0801efb UPD: DCTheme icon theme 2026-04-18 21:04:39 +03:00
Alexander Koblov
3916b3abcb UPD: Load buttons icons only from internal theme 2026-04-18 20:19:40 +03:00
Alexander Koblov
1deb745de2 ADD: Capability to load icons only from internal theme 2026-04-18 20:15:23 +03:00
Alexander Koblov
408e76e69a UPD: Use Lazarus buttons icons under Qt6 2026-04-18 20:01:05 +03:00
Alexander Koblov
8a253a806f FIX: Blurry icons 2026-04-18 18:03:35 +03:00
Alexander Koblov
9e4df1c980 UPD: Use some icons from image list 2026-04-18 16:57:10 +03:00
Alexander Koblov
fa2b57c453 ADD: Load buttons icons 2026-04-18 16:38:14 +03:00
Alexander Koblov
c9325738aa ADD: Button icons 2026-04-18 16:31:38 +03:00
Alexander Koblov
b171ec1f3a ADD: KASButton - image list support 2026-04-18 14:36:05 +03:00
Alexander Koblov
96c53ce2d9 DEL: Obsolete workaround 2026-04-18 14:07:37 +03:00
Jozef Gaal
0673a19546
UPD: Slovak language (#2836) 2026-04-17 23:55:57 +03:00
Alexander Koblov
b33bb79302 FIX: Blurry TBitBtn icons under Qt6 with Lazarus 4.6 2026-04-12 13:09:00 +03:00
Alexander Koblov
13c1a12a8e UPD: Controls alignment 2026-04-12 12:34:13 +03:00
Alexander Koblov
147cbde8d0 FIX: Default icons size 2026-04-11 23:46:26 +03:00
Alexander Koblov
f8dd7d0751 FIX: Blurry buttons icons 2026-04-11 16:45:17 +03:00
Alexander Koblov
bc7d7207fe FIX: Controls alignment 2026-04-11 15:58:11 +03:00
Alexander Koblov
f9f2487868 ADD: TKASPanel and TKASGroupBox controls 2026-04-11 15:19:00 +03:00
rich2014
1d4f994af8 FIX: the issue where the Caret Height is incorrect when 'Show as Text' in fViewer 2026-04-07 12:46:39 +08:00
rich2014
ea416ee321 UPD: set Application.ShowMenuGlyphs as the main switch for IconsInMenu to avoid inconsistencies across menus. 2026-04-05 18:36:01 +08:00
rich2014
4c4d9ee02d UPD: set gsmAlways for "Open With" Context Menu Item 2026-04-05 17:52:46 +08:00
rich2014
a41beeaf38 UPD: update zh_TW 2026-04-05 16:45:50 +08:00
rich2014
7eb4b23263 UPD: update zh_CN 2026-04-05 16:11:54 +08:00
rich2014
d98f8e642d FIX: the issue that the Image excess imgCommandIcon bound in frmMainCommandsDlg on Retina Display 2026-04-05 16:03:50 +08:00
Alexander Koblov
6be67cfb80 UPD: Russian language file 2026-04-04 14:32:12 +03:00
Alexander Koblov
b4ee7f9206 UPD: Language files 2026-04-04 14:29:28 +03:00
Alexander Koblov
4fd4024661 UPD: Snapshots workflow 2026-04-04 14:22:46 +03:00
rich2014
b9ae1a170f FIX: the issue that the Image excess sbtnIcon bound on Retina Display 2026-04-04 16:52:03 +08:00
Alexander Koblov
0a66df886b FIX: Draw icon with the correct size when scaling used 2026-04-02 19:45:49 +03:00
Alexander Koblov
4faeb6a6fc FIX: Wrong icon button state 2026-04-02 18:15:52 +03:00
rich2014
870bdf8b91 FIX: the Icon/Button Size in Preview in fViewer 2026-04-02 12:10:05 +08:00
rich2014
70f946eb7a FIX af11aa3: the Icon Display Size in ContextMenu in fEditor 2026-04-02 12:02:37 +08:00
rich2014
4a0514711e FIX af11aa3: the Icon Display Size in ContextMenu and Button in fDiffer 2026-04-02 12:01:18 +08:00
Alexander Koblov
5c8e18b7f9 UPD: Minimal Lazarus version 2026-03-31 18:23:20 +03:00
Alexander Koblov
814f6dfc6c FIX: Load Argon2 parameters 2026-03-31 18:21:31 +03:00
Alexander Koblov
067161fc93 ADD: SyncDirs - selected color option 2026-03-29 17:10:40 +03:00
Alexander Koblov
c6c6c0c15a ADD: SyncDirs - selected color option 2026-03-29 16:56:37 +03:00
Alexander Koblov
af11aa348b FIX: Blurry icons in viewer/editor/differ (issue #2752) 2026-03-29 15:31:05 +03:00
rich2014
d572592446 UPD: update zh_TW 2026-03-28 15:13:02 +08:00
rich2014
e451308c6c UPD: update zh_CN 2026-03-28 12:02:26 +08:00
rich2014
a13ab41a13 FIX: the issue of Services SubMenu in Context Popup Menu #2217 2026-03-27 23:35:19 +08:00
rich2014
0d43aa44d8 FIX: keyCode for F4/F6 in uDarwinFNKey macOS 15+ 2026-03-27 23:28:33 +08:00
rich2014
f98b9a8ece ADD: prompt for gForceFunctionKey authorization after startup 2026-03-27 17:05:14 +08:00
rich2014
41576ba31b ADD: gForceFunctionKey Options 2026-03-27 16:57:11 +08:00
rich2014
6d96a149f3 ADD: FNKeyTap util in TDarwinApplicationUtil 2026-03-27 12:48:10 +08:00
rich2014
79e7e7014a ADD: TDarwinFNKeyTap for #2790 2026-03-27 12:46:27 +08:00
rich2014
ae575fa1c9 FIX: Compilation on macOS 2026-03-25 11:45:25 +08:00
Alexander Koblov
56dea7477d ADD: Find files - select drives button 2026-03-24 20:14:19 +03:00
Alexander Koblov
b6579cd71b UPD: Greek language file 2026-03-22 21:55:42 +03:00
Alexander Koblov
55e92df88e FIX: Alt+Letters typing mode (issue #2785) 2026-03-22 20:53:17 +03:00
rich2014
0bdad89796 UPD: new version Lazarus compatibility 2026-03-20 21:45:11 +08:00
Alexander Koblov
2b0d593338 UPD: Zip - set owner/group before mode 2026-03-18 20:24:52 +03:00
rich2014
62ebd48f22 UPD: new version Lazarus compatibility 2026-03-18 17:07:15 +08:00
Alexander Koblov
3c19843873 ADD: Zip - restore owner when extract from TAR archive (Unix) 2026-03-17 22:45:01 +03:00
Alexander Koblov
214957c269 ADD: Sample wcx-plugin 2026-03-16 17:07:02 +03:00
Alexander Koblov
698d682e04 FIX: cm_OpenArchive behavior for registered extensions 2026-03-16 17:04:18 +03:00
Alexander Koblov
a8ebb41c81 FIX: CanYouHandleThisFile function result type 2026-03-16 16:23:12 +03:00
Alexander Koblov
de6219e1e6 ADD: Viewer - fast rotate and mirror functions for 32 bit images 2026-03-15 15:16:25 +03:00
Alexander Koblov
3666aba90b FIX: Incorrect image colors after rotation (fixes #2783) 2026-03-14 15:16:36 +03:00
Alexander Koblov
6c28e7e324 ADD: MacCloud to fpmake.pp 2026-03-14 12:33:12 +03:00
Alexander Koblov
40ddf63248 FIX: Try to fix build under macOS x86_64 2026-03-14 12:22:52 +03:00
Alexander Koblov
f5b45359e0 UPD: Viewer - don't use standalone scrollbar controls (fixes #2646) 2026-03-13 20:58:20 +03:00
Alexander Koblov
9805aa9184 FIX: Don't call SetFocus when it's not necessary 2026-03-13 20:58:20 +03:00
rich2014
fd4a7ba777 UPD: new version Lazarus compatibility 2026-03-13 22:52:25 +08:00
Alexander Koblov
06669eeed7 FIX: Invalid expression 2026-03-12 23:56:11 +03:00
Alexander Koblov
2551f0b972 ADD: Option to change visual representation of Tab character in Editor (issue #2780) 2026-03-12 15:41:56 +03:00
Alexander Koblov
1b573d4694 FIX: Use a correct scaling with .ico and .svg icons 2026-03-10 19:43:38 +03:00
Alexander Koblov
0e1f6fffd8 FIX: Detect current icon theme under KDE 2026-03-10 16:26:32 +03:00
Alexander Koblov
cd2367212b FIX: Multi-rename - invalid presets group box state (issue #2778) 2026-03-10 13:24:57 +03:00
Alexander Koblov
61a976d182 FIX: File association settings section crash (fixes #2777) 2026-03-10 13:22:26 +03:00
Alexander Koblov
731071daec FIX: Differ - crash when compare a very long lines (fixed #2640) 2026-03-09 15:03:26 +03:00
Alexander Koblov
beb65d5fa6 FIX: Controls alignment 2026-03-09 15:03:26 +03:00
rich2014
cf8a766615 UPD: new version Lazarus compatibility 2026-03-09 19:56:04 +08:00
Alexander Koblov
24ffc65d16 FIX: Controls alignment 2026-03-07 15:42:16 +03:00
Alexander Koblov
db2d2e7da6 FIX: Linux snapshot file name 2026-03-07 14:23:48 +03:00
Alexander Koblov
ce6f5b42e0 UPD: Prepare GTK3 support 2026-03-07 14:19:38 +03:00
Alexander Koblov
f54be93165 FIX: Controls alignment 2026-03-07 14:16:57 +03:00
Alexander Koblov
448e3d2d75 FIX: Wayland detection (fixes #2773) 2026-03-05 19:28:17 +03:00
Alexander Koblov
4947949834 ADD: Build Linux GTK3 snapshot 2026-03-04 20:08:06 +03:00
Alexander Koblov
7367b66385 UPD: Allow to use GTK3 with Lazarus 4.99 2026-03-04 18:40:39 +03:00
Alexander Koblov
f8342e72a1 FIX: Crash with invalid default format settings (fixes #2772) 2026-03-04 18:26:13 +03:00
axis6404
5f6bfb8b5a
FIX: Emoji comparison in TStringListEx #2762 (#2769) 2026-03-01 13:52:46 +03:00
Alexander Koblov
e608cef4bf FIX: Build under macOS 2026-03-01 00:48:14 +03:00
Alexander Koblov
6199cb56f8 FIX: Can't delete to the trash bin in symlinked directories on different partitions (fixes #2770) 2026-02-28 18:33:34 +03:00
Alexander Koblov
1cd11e5813 FIX: Function result does not specified 2026-02-27 20:19:14 +03:00
Alexander Koblov
b0912aa7e3 FIX: Display target archive name when "put in the TAR archive first" option enabled 2026-02-26 21:37:27 +03:00
Alexander Koblov
1bb5c37eb8 ADD: Capability to change bottom progress bar colors
ADD: Use different bottom progress bar colors in the light and dark modes (fixes #2607)
2026-02-25 18:08:32 +03:00
Alexander Koblov
4816772ac3 DEL: Invalid special paths 2026-02-24 17:57:10 +03:00
Alexander Koblov
927ed4ad8d FIX: Crash with Lazarus 4.99 (fixes #2764) 2026-02-24 17:54:33 +03:00
Alexander Koblov
7155a8a61f FIX: Don't add duplicate resolutions 2026-02-23 22:39:47 +03:00
Alexander Koblov
1fdad400b9 UPD: DCTheme icon theme cache file 2026-02-23 22:04:03 +03:00
Alexander Koblov
cb9b8f797a ADD: Main toolbar scalable icons 2026-02-23 21:49:44 +03:00
Alexander Koblov
10bf49637e ADD: Main toolbar scalable icons 2026-02-23 19:50:24 +03:00
Alexander Koblov
904eb2d016 ADD: Main toolbar scalable icons 2026-02-23 19:06:54 +03:00
Alexander Koblov
79f551a74d ADD: Main toolbar scalable icons 2026-02-23 14:28:19 +03:00
Alexander Koblov
3b6d4d1180 FIX: Don't use buggy UTF8CompareStr function 2026-02-23 12:44:32 +03:00
Alexander Koblov
63b7fd155f FIX: Emoji comparison in TStringListEx (fixes #2762) 2026-02-23 12:28:20 +03:00
Alexander Koblov
dd391e22b7 FIX: Crash with Lazarus 4.99 (issue #2764) 2026-02-23 00:09:45 +03:00
Alexander Koblov
76d4ba16ec FIX: Blurry icons in viewer/editor/differ (issue #2752) 2026-02-22 16:44:55 +03:00
Alexander Koblov
c5b48c6db0 ADD: Qt6+Wayland - fractional scaling support (issue #2752) 2026-02-22 16:13:40 +03:00
Raman Sinclair
3f9e3d35a4
FIX: Main window loses focus after confirming file/folder deletion (fixes #2160) (#2760) 2026-02-21 12:38:55 +03:00
Alexander Koblov
1419f3aaac FIX: Crash when copy files to GIO file system 2026-02-19 19:08:15 +03:00
VenusGirl❤
ea8928907e
ADD: Korean language file (#2754) 2026-02-16 22:51:17 +03:00
Igor Labutin
410c0a1c99
FIX: Unicode normalization in Synchronize Dirs on MacOS (fixes #1752) (#2747) 2026-02-16 22:50:00 +03:00
Alexander Koblov
a2e63d01b6 UPD: GIO - Google Drive support (issue #187) 2026-02-15 16:38:55 +03:00
Alexander Koblov
25c4e77e39 ADD: GIO - Google Drive support (fixes #187) 2026-02-15 15:56:26 +03:00
Alexander Koblov
e5d1c0b305 FIX: Close tab by hotkey (fixes #2662) 2026-02-15 14:12:37 +03:00
Alexander Koblov
2aea141aff FIX: Viewer - wrong selection when text contains a tab character and horizontal scroll is enabled 2026-02-14 16:06:13 +03:00
Alexander Koblov
f2eb7513c8 FIX: Zip - remove a partial archive on cancel (fixes #1260) 2026-02-14 15:13:03 +03:00
Alexander Koblov
506b6b0d74 FIX: Copy image data to the target when source and target are different objects 2026-02-14 13:16:21 +03:00
rich2014
d4b78d952e UPD: Avoid unnecessary conversions in uGraphics.BitmapConvert() 2026-02-12 10:55:55 +08:00
rich2014
0952d72006 FIX: the potential byte order incompatibility issue when viewed as Graphics (eg. transparent PNG) on macOS 2026-02-12 10:55:01 +08:00
Alexander Koblov
707dbe43b5
UPD: Snapshots workflow 2026-02-11 18:52:14 +03:00
Alexander Koblov
6b4b0c84e4 UPD: Snapshots workflow 2026-02-08 22:15:26 +03:00
Alexander Koblov
67b86b6195 UPD: Publish snapshots at GitHub 2026-02-08 20:12:09 +03:00
Alexander Koblov
65119380d7 UPD: Snapshots scripts 2026-02-07 16:18:29 +03:00
Alexander Koblov
32c34dc006 FIX: Crash on editing icon file name in the file associations (fixes #2731) 2026-02-07 15:19:29 +03:00
Alexander Koblov
285e7ba1f8 UPD: Refactoring, Lazarus 4.5 support 2026-02-07 13:51:51 +03:00
Alexander Koblov
284a5aab24 UPD: Prepare GTK3 support 2026-02-07 01:28:36 +03:00
Alexander Koblov
86b2d918bb FIX: Drag and drop format priority (fixes #2740) 2026-02-06 23:56:19 +03:00
rich2014
c39d3974be UPD: support Vert Align Center Rename in-place in FileView 2026-02-04 18:18:06 +08:00
Alexander Koblov
6c9a21c2c7 FIX: Open local help files with space in the path (Windows) 2026-01-31 12:42:57 +03:00
rich2014
186e70881f UPD: make icons clearer on Retina display 2026-01-30 21:53:42 +08:00
rich2014
c1f3a21978 UPD: show LCL Toolbar in Differ and Editor when gModernUI=False 2026-01-30 18:58:07 +08:00
rich2014
09b6398aaa ADD #2729: support disabling Modern Form on macOS 2026-01-29 22:18:55 +08:00
rich2014
e0c6adf681 UPD: lazy load Menu Item for GoBackward / GoForward on macOS 2026-01-29 12:20:44 +08:00
rich2014
758c204864 UPD: lazy load Menu Item for GoBackward / GoForward on macOS 2026-01-29 12:20:29 +08:00
rich2014
46ad6779c1 UPD: add prefix to the key of NSImage cache in TDarwinImageCacheManager on macOS 2026-01-28 12:06:51 +08:00
rich2014
fd02b5c048 UPD: auto update GoBackward/GoForward Tool Bar Menu after Dark/Light is Switched on macOS 2026-01-28 12:02:17 +08:00
rich2014
3952582346 UPD: move Theme monitoring into TDawinImageCacheManager on macOS 2026-01-28 12:02:00 +08:00
rich2014
61d51b21fa UPD: apply NSImage Cache and simplifythe related on macOS 2026-01-28 12:01:46 +08:00
rich2014
2596a2582d ADD: support NSImage cache in TDarwinImageCacheManager on macOS 2026-01-28 12:01:29 +08:00
rich2014
68304a6949 FIX: replace TFPDataHashTable to TFPObjectHashTable and fix memory leak in TDarwinImageCacheManager on macOS 2026-01-28 12:01:12 +08:00
rich2014
43315118f2 ADD: 'Show All' Menu Item for GoForward Menu on macOS (add missing code) 2026-01-28 07:38:59 +08:00
rich2014
61d2ecbc1f ADD: 'Show All' Menu Item for GoForward Menu on macOS 2026-01-28 00:06:40 +08:00
rich2014
e4c8873b33 ADD: 'Show All' Menu Item for GoBackward Menu on macOS 2026-01-27 23:17:45 +08:00
rich2014
f103ead98b FIX: missing 'override' signature for TWfxPluginFileSource.GetCustomIcon() 2026-01-27 17:34:14 +08:00
rich2014
02ecead8d5 FIX: the issue that clicking a file to rename on macOS 2026-01-27 11:46:28 +08:00
rich2014
65936a489e FIX: grid may be not updated when right clicking on macOS 2026-01-27 11:46:28 +08:00
Alexander Koblov
1697f71867 ADD: Warning header to long name alert message
UPD: Display long name alert message under Windows only (useless in other systems)
2026-01-26 20:48:10 +03:00
rich2014
80c74dd049 FIX: the issue that TFile.MacOSSpecific may be not loaded on macOS, introduced @c1cfc8493 2026-01-26 23:31:14 +08:00
rich2014
d925b50f38 ADD: add a limit to the number of menu items in GoForward/GoBackward Modern Form Toolbar on macOS 11+ 2026-01-26 22:38:44 +08:00
rich2014
c6bd4d10f2 ADD: support dark/light switch in DarwinImageCacheManager 2026-01-26 20:53:06 +08:00
rich2014
285b91bb7a ADD: support multi-thread in DarwinImageCacheManager 2026-01-26 20:52:49 +08:00
rich2014
3793d5a118 UPD: apply darwinImageCache in SearchResultFileSource 2026-01-26 18:52:00 +08:00
rich2014
37e7749fe8 UPD: split image cache for Ext and Fullpath as NameSpace on macOS 2026-01-26 18:51:47 +08:00
rich2014
8d784194e6 UPD: apply DarwinImageCacheManager in SmartFolderSearchResultFileSource 2026-01-26 18:51:26 +08:00
rich2014
3102018072 UPD: improve TDarwinImageCacheManager.copyIconForFileExt() 2026-01-26 18:51:12 +08:00
rich2014
d4ed1c0042 UPD: apply DarwinImageCacheManager for App Icon in iCloudDrive 2026-01-26 18:50:53 +08:00
rich2014
e462115f6a ADD: copyImageForNSImage() in DarwinImageCacheManager 2026-01-26 18:50:32 +08:00
rich2014
e3d501af4b UPD: apply DarwinImageCacheManager for Root in iCloudDrive 2026-01-26 18:50:15 +08:00
rich2014
748d20a584 UPD: apply DarwinImageCacheManager in uArchiveFileSource 2026-01-26 18:50:00 +08:00
rich2014
0e8632c63e ADD: a pure image cache on macOS 2026-01-26 18:49:43 +08:00
rich2014
97b8f1e4e6 UPD: Destroy the watcher at the appropriate time when needed in iCloudDrive 2026-01-26 01:13:47 +08:00
rich2014
6371bf2df8 UPD: don't Destory the watcher immediately after removePath to avoid the lag caused by frequent destruction and creation of watchers in iCloudDrive 2026-01-26 00:48:59 +08:00
Alexander Koblov
93a164ecca FIX: Don't create a modal form handle twice 2026-01-25 19:15:20 +03:00
Alexander Koblov
293a827834 FIX: Remove obsolete workaround (fixes #2726) 2026-01-25 16:55:09 +03:00
Alexander Koblov
44c05b6a65 FIX: Lazarus 4.99 compatibility 2026-01-25 12:15:48 +03:00
rich2014
8a36e69eba FIX: the issue of frmMain losing focus in extreme cases, it can now recover focus automatically 2026-01-25 17:06:03 +08:00
rich2014
c3d6a09ac6 FIX: file relocate issue in FileView (eg. iCloud Drive) 2026-01-25 08:32:15 +08:00
rich2014
ddb9a6c2b0 FIX: filename in Hint in FileView (eg. iCloud Drive) 2026-01-25 08:09:38 +08:00
Alexander Koblov
fcf07a7ebb FIX: Lazarus 4.99 compatibility 2026-01-25 00:50:51 +03:00
Alexander Koblov
039946e768 FIX: Lazarus 4.99 compatibility 2026-01-25 00:39:44 +03:00
rich2014
828829ff70 UPD: mission accomplished, Revert "UPD: logs for debugging on macOS" 2026-01-24 21:00:23 +08:00
rich2014
18a2b676cc FIX: eliminate unnecessary constant focusing Main Control on macOS 2026-01-24 20:56:18 +08:00
rich2014
87eae46ea8 UPD: update icloud download Icon 2026-01-24 20:47:31 +08:00
rich2014
f24e4fdaa8 FIX: the debug logs on macOS, issue #2725 2026-01-24 18:06:55 +08:00
rich2014
80a332c42f UPD: return the size set NSImage in TDarwinImageUtil.getBestWithSize() 2026-01-24 08:20:14 +08:00
rich2014
f7ca812c3c UPD: apply TDarwinImageUtil.getBestFromFileContentWithSize() in iCloudDrive 2026-01-24 08:13:27 +08:00
rich2014
58a09913c9 UPD: support autoDark in TSearchResultFileSource.GetCustomIcon() 2026-01-24 08:06:58 +08:00
rich2014
95a8e46db2 UPD: support autoDark in TDarwinImageUtil.getBestFromFileContentWithSize() 2026-01-24 08:01:01 +08:00
rich2014
b680e8aa77 FIX: compile error (#2724) 2026-01-24 07:33:58 +08:00
rich2014
ce8d4cfc15 UPD: simplify the code in TDarwinFileViewHistoryUtil 2026-01-23 23:56:49 +08:00
rich2014
60aedea303 UPD: eliminate redundant code in SmartFolderSearchResultFileSource 2026-01-23 23:56:00 +08:00
rich2014
ea58f2c931 ADD: GetDisplayFileName() in SearchResultFileSource and derived 2026-01-23 23:48:23 +08:00
rich2014
fd0d3f161d ADD: GetCustomIcon() supports combined tags in TFinderSearchResultFileSource() on macOS 2026-01-23 23:13:22 +08:00
rich2014
797c6f6553 ADD: GetCustomIcon() in SmartFolderSearchResultFileSource 2026-01-23 22:26:07 +08:00
rich2014
d56a7ed764 UPD: split TFinderSearchResultFileSource into TFinderTagSearchResultFileSource and TSmartFolderSearchResultFileSource 2026-01-23 22:01:24 +08:00
rich2014
e48c97b9e8 ADD: Color Icon by GetCustomIcon() in TFinderSearchResultFileSource() on macOS 2026-01-23 21:16:12 +08:00
rich2014
985fab5f00 UPD: refactor TDarwinFinderUtil.createMenuRoundImage() as public function 2026-01-23 21:01:01 +08:00
Richard Boß
e22b633ffa
FIX: Windows compile error (#2723)
* Add Graphics unit to usearchresultfilesource.pas

fix compilation error on Windows

* Add Graphics unit to uarchivefilesource.pas

fix compilation error on Windows

* Remove unused Graphics import on DARWIN

cleanup
2026-01-23 08:21:57 +08:00
rich2014
17c092540d FIX: gThumbSize should be used in zoomInSmallPreview() in ThumbFileView 2026-01-23 00:28:12 +08:00
rich2014
907d25467f FIX: git misoperation @ ab390e9 2026-01-23 00:13:54 +08:00
rich2014
ab390e93ce UPD: in thumbnail view, if the preview is too small, zoom in to gIconsSize to maintain a normal visual, especially on Retina Display 2026-01-22 23:37:06 +08:00
rich2014
b9573559b9 FIX: correct the matching of dtVirtual in FindMatchingDrive() 2026-01-22 20:07:00 +08:00
rich2014
a8c875ec27 UPD: the Icon Size in GoBackward/GoForward Menu conforms to gIconsInMenusSize 2026-01-22 00:21:00 +08:00
rich2014
ce6f58dbda ADD/FTP: support Icon for '/' in FsExtractCustomIconW() 2026-01-22 00:18:46 +08:00
Alexander Koblov
ec27554fad FIX: FTP - save connection with implicit FTPS (fixes #2717) 2026-01-21 18:39:12 +03:00
rich2014
8166903a49 FIX: the issue that focus switching multiple by removing unnecessary LCLCOCOA-specific code in FileView 2026-01-21 21:57:19 +08:00
rich2014
1e406c4e06 FIX: should not get Finder Tag for '..' 2026-01-21 21:23:30 +08:00
rich2014
98ef204fab FIX: Modern Form ToolBar Item Icon compatible with macOS 11 2026-01-21 21:11:35 +08:00
rich2014
f75fbdaecf ADD: GetCustomIcon() in SearchResultFileSource 2026-01-21 21:07:00 +08:00
rich2014
529c9a1fc7 UPD: improve GetCustomIcon() in iCloudDriveFileSource 2026-01-21 20:06:57 +08:00
rich2014
c63d8cd385 ADD: GetCustomIcon() in VfsFileSource 2026-01-21 20:06:42 +08:00
rich2014
a4b91314c4 ADD: menu for History(GoBackward/GoForward) Modern Form ToolBar Item on macOS 2026-01-21 20:06:31 +08:00
rich2014
d7d1828978 ADD: GetCustomIcon() in iCloudDriveFileSource 2026-01-21 20:06:16 +08:00
rich2014
67218a975d ADD: GetCustomIcon() in ArchiveFileSource 2026-01-21 20:05:55 +08:00
rich2014
ccfeba379b UPD: improve DarwinImage 2026-01-21 20:05:40 +08:00
rich2014
2c6b559f8b ADD: GetCustomIcon() in WfxPluginFileSource 2026-01-21 20:05:24 +08:00
rich2014
e464e57171 ADD: GetCustomIcon() in FileSource (overload, by path, return TBitmap) 2026-01-21 20:05:08 +08:00
rich2014
2aa0cc9212 ADD: support converting TBitmap to NSImage on macOS 2026-01-20 23:43:04 +08:00
rich2014
a980dc77a4 ADD/MacCloud: support Icon for '/' in FsExtractCustomIconW() 2026-01-20 23:14:51 +08:00
rich2014
71c2d63aa8 FIX/MacCloud: Trailing PathDelim in Remote Path Parser 2026-01-20 23:12:59 +08:00
rich2014
9f8c2c9dd7 UPD: refactor code from TPixMapManager to TDarwinImageUtil.getBitmapForExt() on macOS 2026-01-20 18:43:36 +08:00
rich2014
8d5395ab65 UPD: refactor TPixMapManager.GetMimeIcon() on macOS 2026-01-20 18:43:36 +08:00
rich2014
395cebd3bb UPD: in accordance with naming conventions, the caller of TDarwinImageUtil.getBestWithSize() is not responsible for releasing memory 2026-01-20 18:43:36 +08:00
rich2014
b1a181df1d UPD: refactor macOS-related image code from uPixMapManager to uDarwinImage 2026-01-20 18:43:36 +08:00
rich2014
da809f4be8 FIX: memory leaks in TPixMapManager.CheckAddFileUniqueIcon() on macOS 2026-01-20 18:43:36 +08:00
Alexander Koblov
ce0ef49b18 FIX: Lazarus 4.4 compatibility 2026-01-19 20:41:50 +03:00
rich2014
78a45e234c UPD: lclstrconsts.ru.po updated from lazarus/lcl/languages 2026-01-19 18:21:39 +08:00
rich2014
3da73c7785 UPD: improve FileDialog selection in "Open With - Other..." on macOS 2026-01-19 18:07:07 +08:00
rich2014
b753e8b668 UPD: improve FileDialog selection in Plugins Options 2026-01-19 17:28:03 +08:00
rich2014
550867896d UPD: a switch is shown for Users to choose between selecting either the File Package itself or the files within the File Package on macOS 2026-01-19 17:24:59 +08:00
rich2014
e206e475c2 UPD: File Packages can't be selected when select a real file on macOS 2026-01-19 17:18:18 +08:00
rich2014
36dcb932d0 UPD: File Packages and their internal directories can now be selected when choosing a directory on macOS 2026-01-19 16:53:42 +08:00
rich2014
5835c60a79 DEL: remove the global settings of "Shows File Packages Switch" for more precise control on macOS 2026-01-19 16:37:10 +08:00
rich2014
443c057ec9 ADD: "Shows File Packages Switch" in FileDialog to access contents in File Packages(eg. .app Bundles) on macOS 2026-01-19 00:28:27 +08:00
rich2014
41099979ed UPD: lclstrconsts.*.po updated from lazarus/lcl/languages 2026-01-18 23:45:50 +08:00
Alexander Koblov
88ca967887 ADD: Anti-sleep - Linux support 2026-01-18 00:25:07 +03:00
Alexander Koblov
54b1f61c60 ADD: Anti-sleep unit 2026-01-17 23:07:21 +03:00
Alexander Koblov
d2451b17e0 UPD: Korean language file (fixes #2710) 2026-01-17 19:19:03 +03:00
Alexander Koblov
ca9e169610 UPD: Russian language file 2026-01-17 19:15:49 +03:00
Alexander Koblov
a445ba431c FIX: Disable main menu shortcuts when Alt+Letter keys are used somewhere (issue #1327) 2026-01-17 18:41:42 +03:00
Alexander Koblov
7991af0a06 FIX: Disable main menu shortcuts when Alt+Letter keys are used somewhere (fixes #1327) 2026-01-17 18:34:14 +03:00
Alexander Koblov
0524bcd4e8 FIX: Zip - extract Unix symbolic links under Windows (fixes #2659) 2026-01-17 16:55:28 +03:00
Alexander Koblov
53a3a51976 ADD: CreateSymLinkUnix function 2026-01-17 16:32:34 +03:00
rich2014
e8ed94f129 UPD: update zh_TW 2026-01-15 11:35:46 +08:00
rich2014
b90e846b7c UPD: update zh_CN 2026-01-15 11:35:45 +08:00
rich2014
7e233b001a FIX: the title/hint of CopyRightToLeft/CopyLeftToRight in Differ Form 2026-01-15 11:35:45 +08:00
Alexander Koblov
694b14cf43 UPD: Enable Chinese online help 2026-01-14 18:59:42 +03:00
rich2014
624384091f FIX: some File Dialog Filter format error 2026-01-14 21:57:17 +08:00
Alexander Koblov
9c80e25bb4 FIX: SetFileTime parameters (fixes #2697) 2026-01-13 18:51:59 +03:00
Alexander Koblov
8fbde876e5 FIX: GetFileIndexFromCursor function result (fixes #2699) 2026-01-13 18:20:55 +03:00
rich2014
121e7ad777 UPD: Smart Folders are now opened in the original tab to avoid creating too many unnecessary tabs 2026-01-13 22:41:38 +08:00
rich2014
3ba2a35462 UPD: add 32x32 icons to ilEditorImages for Retina 2026-01-13 01:06:38 +08:00
rich2014
a502dc40de UPD: update Icon of Configuration Button in the ToolBar of Editor on macOS 11+ 2026-01-13 00:00:53 +08:00
rich2014
931f24fcdb UPD: the buttons can be auto enabled/disabled in Differ Form native ToolBar on macOS 2026-01-12 18:12:57 +08:00
Alexander Koblov
fcba5ce8ee UPD: SyncDirs - use separate file mask history (fixes #2696) 2026-01-11 21:32:11 +03:00
rich2014
1072d4d8b2 UPD: set gButtonBar default value to False on macOS
1. hide the LCL toolbar, main interface is more native
2. it only take affect when a new installation has no configuration file
3. users can enable it in the options at any time
2026-01-11 21:38:55 +08:00
rich2014
c98327bd5e UPD: update default ShortCuts in Viewer/Editor on macOS 2026-01-11 21:23:16 +08:00
rich2014
6a832f75f3 UPD: update Icon of Save Button in the ToolBar of Editor on macOS 11+ 2026-01-11 20:49:21 +08:00
rich2014
4730243941 UPD: hide the LCL Toolbar in EditorForm on macOS 11+ (because of the native Toolbar) 2026-01-11 20:45:57 +08:00
rich2014
2648c2bed2 ADD: base ShortCut for Edit in DifferForm 2026-01-11 17:49:26 +08:00
rich2014
91322b9506 ADD: Modern Form Toolbar for DifferForm on macOS 11+ 2026-01-11 15:37:29 +08:00
rich2014
4ec86ca2f1 UPD: divide Modern Form Config into three .inc files: Common / MainForm / EditorMain. 2026-01-10 23:46:21 +08:00
Alexander Koblov
8e147eeefc FIX: Compilation for non macOS 2026-01-10 15:53:31 +03:00
rich2014
c1cfc84933 UPD #2695: speeding up by macOS property lazy loading on macOS 2026-01-10 10:46:30 +08:00
rich2014
f56d2b3219 UPD: determine whether to display icons in the menu by gIconsInMenus in TfrmDiffer and TfrmEditor 2026-01-10 00:29:11 +08:00
rich2014
8c47d3cfc6 UPD: ShortCut name in Modern Form Toolbar Button on macOS 11+ 2026-01-10 00:03:51 +08:00
rich2014
937321ccd5 ADD: ShortCut tips for EditorForm Modern Form Toolbar on macOS11+ 2026-01-09 22:57:02 +08:00
rich2014
3229e8a7b1 ADD: i18n for EditorForm Modern Form Toolbar on macOS11+ 2026-01-09 22:44:09 +08:00
rich2014
15e1e82887 UPD: hide the LCL Toolbar in EditorForm on macOS 11+ (because of the native Toolbar) 2026-01-09 19:30:37 +08:00
rich2014
56b1f70baa ADD: Modern Form Toolbar for EditorForm on macOS 11+ 2026-01-09 19:14:07 +08:00
rich2014
dd22c4ff7c UPD: make all form titlebar more native and modern on macOS 11+ 2026-01-09 19:08:03 +08:00
rich2014
da0410a472 UPD: remove reference to CocoaTextEdits base on the new version of Lazaurs 2026-01-08 20:23:36 +08:00
rich2014
4acde0cbe7 UPD: better prompt in Map Network Drive dialog 2026-01-08 20:23:22 +08:00
Alexander Koblov
0575cff75e UPD: Dutch language file 2026-01-07 23:41:44 +03:00
rich2014
20c86c58bf FIX: StretchBitmap() related on retina display 2026-01-07 21:55:30 +08:00
rich2014
3d4dc7d6fc FIX: fix the issue of mismatching to “/” when using a non-FileSystem FileSource 2026-01-07 21:54:56 +08:00
rich2014
a2518d930f ADD: default hotkey ⌘+W for cm_CloseTab in Main on macOS 2026-01-07 21:54:26 +08:00
Alexander Koblov
3e09c8c56b FIX: Verify checksum - assign OnCreate event (fixes #1894) 2026-01-07 13:41:59 +03:00
Alexander Koblov
ee29c08428 ADD: Verify checksum - use log font, close by enter key (issue #1894) 2026-01-07 01:11:29 +03:00
rich2014
6d25dc8bcc UPD: in MultiRename, when the regular expression is correct, edFind is restored to clDefault (which is better than clWindow/clWindowText) 2026-01-06 23:02:32 +08:00
Alexander Koblov
c2b20fe970 UPD: Russian language file 2026-01-06 15:39:24 +03:00
Alexander Koblov
f7911094b3 UPD: Verify checksum - hide right margin 2026-01-06 13:24:59 +03:00
rich2014
e7c9b0579a UPD: move pasteImageToFile from uMainCommands to uClipboard 2026-01-06 00:16:35 +08:00
Alexander Koblov
3ebc9c7d7e ADD: FTP - custom icons 2026-01-05 17:42:10 +03:00
Alexander Koblov
3a6893dc51 FIX: Use normalized strings when compare file names with wildcard under macOS (fixes #2674) 2026-01-05 13:57:30 +03:00
rich2014
0bb904d006 UPD: the buttons can be enabled or disabled based on FileSource on macOS 2026-01-05 18:13:08 +08:00
rich2014
d0d51b6474 UPD: the Backward/Forward buttons can be enabled or disabled based on history 2026-01-05 18:13:07 +08:00
rich2014
c6e5bf89db UPD: update zh_TW 2026-01-05 18:13:07 +08:00
rich2014
87e20b5615 UPD: update zh_CN 2026-01-05 18:13:07 +08:00
rich2014
1a99e510c8 ADD: i18n for Backward/Forward Button 2026-01-05 18:13:07 +08:00
rich2014
8f5977e63b ADD: default hotkeys for cm_ViewHistoryPrev / cm_ViewHistoryNext in Main on macOS 2026-01-05 18:13:07 +08:00
rich2014
dd3d54ca31 ADD: add ShortCut String to tips for Backward/Forward button on macOS 2026-01-05 18:13:07 +08:00
rich2014
6208c4a832 ADD: Modern Form Style - Backward/Forward button for macOS 11+ 2026-01-05 18:13:06 +08:00
Alexander Koblov
9dad38408a UPD: FTP - language files 2026-01-04 14:25:20 +03:00
Alexander Koblov
a46139cea0 ADD: FTP - more strings translation 2026-01-04 14:25:20 +03:00
rich2014
a8c21bc879 ADD: support paste image from Clipboard to file directly (Command+V) on macOS 2026-01-04 18:44:15 +08:00
rich2014
6f46526451 UPD: Lazarus/StrToNSString() to (Native)Cocoa/StringToNSString() 2026-01-03 10:46:41 +08:00
rich2014
54d6fd516b UPD: improve error and exception logging on macOS 2026-01-03 10:35:52 +08:00
rich2014
cff28911e5 UPD: remove circle references between uDarwinFinderModel and uDarwinFile 2026-01-03 10:18:52 +08:00
rich2014
f6dcf0fd46 UPD: more file error log on macOS 2026-01-03 09:35:39 +08:00
rich2014
900342d648 UPD #2675: improve searching in subpath in iCloud Drive 2026-01-02 18:50:01 +08:00
rich2014
a971639d45 ADD #2675: better searching in iCloud Drive 2026-01-02 18:28:11 +08:00
rich2014
e8ec4ecb01 FIX #2675: the Start Path in Search Dialog in some FileSource (ie. TMountedFileSource) 2026-01-02 17:23:44 +08:00
rich2014
aff2d61421 UPD: refactor in uDarwinClipboard 2026-01-01 23:09:20 +08:00
rich2014
d6f468ddd4 UPD: remove circle references between uClipboard and uDarwinClipboard 2026-01-01 22:07:22 +08:00
rich2014
59a8e395ed UPD: refactoring macOS related from uClipboard to uDarwinClipboard 2026-01-01 21:30:25 +08:00
rich2014
5cac3685fd UPD: logs for debugging on macOS 2025-12-31 18:48:13 +08:00
rich2014
e69d6ee4c2 UPD: refactoring to eliminate duplicate doCellEnhancedDraw() in FileView 2025-12-31 18:48:08 +08:00
rich2014
5fd8496570 UPD: refactoring to eliminate duplicate calcTextHeight() in FileView 2025-12-31 18:45:02 +08:00
rich2014
cc00605fa5 UPD: refactoring to eliminate duplicate doFileSourceDrawCell() in FileView 2025-12-31 18:45:02 +08:00
rich2014
3fa8359330 UPD: refactoring to eliminate duplicate onDrawCell() in FileView 2025-12-31 18:45:01 +08:00
rich2014
1f48c04e20 FIX: the decoration issue by adding multiColumns to the Grid. 2025-12-31 18:45:01 +08:00
rich2014
5e32ec839b UPD: minor optimizations and cleanup on macOS 2025-12-31 18:45:01 +08:00
Alexander Koblov
8eafe61176 UPD: Korean language file (fixes #2664) 2025-12-31 13:11:05 +03:00
Alexander Koblov
66cfdbda08 UPD: Greek language file 2025-12-31 13:07:36 +03:00
rich2014
5cfe18488d UPD: refactoring to eliminate duplicate code in FileView 2025-12-30 21:38:34 +08:00
rich2014
cfb5e4862c UPD: abstract decoration related to ConvertToDecorationRect() 2025-12-30 21:38:17 +08:00
rich2014
f7628a0bdc UPD: refactoring common code to uFileViewBaseGrid 2025-12-30 21:37:47 +08:00
rich2014
d7ef000c3f UPD: refactor calcTextHeight in uThumbFileView 2025-12-30 21:37:24 +08:00
rich2014
ef11c19b3a ADD: in ThumbsFileView, support downloading by clicking the download icon in iCloud Drive 2025-12-30 21:37:06 +08:00
rich2014
07993f1073 UPD: display Finder Tags and other decorations in different areas depending on the FileView 2025-12-30 21:36:35 +08:00
rich2014
e89f669e14 ADD: initial support for displaying Finder tags and iCloud download icon in ThumbsFileView 2025-12-30 21:36:19 +08:00
rich2014
52a699fbd7 UPD: simplify OnDrawCell related base on TFileSourceUIParams 2025-12-29 20:02:24 +08:00
rich2014
9fac3ef5e8 UPD: simplify OnDrawCell related in FileView 2025-12-29 19:57:34 +08:00
rich2014
50f1403445 UPD: improve the adaptability of setting OnDrawCell related to FileView on macOS 2025-12-29 19:55:44 +08:00
rich2014
b22a7b989f UPD: more robust error log on macOS 2025-12-24 22:15:49 +08:00
Alexander Koblov
c32db48c03 FIX: EDateOutOfRange exception with negative Unix time (fixes #2666) 2025-12-22 18:46:26 +03:00
Alexander Koblov
190825e653 UPD: Release workflow 2025-12-21 13:00:14 +03:00
rich2014
e21165673b FIX: the issue in TFileView.calcFileHashKey() in flatview mode on macOS 2025-12-20 22:37:17 +08:00
rich2014
e4c57d8571 UPD: refactoring to eliminate duplicate code in TFileSystemWatcherImpl.handleFSEvent() 2025-12-20 22:15:48 +08:00
rich2014
f3254ee10b UPD: refactoring common watcher related from uiCloudDrive to uDarwinDC 2025-12-20 22:07:22 +08:00
rich2014
2f33d5a553 UPD: simplify theme mode determining based on the new Lazarus/Cocoa version 2025-12-19 23:56:32 +08:00
rich2014
c97c74fb02 UPD: simplify theme related based on the new Lazarus/Cocoa version 2025-12-18 21:28:40 +08:00
rich2014
a49dff7e67 FIX: via asynchronously closing tabs, fix potential issues that might arise from directly closing tabs during event handling 2025-12-12 23:30:04 +08:00
rich2014
ef6fdd2e70 UPD: remove some unused unit references 2025-12-11 21:34:10 +08:00
rich2014
7437b9b09f UPD: eliminate the dependency on fmain in uDarwinFileView 2025-12-11 21:33:11 +08:00
rich2014
9c54344b94 DEL: remove uAppleMagnifiedModeFix 2025-12-11 21:32:56 +08:00
rich2014
fbd2aa3bc8 UPD: unify darwin related naming 2025-12-11 21:30:01 +08:00
rich2014
32c962239f DEL: remove uMyDarwin 2025-12-11 18:12:56 +08:00
rich2014
4d0a1966cf UPD: refactoring serviceMenu from uMyDarwin to uDarwinApplication 2025-12-11 18:12:34 +08:00
rich2014
7f80cfcb70 UPD: refactoring onMainMenuCreate from uMyDarwin to uDarwinApplication 2025-12-11 18:12:11 +08:00
rich2014
693f887652 UPD: comments for TDarwinAarch64Statfs 2025-12-11 10:12:38 +08:00
rich2014
116e7cebe7 UPD: refactoring FileView from uMyDarwin to uDarwinFileView 2025-12-11 10:12:38 +08:00
Alexander Koblov
a9b86231be FIX: Paste real files from clipboard (fixes #2651) 2025-12-10 18:38:38 +03:00
Alexander Koblov
f88cdb4f0c FIX: Paste directory from clipboard (issue #2647) 2025-12-10 18:27:59 +03:00
rich2014
b75ac1e82f UPD: refactoring Panel from uMyDarwin to uDarwinPanel 2025-12-10 22:28:06 +08:00
rich2014
8c5274e6ff UPD: refactoring Statfs Fix from uMyDarwin to uDarwinIO 2025-12-10 21:44:42 +08:00
rich2014
ec2bf46f7f UPD: refactoring Application related from uMyDarwin to uDarwinApplication again 2025-12-10 21:20:52 +08:00
rich2014
30b6ae5006 UPD: refactoring File related from uMyDarwin to uDarwinFileUtil again 2025-12-10 20:28:12 +08:00
j2969719
039bc46b18
ADD: cm_SetSortMode command (#2642) 2025-12-10 08:29:36 +03:00
rich2014
83d2cfa181 UPD: refactoring File related from uMyDarwin to uDarwinFileUtil 2025-12-09 23:16:57 +08:00
rich2014
241b97596f UPD: rename Driver to Drive in i18n 2025-12-09 22:37:30 +08:00
rich2014
136b57b087 UPD: rename Driver to Drive 2025-12-09 22:14:57 +08:00
rich2014
7a76524516 UPD: refactoring uDarwinSimpleFSWatch from uMyDarwin 2025-12-09 19:40:10 +08:00
rich2014
90b43d186a UPD: ignore duplicate theme change notification on macOS 2025-12-09 18:52:55 +08:00
rich2014
1f383b0c61 ADD: support theme changed notify caused by Color Options Dialog on macOS 2025-12-09 18:51:23 +08:00
rich2014
2c903ca7c6 ADD: support dynamic update download icon based on the theme in iCloud Drive on macOS 2025-12-09 18:50:07 +08:00
rich2014
d30198ece1 UPD: support multi theme observer on macOS 2025-12-09 18:49:42 +08:00
j2969719
4abf44f32a
UPD: C SDK (#2634) 2025-12-09 09:17:58 +03:00
rich2014
37ac87a2d7 UPD: in Dark mode, improve the visibility of download icon in iCloud Drive on macOS 2025-12-08 22:53:53 +08:00
rich2014
babc01608c ADD: uDarwinImageUtil on macOS 2025-12-08 22:53:47 +08:00
rich2014
62bff9e3f8 UPD: refactor uDarwinFileUtil 2025-12-08 22:13:53 +08:00
rich2014
5e3f93306b UPD: refactoring uDarwinFileUtil from uMyDarwin 2025-12-08 22:13:16 +08:00
rich2014
ab2648bd75 UPD: refactor uDarwinApplication 2025-12-08 22:12:18 +08:00
rich2014
2f2c660fb5 UPD: refactoring uDarwinApplication from uMyDarwin 2025-12-08 22:11:26 +08:00
rich2014
bf7876dfb4 FIX: memory leak in ContextMenu/Services on macOS 2025-12-08 22:09:40 +08:00
rich2014
0ae14457a9 FIX: in the Font Options, an incorrect save prompt may appear if the initial font size is 0
it's because the initial value is 0 when calculating the fingerprint, and it has been set to the minimum value after initialization.
2025-12-07 11:12:10 +08:00
rich2014
c8e9765bb1 FIX: the issue of hashKey in TSearchResultFileSource (files in TSearchResultFileSource do not have a unified parent path) 2025-12-06 15:34:07 +08:00
rich2014
c791c0e801 UPD: update zh_TW 2025-12-06 15:19:47 +08:00
rich2014
c0b5cc3370 UPD: update zh_CN 2025-12-06 15:19:42 +08:00
rich2014
d33483ada3 UPD: add doSearchFiles() to eliminate duplicate code related to Finder Search on macOS 2025-12-06 10:34:58 +08:00
rich2014
8ddadf237f UPD: replace onSearchFinderTagComplete() with darwinSearchResultHandler 2025-12-06 10:08:06 +08:00
rich2014
db6a60377d UPD: refactor names related to Finder Search on macOS 2025-12-06 10:05:44 +08:00
rich2014
61e91c79bc ADD: support searchScopes for Smart Folder on macOS 2025-12-05 22:33:06 +08:00
rich2014
b4b0064ae6 ADD: Smart Folder to "gotoFolder" Menu on macOS 2025-12-05 22:17:56 +08:00
rich2014
2102e7b543 ADD: support opening Smart Folders on macOS 2025-12-05 21:57:43 +08:00
Alexander Koblov
8c370fd8ea FIX: Hang when read from a named pipe (fixes #2639) 2025-12-04 19:25:16 +03:00
rich2014
b10bd5609f FIX: the issue of arbitrary truncation in multibyte encoding in IsInPath(), the root cause of #2631 2025-12-03 18:19:11 +08:00
j2969719
c00716896c
ADD: cm_RenameTab param (#2633) 2025-12-03 10:40:18 +03:00
Alexander Koblov
228802bb5d FIX: Remove read-only temporary files (fixes #2632) 2025-12-02 18:16:32 +03:00
Alexander Koblov
2688fd8499 FIX: Double plugin initialization (issue #2616) 2025-12-02 18:14:43 +03:00
Alexander Koblov
ca615d4c84 FIX: Crash with empty file name (fixes #2631) 2025-12-01 21:39:19 +03:00
Alexander Koblov
f27b7f8526 FIX: Use normalized strings when compare file names under macOS (fixes #1981) 2025-12-01 18:59:57 +03:00
rich2014
aa4b99f3a1 UDP: Fine-tuning the color table for Finder Tags in Menu 2025-12-01 23:41:32 +08:00
rich2014
1d4dbdd445 UDP: Fine-tuning the color table for Finder Tags in Editor 2025-12-01 23:41:32 +08:00
rich2014
4d8e71ad11 UDP: don't display colorless Finder Tags in FileView, more consistency with Finder 2025-12-01 23:41:32 +08:00
rich2014
6b806a8026 UPD: add special decoration Finder Tag colors 2025-12-01 23:41:32 +08:00
Alexander Koblov
16e9b1d647 FIX: DCDateTimeUtils - arithmetic overflow (fixes #2627) 2025-12-01 17:59:26 +03:00
rich2014
cc02b71009 UPD: refactor finder tag color names 2025-12-01 00:27:52 +08:00
rich2014
29f146f1e3 UPD: remove dotFinderTagNSColors in uDarwinFinderModelUtil 2025-11-30 23:15:46 +08:00
rich2014
332700d57f UPD: apply menu color for FinderTag in Tag Editor, more consistent with Finder 2025-11-30 23:05:06 +08:00
rich2014
efbe003174 UPD: apply menu color for FinderTag in Search Menu on macOS 2025-11-30 23:00:48 +08:00
rich2014
124c8b7f02 UPD: apply menu color for FinderTag in Context Menu, more consistent with Finder 2025-11-30 22:37:36 +08:00
rich2014
b3866c95c8 ADD: add colors for FinderTag in Menus 2025-11-30 22:36:41 +08:00
rich2014
172c054ce7 UDP: remove unnecessary unit 2025-11-30 22:36:06 +08:00
Jozef Gaal
06fe73ec27
UPD: Slovak language (#2628) 2025-11-30 12:41:49 +03:00
Alexander Koblov
542cbb925a UPD: German language file 2025-11-29 12:43:01 +03:00
Alexander Koblov
79cc65f739 UPD: Argon2 default parameters 2025-11-27 18:04:50 +03:00
Alexander Koblov
15c0c27e79 ADD: Calculate key transformation at least one time 2025-11-25 21:14:47 +03:00
Alexander Koblov
50af183b70 UPD: Language files 2025-11-25 19:22:19 +03:00
Alexander Koblov
9a0044e532 UPD: Use 'main' password instead 'master' 2025-11-25 19:15:26 +03:00
dependabot[bot]
6d3060aaf2
UPD: Bump actions/checkout from 5 to 6 (#2625)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-25 18:29:48 +03:00
rich2014
57123c9be6 UPD: improve the postion of Sharing Service Picker Popover on macOS 13+ 2025-11-23 14:58:57 +08:00
rich2014
8c0b8c1497 UPD: restore to min 11.0 on macOS-Intel (caused by the github compilation environment, DC itself supports macOS 10.11) 2025-11-23 14:58:56 +08:00
Alexander Koblov
0b7aecc0de UPD: German language file 2025-11-22 16:41:54 +03:00
Alexander Koblov
2f6fb62ff1 UPD: Version number 2025-11-22 15:23:33 +03:00
Alexander Koblov
934bef9782 FIX: Copy into symbolic link to directory (fixes #2175) 2025-11-22 14:47:39 +03:00
Alexander Koblov
6ace980bb0 FIX: SingleByteEncoding function 2025-11-22 13:36:17 +03:00
Alexander Koblov
9f34950c19 UPD: Use Argon2 key derivation function 2025-11-22 13:26:29 +03:00
Alexander Koblov
011609f694 UPD: Argon2 self-test 2025-11-21 23:47:29 +03:00
Alexander Koblov
032168b178 FIX: Argon2 function 2025-11-21 23:15:35 +03:00
Alexander Koblov
e3629ca47a UPD: Language files 2025-11-21 20:34:28 +03:00
Alexander Koblov
da7412bc4d UPD: Project file 2025-11-21 20:14:25 +03:00
Alexander Koblov
60a46c8bed ADD: Master key input dialog localization 2025-11-21 20:13:15 +03:00
Alexander Koblov
5e5652faa4 UPD: Find files - enable case sensitive option with regular expression text search (fixes #2620) 2025-11-20 23:35:12 +03:00
Alexander Koblov
6e10b42d44 ADD: Master key input dialog 2025-11-19 19:05:07 +03:00
Alexander Koblov
9732afd824 UPD: Argon2 preparation 2025-11-19 18:50:45 +03:00
Alexander Koblov
2c83cfb5c4 UPD: Speed-up Argon2 function 2025-11-17 18:36:37 +03:00
rich2014
67e45056e7 UPD: apply lightweight Volumn Observer instead of Path Watcher for DriveWatch on macOS 2025-11-17 22:28:16 +08:00
rich2014
9a251c24de ADD: Volumn Observer what base on notificationCenter on macOS 2025-11-17 22:25:00 +08:00
rich2014
c89eaf833b UPD: restore to min 10.11 on macOS-Intel 2025-11-17 15:34:02 +08:00
rich2014
b9d9ec7cd4 UPD: update unique Icon of file after updated in TFileView.UpdateFile() on macOS 2025-11-17 15:15:47 +08:00
rich2014
ae0ec15558 UPD: update unique Icon of file in TPixMapManager.CheckAddFileUniqueIcon() on macOS 2025-11-17 15:15:47 +08:00
Alexander Koblov
1f1b6f3757 UPD: Use macOS 14 to build snapshots 2025-11-16 15:41:47 +03:00
Alexander Koblov
e4ba749929 ADD: Option to copy file backward without prompt (fixes #2611) 2025-11-15 13:53:12 +03:00
rich2014
961a7e2cf3 UPD: reusing defined types 2025-11-13 21:20:32 +08:00
rich2014
c42d1d171f ADD: add the retry mechanism for TDarwinIOVolumns.createVolumns() 2025-11-13 21:20:32 +08:00
flxkid
5e2980926e
ADD: Virtual file drag-and-drop and clipboard paste support (#2577)
* Add virtual file drag-and-drop and clipboard paste support

Adds support for virtual file operations using Windows CFSTR_FILEDESCRIPTOR and CFSTR_FILECONTENTS formats. Enables file transfers from sources like VMware Fusion Mac-to-Windows clipboard, Remote Desktop, and OneDrive placeholders.

Changes to uOleDragDrop.pas:

- Fix memory leaks: Add missing ReleaseStgMedium and GlobalUnlock calls

- Change GetDropFileGroupFilenames to class function for clipboard reuse

- Change SaveCfuContentToFile to class function for clipboard reuse

- Wrap operations in try-finally blocks for proper cleanup

Changes to uClipboard.pas:

- Add OLE clipboard support via OleGetClipboard and IDataObject

- Check for CFSTR_FILEDESCRIPTORW/CFSTR_FILEGROUPDESCRIPTOR formats

- Extract virtual files using drag-and-drop extraction logic

- Detect lazy materialization and delegate to Windows Shell paste

- Keep clipboard open for normal files to support lazy materialization

Tested with VMware Fusion running ARM-based Windows guests. May also work for other virtual file scenarios that were not available for testing.

All existing CF_HDROP operations continue to work unchanged.

---------

Co-authored-by: Alexander Koblov <alexx2000@mail.ru>
2025-11-13 09:02:40 +03:00
rich2014
feafbef9d7 FIX: leaks in TDarwinIOVolumns.createVolumns() 2025-11-12 23:16:01 +08:00
Alexander Koblov
d534491ef7
FIX: Build macOS aarch64 snapshot 2025-11-12 16:07:06 +03:00
Alexander Koblov
a37eb3c678 UPD: Snapshots workflow 2025-11-11 18:21:41 +03:00
Alexander Koblov
bb311c3553 UPD: Snapshots workflow 2025-11-11 18:17:48 +03:00
Alexander Koblov
3f588131d4 UPD: Sample plugin 2025-11-11 18:17:02 +03:00
rich2014
49576ac7ee FIX: TDarwinDriverWatcher.tryAddDrive() 2025-11-11 23:00:49 +08:00
rich2014
6233fbefd4 UPD: refactor darwinIO related 2025-11-10 16:40:19 +08:00
rich2014
5ce97db777 ADD: distinguishing between dtRemovable and dtRemovableUsb on macOS 2025-11-10 16:38:37 +08:00
rich2014
148ea14905 FIX: bug in CompareDrives() 2025-11-10 00:27:23 +08:00
rich2014
a22ef72883 FIX: the issue that the Image control might not refresh in QuickView
for example, when switching from viewing text to image, pnlImage is hidden, updating Image.picture and then making pnlImage visible, the Image might not refresh
2025-11-09 23:41:54 +08:00
rich2014
5b418b05bc UPD: local hard disks come before removable hard disk when sorting 2025-11-09 12:08:25 +08:00
rich2014
876d0d2333 UPD: distinguishing between local hard disks and removable disks 2025-11-09 12:05:42 +08:00
rich2014
1f86b7cd73 UPD: use the pointer instead of the Statfs record to avoid unnecessary copying in TDriveWatcher.GetDrivesList() 2025-11-09 12:03:28 +08:00
rich2014
663df1faa1 UPD: add comments for Darwin IO unit 2025-11-09 11:51:28 +08:00
rich2014
64eddc20ce DEL: GetVolumeName() and DiskArbitration on macOS 2025-11-08 23:14:08 +08:00
rich2014
417989d64b UPD: improve support for root '/' in TDriveWatcher.GetDrivesList() on macOS 2025-11-08 23:14:03 +08:00
rich2014
a02a84c5de ADD: enable IOKit for full support of APFS bootable system/data volume in TDriveWatcher.GetDrivesList() on macOS 2025-11-08 23:13:53 +08:00
rich2014
36ea15b9be ADD: IOKit for APFS bootable system/data Volumn on macOS 2025-11-08 23:13:04 +08:00
Alexander Koblov
a6c06d7866 FIX: Pixelated icons under Windows (issue #2584) 2025-11-04 19:25:45 +03:00
Alexander Koblov
396d7b541a UPD: Zip - Better suspicious symbolic links handling 2025-11-04 15:05:06 +03:00
Alexander Koblov
9370d9ec7c FIX: Wrong "From" path when copying from .b64 (issue #1639) 2025-11-03 14:18:22 +03:00
Alexander Koblov
c1e7ea2106 UPD: Use BLAKE3 under AArch64 2025-11-03 13:45:53 +03:00
Alexander Koblov
e315432918 UPD: Default plugins list version number 2025-11-03 13:42:25 +03:00
Alexander Koblov
93788497b9 FIX: GioFileSource - Copy files between different locations (fixes #2469) 2025-11-02 16:13:01 +03:00
Alexander Koblov
84088e1139 FIX: Compilation for non macOS (fixes #2581) 2025-11-02 15:00:28 +03:00
Faludi Zoltán
b36c755362
UPD: Hungarian language file (#2553) 2025-11-02 14:51:56 +03:00
Alexander Koblov
1f0fe20177 FIX: KAScrypt - TDCP_blockcipher128.IncCounter 2025-11-02 13:51:09 +03:00
Alexander Koblov
344b0b786b FIX: Zip - When reading archives replace relative paths by underlines 2025-11-02 13:46:22 +03:00
Alexander Koblov
520c66620e UPD: Zip - Do not extract symbolic links that point outside the target directory 2025-11-02 13:46:21 +03:00
Alexander Koblov
3316ac227f ADD: Lua - SysUtils.Execute function 2025-11-01 19:50:11 +03:00
Alexander Koblov
31b58a086c FIX: Compilation for non macOS (fixes #2581) 2025-11-01 19:26:38 +03:00
rich2014
ff6aed5311 UPD: support Retina in KASToolbar (use TImageList as the image source to support Retina) 2025-10-31 13:44:56 +08:00
rich2014
1420d10aca UPD: support Retina in Thumbnails Cache 2025-10-29 23:40:37 +08:00
rich2014
8d37f93ab5 UPD: support Retina in Thumbnails File View 2025-10-29 16:57:58 +08:00
rich2014
b9c57a912b UPD: refactor scale factor related 2025-10-29 15:54:39 +08:00
rich2014
251444ef38 UPD: remove IconSize from 24 to 32 in TPixMapManager.GetMimeIcon() on macOS 2025-10-29 12:05:29 +08:00
rich2014
ca3738ae73 UPD: refactor Retina related 2025-10-28 12:21:37 +08:00
rich2014
c78f665cd5 UPD: support Retina in Icon Options Dialog 2025-10-28 12:18:09 +08:00
rich2014
8cf46f7b0a UPD: support Retina in Drive List 2025-10-28 12:17:33 +08:00
rich2014
8bbb10317a UPD: support Retina in Drive Button in Disk Panel 2025-10-28 12:16:19 +08:00
rich2014
4a63633d36 UPD: support Retina in TPixMapManager.LoadThemeIcon() 2025-10-28 12:14:16 +08:00
rich2014
632c724605 FIX: zip plugins compile error on UNIX(and not Linux), issue #2571 2025-10-27 15:23:13 +08:00
Alexander Koblov
a8e1440aea ADD: Zip - more accurate time support (fixes #2555) 2025-10-25 21:38:27 +03:00
Alexander Koblov
863b4e92b9 ADD: DCDateTimeUtils - additional functions 2025-10-25 16:55:54 +03:00
Alexander Koblov
dfdaa9cdbd UPD: Korean language file (fixes #2564) 2025-10-25 14:53:10 +03:00
Alexander Koblov
4ff6ff14dd UPD: DCDateTimeUtils - better time zone support (Unix) 2025-10-25 14:44:57 +03:00
rich2014
5275b991f4 UPD: 'Mac OS X' to 'macOS' in About Dialog 2025-10-24 21:35:33 +08:00
rich2014
a3813e74e6 UPD: improve unmounting drivers 2025-10-23 20:58:37 +08:00
rich2014
f316514d6c UPD: add tag related error log on macOS 2025-10-22 22:39:29 +08:00
rich2014
b607af5a5a FIX: the AutoRefresh issue on APFS bootable volumes on external drives 2025-10-21 21:44:39 +08:00
rich2014
0c34a9cad0 UPD: new Icon for macOS, better than before on macOS 15, issue #2552 2025-10-20 17:23:01 +08:00
rich2014
0ba15fa523 UPD: make application icons best in both "FileView" and "Open With" 2025-10-19 23:24:00 +08:00
rich2014
76685248d1 UPD: dont't show Splash Form by default (in line with macOS usage) 2025-10-19 22:34:10 +08:00
rich2014
2c0ec09624 UPD: support gIconsInMenusSize in "Open With" Menu 2025-10-19 21:56:41 +08:00
rich2014
9200ae0a7c FIX: support app icons on macOS 26.1 #2519
NSBMPFileType to NSPNGFileType
2025-10-19 21:49:45 +08:00
rich2014
0d6c9f0027 UPD: revert Debug code, issue #2519 2025-10-18 23:38:06 +08:00
rich2014
46229c3af3 UPD: add log in TFileListBuilder.Execute() for Debug, issue #2519 2025-10-18 21:42:42 +08:00
rich2014
5ec21c44c6 UPD: add Exception Handle in TPixMapManager.CheckAddFileUniqueIcon() for Debug, issue #2519 2025-10-18 18:37:16 +08:00
rich2014
7bc7f6f687 UPD: add Exception Handle in TFileListBuilder.Execute() for Debug, issue #2519 2025-10-18 17:17:52 +08:00
rich2014
f96c26d465 UPD: new Icon for macOS, issue #2552 2025-10-18 17:07:47 +08:00
rich2014
6463dce0cd FIX: Finder Tag on macOS 14+
https://github.com/doublecmd/doublecmd/discussions/2506
2025-10-17 17:00:55 +08:00
Alexander Koblov
4b4b38eb97 FIX: Zip - synchronize central directory header with local file header (fixes #2542) 2025-10-13 21:58:14 +03:00
rich2014
13cf4d30f0 FIX: on macOS, fix the issue that the icons in the context "Open With" menu were not clear on Retina screens by new LCL/Cocoa #2519 2025-10-12 21:28:25 +08:00
rich2014
186be92aa7 ADD: support app icons on macOS 26 #2519 2025-10-11 19:30:37 +08:00
Alexander Koblov
bc9d0074d2 ADD: SevenZip - install plugin under Linux (experimental) 2025-10-11 13:39:55 +03:00
rich2014
22a8fdb239 ADD: support Finder Tag on macOS 15.6+
https://github.com/doublecmd/doublecmd/discussions/2506
2025-10-10 22:00:56 +08:00
Alexander Koblov
ae1fbea502 UPD: German language file 2025-10-07 21:31:48 +03:00
Alexander Koblov
df0bf0f830 FIX: Dark mode - draw toolbar separators 2025-10-07 21:25:31 +03:00
Alexander Koblov
7009356f41 UPD: Language files 2025-10-07 20:42:05 +03:00
Alexander Koblov
1a30861c1a UPD: Project file (I18N options) 2025-10-07 20:36:31 +03:00
Yuri Lychakov
13b9fbf425
UPD: Modified LGPL for uwin32widgetsetdark.pas (#2533)
The copyright holder has generously approved the addition of a static linking exception to the license (as in the LCL).
2025-10-07 20:29:47 +03:00
Alexander Koblov
9eb3025704 ADD: SHA3 use AVX2 2025-10-05 14:31:37 +03:00
Alexander Koblov
f28d472fcd UPD: Language files 2025-10-04 17:21:18 +03:00
Alexander Koblov
70b656b88d ADD: Option to display free space label at the drive bar (issue #2498) 2025-10-04 16:46:34 +03:00
Alexander Koblov
99f6e06c78 ADD: TKASLabelItem class 2025-10-04 16:15:43 +03:00
Alexander Koblov
24c8539069 UPD: Optimize verify checksum operation 2025-10-04 15:21:11 +03:00
Alexander Koblov
44f38d82ac ADD: Multi-rename - replace also in file extensions option 2025-10-04 14:17:18 +03:00
Alexander Koblov
0f9f752cc5 FIX: Don't use flock function, it does not work correct with network file systems (issue #2018) 2025-10-03 01:12:47 +03:00
Alexander Koblov
8c705a5c17 UPD: Disable fcopyfile function 2025-10-03 01:12:47 +03:00
Alexander Koblov
80fcc0e63f FIX: Saving universal-highlighter colors settings (fixes #2514) 2025-10-01 20:37:26 +03:00
Alexander Koblov
5cb3b065a2 ADD: TKASToolLabel control 2025-10-01 20:37:26 +03:00
Alexander Koblov
df447bf704 UPD: Use fcopyfile function under macOS (issues #2018, #2526) 2025-09-30 21:02:53 +03:00
Alexander Koblov
78467ea00d UPD: KAScrypt - refactoring 2025-09-27 19:55:03 +03:00
Alexander Koblov
85f15abb5a FIX: FTP - execute SIZE command in the binary mode (fixes #2510) 2025-09-21 18:36:26 +03:00
Alexander Koblov
69b61db9ac FIX: FTP - remove warnings, refactoring 2025-09-21 18:36:25 +03:00
rich2014
b9d921e555 UPD: move TDarwinFileUtil from uDarwinFileUtil to DCDarwin 2025-09-21 21:57:09 +08:00
rich2014
47c57a80a5 ADD #2500: support copying extended attributes 2025-09-21 21:45:15 +08:00
Alexander Koblov
09d1d9edb9 UPD: Default plugins 2025-09-21 00:10:17 +03:00
Alexander Koblov
21a7e06543 ADD: Zip - extract from brotli compressed files (.br) 2025-09-20 22:12:38 +03:00
Alexander Koblov
55481eda5b ADD: DCClasses unit 2025-09-20 22:11:40 +03:00
Alexander Koblov
3ad188b21f ADD: Zip - Brotli decompression support 2025-09-20 17:07:25 +03:00
Alexander Koblov
87fb9821e4 ADD: SHA512 use AVX2 2025-09-19 21:06:39 +03:00
Alexander Koblov
2390474e16 UPD: Refactoring, clean up 2025-09-19 20:59:05 +03:00
Alexander Koblov
47c5b6efd9 ADD: SHA256 use ARM64CE 2025-09-17 21:09:27 +03:00
Alexander Koblov
84c311a648 FIX: Zip - progress calculation 2025-09-15 20:21:23 +03:00
Alexander Koblov
77c3f9f94b FIX: Don't normalize path delimiters for terminal commands 2025-09-14 13:27:47 +03:00
Alexander Koblov
e192d3b8bd FIX: Use _SC_NPROCESSORS_CONF constant 2025-09-14 01:46:08 +03:00
Alexander Koblov
62843e9999 ADD: Zip - don't show file size for files which don't have a size (issue #2497) 2025-09-14 00:29:30 +03:00
Alexander Koblov
9bb0036c76 ADD: BLAKE3 use NEON 2025-09-13 17:26:29 +03:00
Alexander Koblov
fe40648730 UPD: Language files 2025-09-07 19:15:25 +03:00
Alexander Koblov
10fdf45d15 UPD: Use BLAKE3 under x86_64 2025-09-07 19:10:39 +03:00
Alexander Koblov
a6a23740d8 UPD: Greek language file 2025-09-06 17:08:03 +03:00
Alexander Koblov
9136d3b0e5 UPD: Calculate checksum dialog 2025-09-06 16:03:21 +03:00
Mihaly Nyilas
f7d43f7196
UPD: Hungarian language file, with some fixes (#2487) 2025-09-06 16:02:39 +03:00
Alexander Koblov
66d9f04d01 FIX: Viewer - crash with zero size virtual file (issue #2373) 2025-09-04 20:47:38 +03:00
dependabot[bot]
77e8eb5b0f
UPD: Bump actions/checkout from 4 to 5 (#2459)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 08:32:02 +03:00
rich2014
bbc9f423c7 UPD: set home for initial path on macOS (since the executable is in the APP bundle) 2025-08-10 12:44:38 +08:00
rich2014
dbbe18c493 UPD: GetHomeDir() on macOS 2025-08-10 12:31:23 +08:00
Alexander Koblov
b5d031ea5d FIX: Copy version information with line-ending at the end 2025-08-09 18:13:46 +03:00
Alexander Koblov
9b108c114b FIX: Lazarus 4.99 compatibility 2025-08-07 20:24:35 +03:00
Alexander Koblov
a60dc187b9 UPD: Extension API version 2025-08-03 18:28:33 +03:00
Alexander Koblov
0ff4de4985 UPD: Use CeUtf16ToUtf8 function (issue #2374) 2025-08-03 15:13:29 +03:00
Alexander Koblov
c55234ff76 UPD: Refactoring version information 2025-08-03 14:59:53 +03:00
Alexander Koblov
e459a57623 FIX: Clear search template description after deleting all templates (fixes #2437) 2025-08-03 13:43:08 +03:00
Alexander Koblov
5ab603bcfe FIX: Scroll line by line with cursor movement 2025-08-02 22:32:49 +03:00
Alexander Koblov
2cefe63169 FIX: GioGetMimeType function with zero size file 2025-08-02 01:34:09 +03:00
Alexander Koblov
25aa9b6549 UPD: Use Wayland under Qt6 >= 6.9.1 2025-08-02 01:34:09 +03:00
Alexander Koblov
44b35f2e19 ADD: Flush doublecmd.xml to the disk 2025-07-31 18:53:16 +03:00
Alexander Koblov
d1623e070d FIX: Crash on start with corrupted doublecmd.xml (issue #2430) 2025-07-31 18:43:55 +03:00
rich2014
dbc4d890b7 ADD: apply gZoomWithCtrlWheel elsewhere 2025-07-21 23:12:10 +08:00
Alexander Koblov
a935e89722 FIX: Viewer - Image rotate 2025-07-20 01:35:56 +03:00
Alexander Koblov
5a23bd3f6e UPD: Viewer - speed up the first rotate (based on Exif metadata) 2025-07-19 14:06:54 +03:00
Alexander Koblov
fcab889b63 FIX: Warnings 2025-07-19 13:46:17 +03:00
Alexander Koblov
4ea0ad56e6 FIX: Viewer - incorrect image scaling (issue #2412) 2025-07-19 13:44:23 +03:00
VenusGirl❤
99736408af
UPD: Korean language file doublecmd.ko.po (#2415) 2025-07-17 21:02:03 +03:00
rich2014
a9b269838a FIX: the issue with horizontal scrolling in File Panel, issue #2409 2025-07-17 18:37:35 +08:00
rich2014
1803271df8 ADD: default hotkeys for cm_ShowSysFiles / cm_Options / cm_Open / cm_ChangeDirToParent on macOS 2025-07-17 18:36:07 +08:00
rich2014
c92e859470 UPD: languages for 'Zoom' in Editor 2025-07-16 21:51:40 +08:00
rich2014
c601d25df2 ADD: default hotkeys for cm_ZoomIn / cm_ZoomOut in Editor 2025-07-16 21:50:45 +08:00
rich2014
614ca55830 ADD: apply gZoomWithCtrlWheel in Editor 2025-07-16 21:50:29 +08:00
rich2014
f308690452 ADD: actZoomIn / actZoomOut in Editor 2025-07-16 21:50:08 +08:00
rich2014
0244357e5b ADD: cm_ZoomIn / cm_ZoomOut in Editor 2025-07-16 21:49:35 +08:00
Skif-off
6b7b2e6e43
UPD: Russian language file (#2405) 2025-07-16 09:21:02 +03:00
rich2014
b1b0d4e17e UPD: remove unused TfrmViewer.pnlTextMouseWheelUp()
pnlTextMouseWheelUp() should be a legacy issue and will not be called. also, there is only pnlTextMouseWheelUp() but no pnlTextMouseWheelDown().
2025-07-15 23:12:34 +08:00
rich2014
0ab9538c99 ADD: apply Zoom Functions in Viewer 2025-07-15 23:12:34 +08:00
rich2014
560720d95f ADD: unified Zoom Functions in Viewer 2025-07-15 23:12:34 +08:00
rich2014
8f4d30daf4 ADD: default hotkeys for cm_ZoomIn / cm_ZoomOut in Viewer 2025-07-15 23:12:34 +08:00
rich2014
f65507b9ae FIX: possible crash when selecting the Viewer category in the Hotkeys Option dialog 2025-07-15 23:12:34 +08:00
Alexander Koblov
654eae2e0c FIX: Set focus on the right mouse button click (fixes #2395) 2025-07-14 20:25:59 +03:00
rich2014
e5c6b6112a UPD: languages for 'Zoom' 2025-07-15 00:10:43 +08:00
rich2014
7d2f308d2f UPD: update zh_TW 2025-07-15 00:10:25 +08:00
rich2014
262ee2c518 UPD: update zh_CN 2025-07-15 00:10:08 +08:00
rich2014
99e099e3d9 ADD: apply gZoomWithCtrlWheel to FileView 2025-07-15 00:09:53 +08:00
rich2014
0bcdb51956 ADD: gZoomWithCtrlWheel and Option for Zoom With Scroll Wheel 2025-07-15 00:09:37 +08:00
Alexander Koblov
fa8d20dd4b FIX: Possible crash on form close 2025-07-13 13:53:51 +03:00
rich2014
0a277a0ec3 UPD: remove duplicate code related to cmMainFontZoomIn / MainFontZoomOut 2025-07-12 21:52:49 +08:00
rich2014
85c202f0c8 UPD: i18n for cm_MainFontZoomIn / cm_MainFontZoomOut 2025-07-12 18:32:11 +08:00
rich2014
6013171566 ADD: icons for cm_MainFontZoomIn / cm_MainFontZoomOut 2025-07-12 16:56:00 +08:00
rich2014
c87f41c8cb ADD: default ShortCuts for cm_MainFontZoomIn / cm_MainFontZoomOut 2025-07-12 16:55:22 +08:00
rich2014
613627e391 ADD: cm_MainFontZoomIn / cm_MainFontZoomOut 2025-07-12 16:54:42 +08:00
Mihaly Nyilas
13d57aab25
UPD: Hungarian language file (#2383) 2025-07-08 00:34:52 +03:00
Alexander Koblov
671c12a090 UPD: German language file 2025-07-08 00:13:53 +03:00
Alexander Koblov
ceb271de20 UPD: Use GifView component instead GifAnim (fixes #814) 2025-07-08 00:08:22 +03:00
rich2014
0286f2e71f FIX: 3 language files for typo "iCloud Drive" 2025-07-05 09:08:44 +08:00
rich2014
2d71b3d9ae UPD: update zh_TW 2025-07-05 09:04:09 +08:00
rich2014
fa6d5b8a95 UPD: update zh_CN 2025-07-05 09:03:59 +08:00
rich2014
834b5b4f0d UPD: update zh_CN 2025-07-05 08:53:32 +08:00
rich2014
01778e34b3 FIX: typo "iCloud Drive" 2025-07-04 21:28:06 +08:00
rich2014
132b74341e UPD: expand the applicable scope of TDarwinFileUtil.cloneFile(), macOS < 10.13 / APFS / File Size 2025-07-02 18:20:28 +08:00
rich2014
e2f09416b2 ADD: apply TDarwinFileUtil.cloneFile() in TFileSystemOperationHelper.CopyFile() on macOS
1. dramatically improve file copy speed on APFS
2. supports copying macOS specific attributes
2025-07-01 18:24:19 +08:00
rich2014
14dc146845 ADD: add system native copyfile() to support clone file on macOS 2025-07-01 18:21:31 +08:00
rich2014
c625ff7b31 UPD: improve Icons for Special Folders on macOS 2025-06-30 22:40:46 +08:00
rich2014
45dc9d6c40 ADD: improve Icons for the files in Special Folders on macOS 2025-06-29 22:23:44 +08:00
rich2014
ed9e9882fe UPD: improve Icons for the Folders with special ext on macOS 2025-06-29 18:52:04 +08:00
rich2014
a601c76280 ADD: show Icon for Executable file without ext on macOS 2025-06-29 18:51:59 +08:00
Alexander Koblov
d70586be97 UPD: German language file 2025-06-29 00:50:48 +03:00
Alexander Koblov
89f42755c7 UPD: libunrar build script 2025-06-28 16:28:21 +03:00
Alexander Koblov
ab25a1ccd3 ADD: libunrar build script 2025-06-28 14:45:55 +03:00
Alexander Koblov
bf062ab594 ADD: FTP - CLNT command support 2025-06-27 22:54:38 +03:00
rich2014
0f4ca8230c UPD: Improv drive watch on macOS
1. on slow networks or devices, fstab is not updated immediately after /Volumes changes
2. after detecting a drive change, the fixed wait time of 1 second is changed to multiple wait times in sequence
2025-06-27 21:32:58 +08:00
rich2014
9df79dc94a FIX: udarwinfswatch: the issue that when monitoring the root directory, changes in the second-level directory were also matched 2025-06-27 21:27:09 +08:00
rich2014
b27864fe36 UPD: MacCloud/Options: the width of the Connection List changes with the Splitter 2025-06-27 21:21:03 +08:00
rich2014
91f98d59f0 FIX: MacCloud: the issue that when revoke token, it may need to get token first 2025-06-27 21:11:45 +08:00
rich2014
91d1d605c3 FIX: MacCloud: the issue in OAuth2 RefreshToken() 2025-06-26 22:11:43 +08:00
Alexander Koblov
9010859c6f UPD: German language file 2025-06-25 21:18:26 +03:00
Alexander Koblov
8a316d20d5 FIX: Everything - stop search 2025-06-25 21:16:52 +03:00
Alexander Koblov
a5ead39c74 FIX: FsExtractCustomIcon with directory 2025-06-25 21:16:52 +03:00
rich2014
1836be8ebf UPD: MacCLoud: hide 0 size for Connections in the File Panel 2025-06-24 20:47:08 +08:00
rich2014
79ba3f946e ADD: MacCloud/Icon: support FsExtractCustomIconW() 2025-06-23 19:15:00 +08:00
rich2014
42588e4d1a ADD: MacCloud/Icon: support FsExtractCustomIconW() 2025-06-23 19:14:25 +08:00
Alexander Koblov
242c3808b6 FIX: Wrong default icon when FsExtractCustomIcon returns FS_ICON_USEDEFAULT 2025-06-22 22:14:28 +03:00
Alexander Koblov
eeb249c216 FIX: Build under macOS 2025-06-22 21:56:33 +03:00
Alexander Koblov
9e690e36ee UPD: Sample.wfx plugin 2025-06-22 20:18:10 +03:00
Alexander Koblov
a824defefe ADD: FsExtractCustomIcon function support 2025-06-22 20:11:11 +03:00
rich2014
4e993732ef UPD: load app bundle icon by Cocoa Api on macOS 2025-06-18 22:47:09 +08:00
rich2014
75e59c056f UPD: show system native Icon for zip file on macOS 2025-06-18 21:45:24 +08:00
rich2014
d184c1af5a ADD #2342: support Custom File Icon on macOS 2025-06-17 22:20:09 +08:00
rich2014
c28ce65eef ADD: getMacOSFileUniqueIcon() on macOS 2025-06-17 22:15:52 +08:00
Alexander Koblov
2bdc88ee2b FIX: File creation time is changed to now when file is moved (fixes #2020) 2025-06-15 13:41:18 +03:00
Alexander Koblov
a6f85c0c0b FIX: Diacritics list 2025-06-15 13:32:18 +03:00
Alexander Koblov
14698a233e FIX: ListLoad - pass directory name with trailing slash (fixes #2041) 2025-06-14 18:53:35 +03:00
Alexander Koblov
558a802ad6 UPD: Optimize Windows mask matching 2025-06-13 16:48:43 +03:00
Skif-off
4e330b2f0c
UPD: Russian language file (#2365) 2025-06-13 12:29:20 +03:00
Alexander Koblov
d65eae6bf0 UPD: Language files 2025-06-13 01:21:28 +03:00
Alexander Koblov
6d34bc2488 ADD: Quick Search - ignore diacritics and ligatures option 2025-06-13 01:19:47 +03:00
Alexander Koblov
7ed5986ea4 UPD: Language files 2025-06-13 01:02:31 +03:00
Alexander Koblov
f31c0b329f FIX: TMask - update template 2025-06-13 00:58:22 +03:00
Alexander Koblov
ba08ab16cd FIX: NormalizeAccentedChar function 2025-06-13 00:55:33 +03:00
Alexander Koblov
4aee2b6d28 ADD: Quick Search - capability to ignore diacritics and ligatures 2025-06-13 00:51:59 +03:00
Alexander Koblov
9b94cfa173 UPD: Diacritics list 2025-06-12 22:13:55 +03:00
Alexander Koblov
c7c71055d6 UPD: Language files 2025-06-12 21:39:47 +03:00
Alexander Koblov
b240bbd2fc UPD: German language file 2025-06-12 21:39:47 +03:00
Alexander Koblov
31d84586e4 UPD: Differ - message box buttons captions 2025-06-12 21:39:47 +03:00
Alexander Koblov
36104f797a FIX: Inplace renaming when clicking twice on a name does not work in the Brief View (fixes #2185) 2025-06-12 15:13:00 +03:00
Alexander Koblov
8769a5a248 FIX: Number pad 0 is recognized as a symbol when used as a hotkey (fixes #2277) 2025-06-08 01:58:08 +03:00
Alexander Koblov
86fba75d0c ADD: Differ - collapse a home directory in the message box (issue #2345) 2025-06-07 16:17:26 +03:00
Alexander Koblov
dd23c55109 UPD: Release workflow 2025-06-07 16:05:48 +03:00
Alexander Koblov
3c9894fca3 FIX: Range check error (fixes #2338) 2025-06-04 20:02:54 +03:00
rich2014
2baeda7ec9 UPD: potential memory out-of-bounds detection in Plugin Extension 2025-06-02 18:48:27 +08:00
rich2014
abc64806bb UPD: MacCloud: replace deprecated Cocoa API selectRow_byExtendingSelection 2025-06-02 18:48:27 +08:00
Alexander Koblov
f6ff7d1337 FIX: Rename - select to filename fails in some circumstances (issue #2332) 2025-06-02 00:12:33 +03:00
VenusGirl❤
0312823fc4
UPD: Korean language file (#2331) 2025-06-01 18:49:31 +03:00
Alexander Koblov
4154968832 FIX: Invalid checkboxes state (fixes #2330) 2025-06-01 17:49:35 +03:00
Alexander Koblov
11b5e330f5 UPD: Language files 2025-06-01 15:36:42 +03:00
Alexander Koblov
548a665a91 FIX: Invalid menu shortcuts (issue #2321) 2025-06-01 15:34:09 +03:00
Alexander Koblov
4800956d1f ADD: Show error message when user tries to change a target location (issue #2327) 2025-06-01 15:20:05 +03:00
Alexander Koblov
fe99ab9321 FIX: Differ - wrong toolbar buttons sequence 2025-06-01 13:31:34 +03:00
Alexander Koblov
8c7dea1c64 FIX: File types colors dialog gets cropped when resizing window (fixes #2328) 2025-06-01 12:36:47 +03:00
Alexander Koblov
1af6bd6f7d FIX: Windows XP compatibility 2025-06-01 01:04:14 +03:00
Alexander Koblov
caa29d7c64 UPD: RegExpr library 2025-05-31 20:26:31 +03:00
Alexander Koblov
e96a6460b4 FIX: Viewer - crash with an invalid regular expression 2025-05-31 17:41:22 +03:00
Alexander Koblov
f63a5a93c5 FIX: Find files - crash with an invalid regular expression (issue #2249) 2025-05-31 17:33:58 +03:00
Alexander Koblov
983ba7624c FIX: mbFileAge function 2025-05-31 13:01:23 +03:00
Alexander Koblov
e1415be85c UPD: Optimize .svg files size 2025-05-31 12:53:33 +03:00
Alexander Koblov
986415c38b ADD: Update icon-theme.cache time 2025-05-31 02:19:32 +03:00
Alexander Koblov
dd657ed8a1 FIX: Viewer - random crash with enabled caret under Qt (issue #2265) 2025-05-31 01:17:04 +03:00
Alexander Koblov
be4128e1df ADD: Update icon-theme.cache time 2025-05-29 00:42:46 +03:00
Alexander Koblov
ad0672ff54 ADD: Update icon-theme.cache time 2025-05-28 22:39:03 +03:00
Alexander Koblov
ff6124bb62 ADD: DCTheme icon theme cache file 2025-05-28 21:55:09 +03:00
Alexander Koblov
7a86a84846 UPD: Use optimized .svg icons instead .svgz (follow the icon theme specification) 2025-05-28 21:41:39 +03:00
Alexander Koblov
e7f9679e06 FIX: Viewer - enable save action only in the image view mode (fixes #2323) 2025-05-28 21:31:50 +03:00
Alexander Koblov
90222158e1 FIX: Cannot focus a disabled or invisible window 2025-05-26 23:45:33 +03:00
Alexander Koblov
5fc4cb2e0c FIX: TransferLeft and Right commands do not work with folder symbolic links (fixes #2308) 2025-05-25 13:11:45 +03:00
Alexander Koblov
52fed0fea1 FIX: Use Xwayland with Qt6 version (issue #2290) 2025-05-24 12:15:34 +03:00
Alexander Koblov
53f2fb6bc5 FIX: _SC_NPROCESSORS_ONLN constant value (Linux) 2025-05-23 20:02:09 +03:00
Alexander Koblov
569a0d1181 FIX: ELayoutException: TControl.InvalidatePreferredSize loop detected (fixes #2169) 2025-05-23 17:57:34 +03:00
rich2014
7d4a31c5a2 ADD: MacCloud/S3: step-154: improve list buckets 2025-05-22 18:54:43 +08:00
rich2014
0acfc8b593 ADD: MacCloud/Options: step-153: more clear notes 2025-05-22 18:54:27 +08:00
rich2014
9c49da4e58 ADD: MacCloud/Options: step-152: notes configurable 2025-05-22 18:54:14 +08:00
rich2014
6c27f206fd ADD: MacCloud/BackBlazeB2: step-151: MainIcon 2025-05-22 18:53:59 +08:00
rich2014
952f41a93e ADD: MacCloud/BackBlazeB2: step-150: regions.json 2025-05-22 18:53:46 +08:00
rich2014
eb628cd8f4 ADD: MacCloud/S3: step-149: BackBlaze B2 2025-05-22 18:53:33 +08:00
rich2014
5aa91266c3 UPD: MacCloud/Options: step-148: remove spaces from user input 2025-05-21 21:05:04 +08:00
rich2014
e63af3136e ADD: MacCloud/Upyun: step-147: MainIcon 2025-05-21 21:04:49 +08:00
rich2014
866f2dea27 ADD: MacCloud/Upyun: step-146: i18n 2025-05-21 21:04:36 +08:00
rich2014
07f3afffbd ADD: MacCloud/S3: step-145: Upyun USS 2025-05-21 21:04:20 +08:00
rich2014
fdfab7d552 ADD: MacCloud/QiniuKODO: step-144: regions.json 2025-05-21 21:04:05 +08:00
rich2014
5773d1e154 ADD: MacCloud/QiniuKODO: step-143: MainIcon 2025-05-21 21:03:48 +08:00
rich2014
b4e572d064 ADD: MacCloud/QiniuKODO: step-142: i18n 2025-05-21 21:03:35 +08:00
rich2014
4e617c8837 ADD: MacCloud/S3: step-141: Qiniu KODO 2025-05-21 21:03:29 +08:00
rich2014
2fd63c6e40 UPD: MacCloud/Options: Improve keyboard accessibility 2025-05-20 18:34:35 +08:00
rich2014
193340675c ADD: MacCloud/HuaweiOBS: step-140: i18n for regions.json 2025-05-20 18:34:13 +08:00
rich2014
6e5cf95b48 ADD: MacCloud/TencentCOS: step-139: i18n for regions.json 2025-05-20 18:33:59 +08:00
rich2014
63e90f669f ADD: MacCloud/AmazonS3: step-138: i18n for regions.json 2025-05-20 18:33:35 +08:00
rich2014
2507356c85 ADD: MacCloud/AliyunOSS: step-137: i18n for regions.json 2025-05-19 21:44:22 +08:00
rich2014
57a1857c2e ADD: MacCloud/i18n: step-136: i18n for regions.json 2025-05-19 21:44:18 +08:00
rich2014
cb0681810d ADD: Plugin Extension LanguageID for i18n 2025-05-19 21:44:14 +08:00
rich2014
b4f6bc0c4f UPD: MacCloud/i18n: zh_CN language 2025-05-19 21:44:04 +08:00
rich2014
3a5e716fc1 UPD: MacCloud/i18n: enable <Add New Connection> i18n 2025-05-19 21:43:36 +08:00
rich2014
c2ac156832 UPD: MacCloud/i18n: enable CloudDriver displayName i18n 2025-05-19 21:43:15 +08:00
Alexander Koblov
0ead73a7ae UPD: SFTP - use a more optimal write buffer size 2025-05-18 21:35:42 +03:00
Alexander Koblov
41468186ae UPD: Enable JPEG XL image format reader (Windows) 2025-05-18 19:56:38 +03:00
Alexander Koblov
09e7273a18 UPD: Enable JPEG XL image format reader (Linux) 2025-05-18 14:57:30 +03:00
Alexander Koblov
c0cba942e6 ADD: Use an additional library search path (Windows) 2025-05-18 14:51:55 +03:00
Alexander Koblov
4598b563f0 ADD: JPEG XL image format reader 2025-05-18 13:53:06 +03:00
Alexander Koblov
a3cd2d8864 DEL: Obsolete unit 2025-05-18 13:21:16 +03:00
Alexander Koblov
47f04c0f9a FIX: Execute QCoreApplication_setAttribute only once 2025-05-18 13:04:09 +03:00
rich2014
dab6537415 ADD: MacCloud/i18n: step-135: update install.sh 2025-05-18 16:45:18 +08:00
rich2014
ae40018d57 ADD: MacCloud/i18n: step-134: zh_CN language 2025-05-18 16:42:10 +08:00
rich2014
ad4ccd76c9 ADD: MacCloud/i18n: step-133: enable i18n in WFX 2025-05-18 16:20:19 +08:00
rich2014
aa410f0ce6 ADD: MacCloud/i18n: step-132: enable i18n in project 2025-05-18 16:19:51 +08:00
Alexander Koblov
4b65262579 UPD: Use mbLoadLibraryEx function 2025-05-18 00:32:21 +03:00
Alexander Koblov
c8e99df6c3 FIX: mbLoadLibraryEx function 2025-05-18 00:29:35 +03:00
Alexander Koblov
9a5583c989 ADD: Swift syntax highlighter 2025-05-17 16:52:31 +03:00
Alexander Koblov
888b239508 ADD: YAML syntax highlighter 2025-05-17 15:16:09 +03:00
Alexander Koblov
6127c19b04 FIX: Viewer - find-dialog has ugly buttons look (fixes #2301) 2025-05-17 13:13:11 +03:00
rich2014
d52b753e4b FIX: MacCloud/Options: the issue when there is no Connection 2025-05-17 17:47:29 +08:00
Alexander Koblov
1bea1a28b2 ADD: Print an icons loading time 2025-05-16 23:54:40 +03:00
Alexander Koblov
c962b5eda0 ADD: Load theme icons list from cache (issue #2297) 2025-05-16 23:49:58 +03:00
rich2014
d86594afdf FIX: MacCloud: step-131: the issue with Copying/Moving From/To Connections 2025-05-16 18:20:16 +08:00
rich2014
3ff7b289fc ADD: MacCloud/S3: step-130: support move/rename file 2025-05-16 18:19:36 +08:00
rich2014
f7cd7a12d2 FIX: MacCloud/S3: the issue in TS3Client.clone() 2025-05-15 21:52:59 +08:00
Alexander Koblov
96c6e03cf4 UPD: Update plugins if default plugins list version is changed 2025-05-14 23:59:53 +03:00
Alexander Koblov
f98f7b9f39 UPD: German language file 2025-05-14 23:51:07 +03:00
Alexander Koblov
19b8645d60 ADD: Default plugins list version number 2025-05-14 23:49:58 +03:00
rich2014
ea18f522d4 ADD: MacCloud/S3: step-129: support multi-thread for Buckets 2025-05-14 21:35:31 +08:00
Alexander Koblov
3879f1658d FIX: Partial write 2025-05-13 20:19:03 +03:00
rich2014
559982ac5a ADD: MacCloud: step-128: update to default plugins 2025-05-13 22:21:15 +08:00
rich2014
1d9bbe474f ADD: MacCloud/S3: step-127: support HeadBucket API in HuaweiOBS 2025-05-13 22:20:34 +08:00
rich2014
84a2000f2c UPD: MacCloud/S3: exception handle in TWFXS3PropertyView.saveConnection() 2025-05-13 22:20:19 +08:00
rich2014
4e65f7feae ADD: MacCloud/S3: step-126: improve getAllBuckets() 2025-05-13 22:20:16 +08:00
rich2014
f36c3e9af4 ADD: MacCloud/Options: step-125: check connection params in S3 Options Window 2025-05-13 22:20:11 +08:00
rich2014
35d1d92111 ADD: MacCloud/OneDriver: step-124: accout config 2025-05-11 23:21:39 +08:00
rich2014
8938ce9547 UPD: MacCloud/Options: step-123: improve Options Window 2025-05-11 23:21:39 +08:00
rich2014
13aec9f5b0 ADD: MacCloud/S3: step-122: support multi-bucket in Amazones3/AliyunOSS/TencentCOS/HuaweiBOS 2025-05-11 23:21:38 +08:00
rich2014
800834e213 ADD: MacCloud/S3: step-121: support multi-bucket in CopyObject 2025-05-11 23:21:38 +08:00
rich2014
30a311f100 ADD: MacCloud/S3: step-120: support multi-bucket in Delete 2025-05-11 23:21:38 +08:00
rich2014
2abf7b5dfe ADD: MacCloud/S3: step-119: support multi-bucket in Download 2025-05-11 23:21:38 +08:00
rich2014
d9b7c60ec5 ADD: MacCloud/S3: step-118: support multi-bucket in Upload 2025-05-11 23:21:38 +08:00
rich2014
52c1991160 ADD: MacCloud/S3: step-117: support multi-bucket in CreateFolder 2025-05-11 23:21:38 +08:00
rich2014
5761433e56 ADD: MacCloud/S3: step-116: s3BuckPathHelper() for multi-bucket 2025-05-11 23:21:38 +08:00
rich2014
85445cfa0a ADD: MacCloud/S3: step-115: support multi-bucket in ListFolder 2025-05-11 23:21:38 +08:00
Alexander Koblov
0b21444c15 FIX: Find files - load encodings from search template 2025-05-11 12:24:37 +03:00
Alexander Koblov
7c707e3343 UPD: Snapshots workflow 2025-05-08 19:05:08 +03:00
rich2014
6afa92c16e ADD: MacCloud/Box: step-114: remove BOX clientSecret from source code and configuration files 2025-05-08 21:52:35 +08:00
rich2014
da741beba6 ADD: MacCloud/S3: step-113: support STS Temporary Security Token 2025-05-08 21:52:35 +08:00
rich2014
9dd8223e0a UPD: MacCloud/Options: move (User Custom) to the top in S3 region list 2025-05-08 21:52:35 +08:00
rich2014
c04880a305 ADD: MacCloud/HuaweiOBS: step-112: MainIcon 2025-05-08 21:52:35 +08:00
rich2014
d44cffdf26 ADD: MacCloud/HuaweiOBS: step-111: regions.json 2025-05-08 21:52:35 +08:00
rich2014
57737f8d98 ADD: MacCloud/S3: step-110: Huawei OBS 2025-05-08 21:52:35 +08:00
rich2014
393498aad7 UPD: MacCloud/Options: step-109: ake the CloudDrivers selection menu more user friendly 2025-05-08 21:52:35 +08:00
rich2014
9eac2290a0 UPD: MacCloud/Util: step-108: '+' in Url Path Encode 2025-05-08 21:52:35 +08:00
rich2014
c1be767702 ADD: MacCloud/S3Compatible: step-107: MainIcon 2025-05-08 21:52:35 +08:00
rich2014
7a31edc6c8 ADD: MacCloud/S3: step-106: S3 Compatible Cloud Driver 2025-05-08 21:52:35 +08:00
rich2014
c8f96e5594 ADD: MacCloud/AmazonS3: step-105: MainIcon 2025-05-08 21:52:35 +08:00
rich2014
09ba77774a UPD: MacCloud/S3: regions.json for AliyunOSS / TencentCOS 2025-05-08 21:52:35 +08:00
rich2014
e8c6106ee1 ADD: MacCloud/AmazonS3: step-104: regions.json 2025-05-08 21:52:35 +08:00
rich2014
cbb3409a14 ADD: MacCloud/S3: step-103: Amazon S3 Cloud Driver 2025-05-08 21:52:35 +08:00
rich2014
e8154a4e48 FIX: MacCloud/DropBox: unicode escape issue when upload large file 2025-05-08 21:52:35 +08:00
rich2014
4b54c96820 UPD: MacCloud: remove Content-Range header setting in TMiniHttpClient.doUpload()
for Amazon S3 Rest Api compatibility
2025-05-08 21:52:35 +08:00
rich2014
f72f67ea94 UPD: MacCloud/S3: setting single-line textField with habits 2025-05-08 21:52:35 +08:00
rich2014
5ea14acc4c UPD: MacCloud/S3: step-102: abstract clone() from Subclass Class to TS3Client 2025-05-08 21:52:35 +08:00
rich2014
8a82b341ff ADD: MacCloud/TencentCOS: step-101: MainIcon 2025-05-08 21:52:35 +08:00
rich2014
a3ef77dd87 ADD: MacCloud/TencentCOS: step-100: regions.json 2025-05-08 21:52:35 +08:00
rich2014
53749a439a ADD: MacCloud/S3: step-99: S3 Cloud Driver - TencentCOS 2025-05-08 21:52:35 +08:00
rich2014
2f7f150698 UPD: MacCloud/S3: step-98: simplify unnecessary different configurations for each S3 Driver 2025-05-08 21:52:35 +08:00
rich2014
38b3410422 UPD: MacCloud/S3: enhance compatibility with other S3 service providers 2025-05-08 21:52:35 +08:00
rich2014
838532a46b UPD: MacCloud/S3: remove unnecessary code 2025-05-08 21:52:35 +08:00
rich2014
17ae7acf9e ADD: MacCloud/AliyunOSS: step-97: regions.json 2025-05-08 21:52:35 +08:00
rich2014
e9f502857c ADD: MacCloud/Options: step-96: support user custom region and endpoint for S3 2025-05-08 21:52:35 +08:00
rich2014
eacda61c40 ADD: MacCloud/Options: step-95: support region list for S3 2025-05-08 21:52:35 +08:00
rich2014
6efa81c146 ADD: MacCloud/Options: step-94: add switch between asterisk/plainText display of Secret 2025-05-08 21:52:35 +08:00
rich2014
d6ba03b324 FIX: MacCloud/Options: addButton / removeButton / splitView 2025-05-08 21:52:35 +08:00
rich2014
cfb951952f ADD: MacCloud/Options: step-93: Options for S3 2025-05-08 21:52:35 +08:00
rich2014
c797022d0e UPD: MacCloud/Options: step-92: divide uWFXOptions into Core / Window / Property 2025-05-08 21:52:35 +08:00
rich2014
30acda2f89 FIX: MacCloud: memory leaks in Cloud Driver clone 2025-05-08 21:52:35 +08:00
rich2014
0fad673442 UPD: MacCloud: step-91: extract OAuth2 related from uCloudDriver to uOAuth2Core / uOAuth2Auth / uOAuth2Client 2025-05-08 21:52:35 +08:00
rich2014
748805d1bf ADD: MacCloud: step-90: AliyunOSS MainIcon 2025-05-08 21:52:35 +08:00
rich2014
3d81441df2 ADD: MacCloud/S3: step-89: S3 config 2025-05-08 21:52:35 +08:00
rich2014
a9ee5843d9 UPD: MacCloud/S3: step-88: refactor source file hierarchy 2025-05-08 21:52:35 +08:00
rich2014
ee5d9df872 ADD: MacCloud/S3: step-87: the first S3 Cloud Driver - AliyunOSS 2025-05-08 21:52:35 +08:00
rich2014
27b84a6af6 UPD: MacCloud/S3: step-86: The S3 configuration is more reasonably divided into Driver-level, Connection-level, and Account-level 2025-05-08 21:52:35 +08:00
rich2014
93eb7dfd83 UPD: MacCloud/S3: step-85: S3 refactor 2025-05-08 21:52:35 +08:00
rich2014
4f3d0b787e UPD: MacCloud: step-84: clearly distinguish WFX-related and Cloud Driver-related through naming 2025-05-08 21:52:35 +08:00
rich2014
eb982a259d ADD: MacCloud/S3: step-83: S3 basic 2025-05-08 21:52:35 +08:00
rich2014
e868e89be3 ADD: MacCloud/S3: step-82: AWS signature 2025-05-08 21:52:35 +08:00
rich2014
27dc71e24e ADD: MacCloud: step-81: xml util 2025-05-08 21:52:35 +08:00
rich2014
8cc89f6444 UPD: MacCloud: step-80: unify the reference of Http Authorization Header 2025-05-08 21:52:35 +08:00
rich2014
eced841224 UPD: MacCloud: step-79: for the previous four Cloud Drivers, extract TTokenCloudDriver / TCloudDriverAuthSession / TTokenCloudDriverConfig abstract layer 2025-05-08 21:52:35 +08:00
rich2014
96265e6ba3 ADD: MacCloud: step-78: improve http 2025-05-08 21:52:35 +08:00
rich2014
b2435efdd4 ADD: MacCloud: step-77: improve util 2025-05-08 21:52:35 +08:00
rich2014
17f7252190 ADD: MacCloud/Box: step-76: Box MainIcon 2025-05-08 21:52:35 +08:00
rich2014
f6063ca243 FIX: MacCloud/Box: TCloudDriverOAuth2SecretSession.clone() 2025-05-08 21:52:35 +08:00
rich2014
f4b2a489cc ADD: MacCloud/Box: step-75: Box Config 2025-05-08 21:52:35 +08:00
rich2014
25363fbaba UPD: MacCloud/Box: step-74: refactor to TBoxPathComponents 2025-05-08 21:52:35 +08:00
rich2014
204959be99 UPD: MacCloud/Box: step-73: refactor to uBoxClientUtil 2025-05-08 21:52:35 +08:00
rich2014
9f23878344 ADD: MacCloud/Box: step-72: Box pathToID 2025-05-08 21:52:35 +08:00
rich2014
3cdc7fd78a ADD: MacCloud/Box: step-71: Box basic 2025-05-08 21:52:35 +08:00
rich2014
7517fe2c0b ADD: MacCloud: step-70: enhanced Cloud Driver 2025-05-08 21:52:35 +08:00
rich2014
966d98c4dc ADD: MacCloud: step-69: support http post multipart/form-data 2025-05-08 21:52:35 +08:00
rich2014
d6e5e3b730 ADD: MacCloud: step-68: enhanced util 2025-05-08 21:52:34 +08:00
rich2014
f188356232 FIX: MacCloud/OneDrive: ListFolder path related 2025-05-08 21:52:34 +08:00
rich2014
f8862b158d UPD: MacCloud: convert + to %2B in url query, improve compatibility 2025-05-08 21:52:34 +08:00
rich2014
53e69da298 UPD: update zh_TW 2025-05-08 21:52:34 +08:00
rich2014
89ab4208ff UPD: update zh_CN 2025-05-08 21:52:34 +08:00
rich2014
f23a994413 ADD: apply NETWORK in Modern Form ToolBar on macOS 2025-05-08 21:52:34 +08:00
rich2014
90e2454947 UPD: MacCloud: remove the dependency on LazUtils 2025-05-08 21:52:34 +08:00
rich2014
c92279a612 UPD: MacCloud: notes 2025-05-08 21:52:34 +08:00
rich2014
51dd337a6c ADD: MacCloud: step-67: MacCloud ico in VFS list 2025-05-08 21:52:34 +08:00
rich2014
b34191cef7 ADD: MacCloud/OneDrive: step-66: One Drive MainIcon 2025-05-08 21:52:34 +08:00
rich2014
60d8139b30 ADD: MacCloud/OneDrive: step-65: One Drive config 2025-05-08 21:52:34 +08:00
rich2014
972b5c2d37 ADD: MacCloud/OneDrive: step-64: One Drive basic 2025-05-08 21:52:34 +08:00
rich2014
27f1f3ec5b ADD: MacCloud: step-63: add scope for TCloudDriverAuthPKCESession 2025-05-08 21:52:34 +08:00
rich2014
1bcf3c3519 ADD: MacCloud: step-62: improve http client 2025-05-08 21:52:34 +08:00
rich2014
f38b8013f2 UPD: MacCloud/Yandex: remove unnecessary access token settings 2025-05-08 21:52:34 +08:00
rich2014
e2ac4dd768 UPD: MacCloud: step-61: improve error handing 2025-05-08 21:52:34 +08:00
Alexander Koblov
5b2c3b9334 UPD: Allow a hard and symbolic link creation from search results 2025-05-08 13:25:18 +03:00
Alexander Koblov
c676d62ec3 ADD: Viewer - allow cm_WrapText command in the code view mode (experimental) 2025-05-08 12:53:38 +03:00
Alexander Koblov
ea52d64c6e FIX: Create a symbolic link when extract a ZIP-archive under Windows (issue #2298) 2025-05-08 12:20:40 +03:00
Alexander Koblov
c81160caf0 ADD: Use BCryptGenRandom function under Windows Vista+ 2025-05-06 20:55:26 +03:00
Alexander Koblov
e2a810c962 FIX: Don't allow a control codes in the file names under Windows (fixes #2285) 2025-05-06 20:51:01 +03:00
rumia
859c1fd568 FIX: LANG: zh_CN: Fix translations 2025-05-01 12:58:03 +08:00
Alexander Koblov
bfc1931ecd FIX: Build under FreeBSD 2025-04-20 17:59:19 +03:00
Alexander Koblov
29e886a671 FIX: JavaScript highlighter extensions 2025-04-20 12:39:15 +03:00
Dan Dascalescu
316e0c37d8
FIX: JavaScript highligher spelling, extensions (#2180) 2025-04-20 12:17:18 +03:00
Alexander Koblov
a9e9c7d17c UPD: Snapshots workflow 2025-04-19 16:19:40 +03:00
Alexander Koblov
e573e66ec7 FIX: Display special folder icons only in the "All associated + EXE/LNK" mode (Windows) 2025-04-19 14:58:37 +03:00
Alexander Koblov
c072da45b5 UPD: DetectEncoding - return a normalized encoding name 2025-04-19 14:41:19 +03:00
Alexander Koblov
15ef437b1e UPD: Release workflow 2025-04-19 14:05:21 +03:00
Alexander Koblov
e457ffa8ee
UPD: Snapshots workflow 2025-04-19 13:42:23 +03:00
Alexander Koblov
7c3fdc636a UPD: Copyright year 2025-04-19 00:54:20 +03:00
Alexander Koblov
67da3fbabb UPD: Librsvg library search algorithm 2025-04-18 23:56:52 +03:00
Alexander Koblov
2dd9817eb9 UPD: mbLoadLibraryEx function 2025-04-18 22:59:05 +03:00
Alexander Koblov
ab26e0eafb UPD: GetModuleHandleW function 2025-04-18 21:30:29 +03:00
rich2014
168ce6ed8e UPD: MacCloud: step-60: extract common code for TDropBoxClient / TYandexClient 2025-04-16 22:30:00 +08:00
rich2014
d6844eb919 UPD: MacCloud: step-59: extract common code for Downlaod / Upload / CreateFolder / Delete / CopyOrMove 2025-04-16 16:06:18 +08:00
rich2014
8c50148b40 UPD: MacCloud: step-58: extract common code to TCloudDriverListFolderSession / TCloudDriverDefaultLister 2025-04-16 15:31:04 +08:00
rich2014
ad45e74c24 UPD: MacCloud: step-57: unify TCloudDriverAuthPKCESession 2025-04-16 14:44:09 +08:00
rich2014
95815cfdeb UPD: MacCloud: step-56: unify EDropBoxException to ECloudDriverException 2025-04-16 14:44:05 +08:00
rich2014
f374448de0 UPD: MacCloud: step-55: unify TDropBoxResult to TCloudDriverResult 2025-04-16 14:43:19 +08:00
rich2014
b891864ac8 UPD: MacCloud: step-54: unify TDropBoxConfig to TCloudDriverConfig 2025-04-16 14:43:15 +08:00
rich2014
118d9e49a3 UPD: MacCloud: step-53: unify TDropBoxToken to TCloudDriverToken 2025-04-16 14:43:03 +08:00
rich2014
468a4ac676 FIX: MacCloud: filenames issue in uploading progress 2025-04-16 14:42:36 +08:00
rich2014
817ffc71a8 UPD: MacCloud/Options: step-52: specific Cloud Driver Name in notes 2025-04-16 14:42:26 +08:00
rich2014
d5eb924ff8 ADD: MacCloud/Options: step-51: support multiple Cloud Driver configurations 2025-04-16 14:42:22 +08:00
rich2014
e4f8460467 FIX: MacCloud: step-50: correctly reimplement FsFindFirst/Next/Close related 2025-04-16 14:42:18 +08:00
rich2014
dd8f11320a UPD: MacCloud: step-49: move the parts of uMacCloudCore not related to WFX into uCloudDriver 2025-04-16 14:42:13 +08:00
rich2014
f9fdb82a95 UPD: MacCloud/Http step-48: improve HttpClient 2025-04-16 14:42:06 +08:00
rich2014
303c013b75 ADD: MacCloud/Yandex step-47: HttpClient supports ContentRange upload in chunks 2025-04-16 14:42:01 +08:00
rich2014
4a66a7cda7 ADD: MacCloud/Yandex step-46: Yandex MainIcon 2025-04-16 14:41:57 +08:00
rich2014
5935a15497 ADD: MacCloud/Yandex step-45: Yandex Config 2025-04-16 14:41:30 +08:00
rich2014
7c92023496 ADD: MacCloud/Yandex step-44: Yandex Basic 2025-04-16 14:41:21 +08:00
rich2014
4224c96ac5 ADD: MacCloud step-43: HttpClient support various Method 2025-04-16 14:41:07 +08:00
rich2014
c28c1713cf ADD: MacCloud step-42: HttpClient becomes more flexible 2025-04-16 14:41:01 +08:00
rich2014
04418aad3c UPD: MacCloud step-41: refactor http and util 2025-04-16 14:40:39 +08:00
Alexander Koblov
63b392d46c FIX: FTP - show error message when cannot load/save settings (fixes #2264) 2025-04-12 20:50:17 +03:00
Alexander Koblov
685f55b514 ADD: TFileStreamEx.Create - show system error message 2025-04-12 20:47:54 +03:00
Alexander Koblov
ae0ea18747 FIX: Explorer preview plugin compilation 2025-04-12 13:57:38 +03:00
Alexander Koblov
4b4b721b60 FIX: Wfx-plugins - don't show file time for files which don't have a time 2025-04-12 13:44:36 +03:00
Alexander Koblov
3e8adb9b93 ADD: Use built-in HEIC decoder in Windows 11 24H2 2025-04-12 12:39:50 +03:00
Alexander Koblov
0f43599f75 FIX: Viewer - remove a border in the full screen view (fixes #2235) 2025-04-11 23:05:11 +03:00
Alexander Koblov
d3f15d726c ADD: FTP - better SSH-handshake error logging 2025-04-10 20:23:36 +03:00
Alexander Koblov
5932fb6658 ADD: Get OneDrive folders from registry 2025-04-10 20:23:35 +03:00
rich2014
47c73f5db7 UPD: MacCloud/DropBox: update install.sh 2025-04-10 23:38:51 +08:00
rich2014
20c7de422d UPD: MacCloud/DropBox step-40: move CloudRootDriver and DropBoxClient to drivers folder 2025-04-10 23:20:49 +08:00
rich2014
265223acdb ADD: MacCloud/DropBox step-39: support ESC and Command+W in Options Dialog 2025-04-10 22:39:35 +08:00
rich2014
6218ba73cf ADD: MacCloud/DropBox step-39: handling for duplicate named Connection 2025-04-10 22:23:49 +08:00
rich2014
3393195b20 UPD: MacCloud/DropBox step-39: split TCloudDriver into TCloudDriverBase and TCloudDriver
avoid TCloudRootDriver from becoming an abstract class
2025-04-10 22:21:55 +08:00
rich2014
59bc178c81 UPD: MacCloud/DropBox step-38: improve exception handling and eliminate duplicate code 2025-04-10 22:18:56 +08:00
rich2014
3faad8190a ADD: MacCloud/DropBox step-37: rename(F2) / create(F7) / delete(F8) Connections 2025-04-10 22:15:20 +08:00
rich2014
860d6e75c2 ADD: MacCloud/DropBox step-36: support logo in Options Dialog 2025-04-10 22:11:30 +08:00
rich2014
42a5d38e1a ADD: MacCloud/DropBox step-35: introduce Extension to replace FsSetDefaultParams 2025-04-10 22:10:10 +08:00
Alexander Koblov
68d1c6e4e1 FIX: Lazarus 4.99 compatibility 2025-04-09 21:59:22 +03:00
Alexander Koblov
db4feb4e0a UPD: Don't use SMB1 under Windows 10+ 2025-04-09 20:02:52 +03:00
rich2014
4fc4944856 UPD: MacCloud/DropBox: improve error handling 2025-04-09 22:26:43 +08:00
rich2014
790b0ce677 ADD: MacCloud/DropBox step-34: save/restore tokens from macOS Key Chains 2025-04-09 20:05:21 +08:00
rich2014
81766500af ADD: MacCloud/DropBox step-33: ICloudDriverObserver for token update 2025-04-09 20:03:37 +08:00
rich2014
ab1cd6e039 ADD: MacCloud/DropBox step-32: Key Chains Utils 2025-04-09 20:01:21 +08:00
rich2014
e04e484f4a ADD: MacCloud/DropBox step-31: load/save drivers/connections to MacCloud.json 2025-04-08 00:34:17 +08:00
rich2014
03f27f9f4f ADD: MacCloud/DropBox step-30: save drivers to MacCloud.json 2025-04-07 23:19:20 +08:00
rich2014
b8c8f04c7d ADD: MacCloud/DropBox step-29: prepare for MacCloud.json 2025-04-07 22:16:58 +08:00
rich2014
36682a19b8 ADD: MacCloud/DropBox step-28: file time for connections 2025-04-07 00:42:05 +08:00
Alexander Koblov
e38813f8d5 FIX: Lazarus 4.99 compatibility 2025-04-06 19:13:13 +03:00
rich2014
086e813e25 UPD: MacCloud/DropBox: improve background of Options Dialog 2025-04-06 18:19:57 +08:00
rich2014
8d01df8ed7 UPD: MacCloud/DropBox: add TLogUtil.logError() 2025-04-06 16:32:13 +08:00
rich2014
ca3dfa26f2 ADD: MacCloud/DropBox step-27: implement DropBox revoke token 2025-04-06 16:28:24 +08:00
rich2014
3090277c21 ADD: MacCloud/DropBox step-26: support unauthorize 2025-04-06 15:47:12 +08:00
rich2014
6ba66fdb58 UPD: MacCloud/DropBox step-25: the opening of the options window 2025-04-06 12:58:51 +08:00
rich2014
ed66c0791f ADD: MacCloud/DropBox step-24: Options Dialog basic functions 2025-04-06 11:56:15 +08:00
rich2014
90604a968f UPD: MacCloud/DropBox step-23: the infrastructure for managing Cloud Connection 2025-04-06 11:52:01 +08:00
rich2014
302c1e8450 ADD: MacCloud/DropBox step-22: add clone to TCloudDriver 2025-04-06 11:48:27 +08:00
rich2014
6e3f51de3e UPD: MacCloud/DropBox: remove generics, cause duplicate binary code 2025-04-06 11:46:41 +08:00
rich2014
87fb5ab444 FIX: MacCloud/DropBox: bugs in FsRemoveDirW() and constructor TCloudConnectionManager.Create() 2025-04-06 11:46:41 +08:00
rich2014
59edd9c5eb UPD: MacCloud/DropBox: change scheme to 'cloud' 2025-04-06 11:46:41 +08:00
rich2014
e6ef5e1e1f ADD: MacCloud/DropBox step-21: full support for FsExecuteFileW() 2025-04-06 11:46:41 +08:00
rich2014
0ba234f544 ADD: MacCloud/DropBox step-20: Extend the path to /Connection/RemovePath for multi-accounts and multi-CloudDrivers 2025-04-06 11:46:41 +08:00
rich2014
33322aade1 ADD: MacCloud/DropBox step-19: options dialog UI 2025-04-06 11:46:41 +08:00
rich2014
9e74a0f0f5 ADD: MacCloud/DropBox step-18: virtual files(connects) in the root directory 2025-04-06 11:46:41 +08:00
rich2014
aae7a16ecb UPD: MacCloud/DropBox: remove the duplicate definition of TQueryItemsDictonary 2025-04-06 11:46:41 +08:00
rich2014
c1c4d7620d UPD: MacCloud/DropBox: improve time conversion 2025-04-06 11:46:41 +08:00
Alexander Koblov
b7b47b21c1 UPD: Use a new toolbar control 2025-04-05 15:02:41 +03:00
Alexander Koblov
b6128fae02 FIX: Viewer - wrong toolbar buttons sequence 2025-04-05 14:54:58 +03:00
rich2014
a2aa63ef07 UPD: MacCloud/DropBox step-17: decoupling Cloud and DropBox to prepare for multi-accounts and multi-CloudDrivers 2025-04-02 22:19:07 +08:00
rich2014
b20a971928 UPD: MacCloud/DropBox step-16: Split the utility code from MacCloudFunc to uMacCloudUtil 2025-04-02 21:57:34 +08:00
rich2014
34a54ef00f FIX: MacCloud/DropBox: fix some issues in DropBoxClient 2025-04-01 20:44:40 +08:00
rich2014
64ac6f77d9 FIX: MacCloud/DropBox: fix http method in TMiniHttpClient 2025-04-01 20:43:47 +08:00
rich2014
a472549ec6 ADD: MacCloud/DropBox step-15: support upload large file > 150MB 2025-04-01 20:42:44 +08:00
rich2014
69ddc0e41b UPD: MacCloud/DropBox step-14: improve TJsonUtil 2025-04-01 20:38:11 +08:00
Alexander Koblov
caf1d3f080 FIX: Enable resource sharing between the OpenGL contexts (needs by plugins) 2025-03-31 20:58:50 +03:00
rich2014
011a32cdb4 ADD: MacCloud/DropBox step-13: add TMiniHttpClient.uploadRange() for upload file > 150MB 2025-03-31 23:17:35 +08:00
rich2014
27cfb71656 ADD: MacCloud/DropBox step-12: add NSFileRangeInputStream for upload file > 150MB 2025-03-31 22:38:04 +08:00
Alexander Koblov
f103e65144 UPD: Icon theme 2025-03-30 23:08:31 +03:00
rich2014
aa7853a4c5 UPD: update instatll/darwin/install.sh for MacCloud/DropBox 2025-03-30 22:32:15 +08:00
rich2014
2f80408d4f UPD: update plugins/build.sh for MacCloud/DropBox 2025-03-30 21:33:15 +08:00
rich2014
afd10c3c40 UPD: MacCloud/DropBox step-11: update official DC DropBox Account data 2025-03-30 21:33:08 +08:00
rich2014
50bad64956 UPD: MacCloud/DropBox: improve exception handling in FsFindFirstW / FsFindNextW / FsFindClose 2025-03-30 21:33:01 +08:00
rich2014
5f8dc675be ADD: MacCloud/DropBox step-10: support multi-threaded access and update token 2025-03-30 21:32:56 +08:00
rich2014
c3af2a6e20 UPD: MacCloud/DropBox step-9: improve token related exception handling mechanism 2025-03-30 21:32:53 +08:00
rich2014
6c84829a7e ADD: MacCloud/DropBox step-8: automatically reauthorize when AccessToken expires 2025-03-30 21:32:49 +08:00
rich2014
fa123d6f2b FIX: MacCloud/DropBox: correctly cancel watching the OAuth2 URL when the user cancels the waiting authorization dialog 2025-03-30 21:32:44 +08:00
rich2014
fc2d65af65 ADD: MacCloud/DropBox step-7: Error and Exception handling mechanisms 2025-03-30 21:32:39 +08:00
rich2014
6c8971858f FIX: MacCloud/DropBox: authorization may not be done on the main thread (since NSAlert needs to run on the main thread) 2025-03-30 21:32:34 +08:00
rich2014
f1b4f2204f FIX: MacCloud/DropBox: potential out-of-bounds issues in TStringUtil.stringToWidechars() 2025-03-30 21:32:29 +08:00
rich2014
d266e7a484 ADD: MacCloud/DropBox step-6: add MacCloud/DropBox plugin to Default 2025-03-30 21:32:25 +08:00
rich2014
ce1131af8b ADD: MacCloud/DropBox step-5: MacCloud plugin 2025-03-30 21:32:21 +08:00
rich2014
b42e2503e7 ADD: MacCloud/DropBox step-4: basic DropBox client 2025-03-30 21:32:16 +08:00
rich2014
f053d334fe ADD: MacCloud/DropBox step-3: basic http client 2025-03-30 21:32:11 +08:00
rich2014
e5ba69a40e ADD: MacCloud/DropBox step-2: basic utils 2025-03-30 21:32:07 +08:00
rich2014
7a974dde4c ADD: MacCloud/DropBox step-1: basic extensions to CocoaAll 2025-03-30 21:32:01 +08:00
Alexander Koblov
e701968cd1 FIX: Viewer - crash with unreadable file 2025-03-30 01:59:54 +03:00
Alexander Koblov
4d1130f775 ADD: Toolbars scalable icons 2025-03-30 00:46:46 +03:00
Alexander Koblov
3a4700e991 FIX: Viewer - wrong toolbar buttons sequence 2025-03-29 01:28:43 +03:00
Alexander Koblov
a57bc9a2a8 ADD: Toolbars scalable icons 2025-03-29 01:24:29 +03:00
Alexander Koblov
4b17c073d1 ADD: GTK3 support 2025-03-28 23:19:00 +03:00
Alexander Koblov
9de6dd5593 ADD: HWND type definition 2025-03-28 23:19:00 +03:00
Alexander Koblov
16a870fcd9 ADD: GTK3 support 2025-03-28 23:19:00 +03:00
Alexander Koblov
92bd7df527 FIX: Crash under GTK3 2025-03-28 23:19:00 +03:00
Alexander Koblov
1049fd9722 UPD: Editor toolbar 2025-03-27 20:54:25 +03:00
Alexander Koblov
3c8ef9d9f2 ADD: Toolbars scalable icons 2025-03-27 00:32:13 +03:00
Alexander Koblov
704f2f2b04 ADD: Register large toolbar icons 2025-03-27 00:03:48 +03:00
Alexander Koblov
d39ea6e021 DEL: Standard files 2025-03-26 21:10:17 +03:00
Alexander Koblov
5ca7cc68c2 UPD: libpcre2 build script 2025-03-26 21:10:17 +03:00
Alexander Koblov
f333a88e0e FIX: Crash at the start with debug build 2025-03-25 19:57:10 +03:00
Alexander Koblov
de1b4d1042 FIX: Crash at the start with debug build 2025-03-25 19:54:40 +03:00
Alexander Koblov
5cedc12d24 FIX: OneDrive sync status icon overlays not showing (fixes #474) 2025-03-24 23:56:25 +03:00
1vanK
650187bcc9
FIX: Shift+Enter when path has a space (#2241) (fixes #1966) 2025-03-24 23:03:50 +03:00
Alexander Koblov
98cc551cf8 UPD: Microsoft Photos bug workaround 2025-03-23 22:53:40 +03:00
Alexander Koblov
656b459b2a UPD: Image32 library 2025-03-23 21:11:06 +03:00
Alexander Koblov
e89064de97 FIX: Build under ARM64 (macOS) 2025-03-22 19:07:18 +03:00
Alexander Koblov
37b0a3ff8b FIX: Find files with long file names under macOS 2025-03-22 18:33:29 +03:00
Alexander Koblov
5f981d0e4e UPD: German language file 2025-03-22 00:20:14 +03:00
Alexander Koblov
48136147e9 ADD: Viewer - display control characters in the DOS encoding (like code page 437) 2025-03-19 21:49:49 +03:00
Alexander Koblov
3bd0a10816 UPD: Unit description 2025-03-19 21:49:49 +03:00
VenusGirl❤
005c84c2d7
UPD: Korean language file (#2227) 2025-03-19 21:43:51 +03:00
Alexander Koblov
f7ba104e48 FIX: Image file associated to Windows Photos opens only when there are no spaces in file name/path (fixes #2188) 2025-03-19 20:30:59 +03:00
Skif-off
97e1b60a00
UPD: Russian language file (#2216) 2025-03-14 12:49:00 +03:00
rich2014
c27ceed26e FIX: memory leaks in iCloudDriverConfigUtil.save(), icloud.json 2025-03-13 14:57:33 +08:00
Alexander Koblov
8fd3f87802 UPD: Forgotten file 2025-03-12 13:04:24 +03:00
Alexander Koblov
ca531db075 FIX: Viewer - disable unavailable menu items 2025-03-12 13:04:07 +03:00
Alexander Koblov
97ed0aff36 UPD: Language files 2025-03-12 12:47:08 +03:00
Alexander Koblov
f513e32f72 FIX: Plugins WFX text woefully out of date (fixes #2127) 2025-03-12 12:42:18 +03:00
Alexander Koblov
33c8b5e56a UPD: Use a more user-friendly plugins descriptions 2025-03-12 12:35:14 +03:00
Alexander Koblov
a2d8afae68 FIX: Changing the extensions for a highlighter and clicking Apply doesn't save them (fixes #2182) 2025-03-12 12:04:21 +03:00
Alexander Koblov
32532a344c FIX: Viewer - disable unavailable menu items 2025-03-12 11:50:42 +03:00
Alexander Koblov
3180cb924c FIX: Viewer - disable unavailable menu items (issue #2212) 2025-03-12 01:05:55 +03:00
Alexander Koblov
2bc4832f21 ADD: Open bookmark files which links to directory (issue #2211) 2025-03-11 18:40:03 +03:00
Alexander Koblov
fd6d5a8085 FIX: GVFS - Overwrite only older files (fixes #2201) 2025-03-09 12:51:31 +03:00
Skif-off
86ccf0da86
UPD: Russian language file (#2206) 2025-03-08 12:49:27 +03:00
Alexander Koblov
1a84836c2e FIX: Wrong content type guess (issue #2195) 2025-03-08 12:41:41 +03:00
rich2014
761075921e UPD: update zh_TW 2025-03-08 10:54:10 +08:00
rich2014
ae6f64172d UPD: update zh_CN 2025-03-08 10:54:06 +08:00
Alexander Koblov
46ee816f8b UPD: German language file 2025-03-08 00:18:25 +03:00
rich2014
87a9ba1190 UPD: optimize trackpad wheel scrolling #2191 2025-03-05 23:26:32 +08:00
Alexander Koblov
3119015cfe FIX: Build under non-macOS 2025-03-04 20:49:38 +03:00
Alexander Koblov
158b022c2d UPD: Language files 2025-03-04 20:47:02 +03:00
Alexander Koblov
979b935cf8 ADD: Show additional info in the Editor status bar (fixes #1796) 2025-03-04 20:46:01 +03:00
rich2014
7f66cd4b13 UPD: in ICompareByName(), if the Name of both files is empty, use FullPath instead 2025-03-05 00:02:06 +08:00
rich2014
8d6f960a67 ADD: open the corresponding folder when double-clicking the App in iCloud Options 2025-03-04 22:30:41 +08:00
rich2014
13893bdd1e ADD: enable iCloud options frame 2025-03-04 22:30:03 +08:00
rich2014
2f7d5f9b43 UPD: optimize the process of loading and saving iCloud.json 2025-03-04 18:05:11 +08:00
rich2014
9e3007bc71 ADD: iCloud Options frame (show list) 2025-03-04 17:02:44 +08:00
rich2014
aa392b45fc ADD: iCloudDriverUtil.createAllApps() 2025-03-04 16:59:38 +08:00
rich2014
9fbaf75cb3 UPD: split common modules from iCloudDriver to iCloudDriveUtil 2025-03-04 08:48:15 +08:00
rich2014
6feaa94ad5 FIX: copy / cut / paste in iCloudDriver 2025-03-02 18:28:45 +08:00
rich2014
d336d6eb73 ADD: Added TFileSourceConsultPhase to accurately distinguish between source and target phases, because Source FileSource may be equal to Target FileSource 2025-03-02 18:18:26 +08:00
rich2014
de5c4b90a7 ADD: support FileSource Relocation Event
only for iCloudDriver currently, it's to keep the selected files in iCloud Driver from being unselected before and after downloading.

background: due to the implementation mechanism of Apple iCloud Driver, the local file name will change before and after the file is downloaded.
2025-03-02 16:53:43 +08:00
rich2014
4aeb2801a3 ADD: add the common Event notification mechanism for FileSource (by improving the original one that is only related to Reload Event) 2025-03-02 07:12:47 +08:00
rich2014
9263696889 FIX: disable renaming on files that cannot be renamed (such as MountPoint in iCloudDriver) 2025-03-02 07:07:51 +08:00
rich2014
c15e209c8b ADD: support Terminal in iCloudDriver 2025-03-01 18:15:01 +08:00
Alexander Koblov
85faf82d4b FIX: Read a special characters from doublecmd.xml (fixes #2176) 2025-02-28 20:15:56 +03:00
Alexander Koblov
39cbab00eb FIX: Copy WSL/Cygwin symbolic links (issue #2171) 2025-02-28 20:00:34 +03:00
Alexander Koblov
67d210711b ADD: Read WSL/Cygwin symbolic link target (issue #2171) 2025-02-28 19:58:18 +03:00
rich2014
2d32109c71 UPD: in the context menu of iCloudDriver, optimize download status with multiple files 2025-02-27 19:50:13 +08:00
rich2014
e139fcb5ee FIX: simplify code and avoid memory leaks 2025-02-27 19:50:13 +08:00
rich2014
562b9f6a21 ADD: automatically generate iCloud.json 2025-02-27 19:50:13 +08:00
Alexander Koblov
c3f34eee6f FIX: Copy symbolic link attributes under Windows (issue #2171) 2025-02-26 21:59:32 +03:00
rich2014
e692f4ae02 ADD: iCloud.json for iCloudDriver configuration 2025-02-26 22:36:39 +08:00
rich2014
c73ca8d67e UPD: make iCloudDriver Configurable 2025-02-26 22:36:39 +08:00
Alexander Koblov
c9d62203f0 UPD: German language file 2025-02-26 00:17:40 +03:00
rich2014
e3dd9f0212 FIX: make TiCloudDriverFileSource stateless 2025-02-24 22:39:56 +08:00
rich2014
7050048a4f FIX: address in TiCloudDriverFileSource.GetFileSource() 2025-02-24 22:29:53 +08:00
rich2014
1647bed358 FIX: repeat prompt @1512763 2025-02-23 21:56:49 +08:00
rich2014
dc58700a62 UPD: update zh_TW 2025-02-23 21:56:48 +08:00
rich2014
f71e7005a3 UPD: update zh_CN 2025-02-23 21:56:48 +08:00
rich2014
492432ecca UPD: i18n for @1512763 2025-02-23 21:56:48 +08:00
rich2014
7b29ac1016 ADD: detect unsupported copy operation and prompt 2025-02-23 21:56:48 +08:00
Alexander Koblov
0c47b49589 FIX: Viewer - wrong text wrapping (fixes #2183) 2025-02-23 14:14:41 +03:00
rich2014
31c3a76a20 ADD: finder tags edit panel i18n 2025-02-23 19:01:07 +08:00
rich2014
d22b9b7205 ADD: support editing finder tag for multiple files in edit panel on macOS 2025-02-23 18:43:50 +08:00
rich2014
2fcad93c54 ADD: support showing finder tag for multiple files in edit panel on macOS 2025-02-23 14:12:21 +08:00
rich2014
1459890d03 ADD: support setting finder tag for multiple files in context menu on macOS 2025-02-22 21:17:16 +08:00
rich2014
320203a892 UPD: extract util functions from uMyDarwin to uDarwinUtil 2025-02-22 21:17:16 +08:00
Alexander Koblov
52ee174822 FIX: Copy relative symbolic links under Windows (issue #2171) 2025-02-22 13:54:36 +03:00
Alexander Koblov
1489df8e00 FIX: Deleting a Favorite can produce a "is not a valid GUID value" (issue #315) 2025-02-22 13:54:36 +03:00
rich2014
4cca685782 UPD: update zh_TW 2025-02-22 11:08:50 +08:00
rich2014
b9afd1aed0 UPD: update zh_CN 2025-02-22 11:02:27 +08:00
rich2014
30fb9859fb UPD: iCloudDriver i18n 2025-02-22 10:57:05 +08:00
rich2014
9e4bb1a0ed ADD: fscrCancel related 2025-02-21 23:28:00 +08:00
rich2014
2cc56c8e9a ADD: add confirmation dialog if user copies undownloaded files from iCloud Driver 2025-02-21 23:27:15 +08:00
rich2014
4271e23fa3 UPD: improve TSeedFileUtil.isSeedFiles() 2025-02-21 23:09:18 +08:00
Alexander Koblov
7d7a729773 FIX: Crash with absolute symbolic links (GVFS) 2025-02-15 13:14:41 +03:00
Alexander Koblov
8134add0e6 ADD: Copy directory time (GVFS) 2025-02-15 12:53:18 +03:00
Alexander Koblov
4c77384257 ADD: Warn about unsaved changes in the file types colors 2025-02-12 00:04:52 +03:00
Alexander Koblov
a5606c0f88 UPD: Optimize file types colors editing interface (issue #1078) 2025-02-11 23:47:43 +03:00
rich2014
6ed1cf6f2a FIX: TFileView.calcFileHashKey() with TMountedFileSource 2025-02-11 21:36:47 +08:00
rich2014
fe1a5bdc02 UPD: add isSeedFile properties to TFileMacOSSpecificProperty 2025-02-11 21:36:47 +08:00
rich2014
1c734ca812 UPD: prepare to add macOS Specific properties to TFileMacOSSpecificProperty 2025-02-11 21:36:47 +08:00
Alexander Koblov
1b1ca89bc1 FIX: Get monospace font under Linux (fixes #2062) 2025-02-10 21:05:10 +03:00
Alexander Koblov
7c80c8ab23 FIX: Wrong statistics when copying to phone (issue #2154) 2025-02-10 20:02:53 +03:00
rich2014
cf00e81423 FIX: add default method in TDefaultFileSourceWatcher #2155 2025-02-10 08:37:36 +08:00
Alexander Koblov
5dcae55b24 UPD: ShowInputMultiSelectListBox function 2025-02-09 18:22:15 +03:00
Alexander Koblov
ddba18df8b ADD: Load system icon with an absolute path 2025-02-09 17:15:17 +03:00
rich2014
81e899136b ADD: support multi thread in TFinderTags 2025-02-09 21:43:03 +08:00
rich2014
5857acf7f7 ADD: support multi thread in TFileSourceManager 2025-02-09 21:43:03 +08:00
rich2014
665ab1eae2 ADD: support multi thread in TiCloudDriverWatcher 2025-02-09 21:43:03 +08:00
rich2014
43a71cc64d ADD: fully support file change monitoring in iCloudDriver 2025-02-09 21:43:03 +08:00
rich2014
e04afa0b3e ADD: fspMounted in TFileSourceProperties 2025-02-09 21:43:03 +08:00
rich2014
176a05ac34 UPD: continue to remove dependency of TFileSystemWatcher in FileView 2025-02-09 21:43:03 +08:00
rich2014
2f11c164d3 UPD: refactor File Watcher, remove dependency of TFileSystemWatcher in FileView 2025-02-09 21:43:03 +08:00
Alexander Koblov
788c934f43 FIX: Restore focus after exit from quick search (issue #2152) 2025-02-09 15:05:28 +03:00
Alexander Koblov
f1d0a2c9d9 FIX: Disable preview in the quick view mode 2025-02-09 12:49:26 +03:00
Alexander Koblov
d3a2c1b0d4 ADD: Load folder system icon under Linux when an absolute icon file name used (fixes #2061) 2025-02-08 14:50:22 +03:00
Alexander Koblov
2c335a3e53 FIX: Calculator dialog colors 2025-02-07 23:41:02 +03:00
Alexander Koblov
17e12cb48b ADD: Gtk3 - drag & drop support 2025-02-07 20:32:35 +03:00
rich2014
766e2fe93c FIX: should not get Finder Tag for '..' 2025-02-07 23:08:24 +08:00
rich2014
039ca6e1c0 FIX: Finder Color Tag in FileView 2025-02-05 21:36:32 +08:00
rich2014
9084333d35 ADD: support download directory in iCloudDriver 2025-02-04 11:03:26 +08:00
rich2014
79627b1c8b UPD: refactor TSeedFileUtil in iCloudDriver 2025-02-04 10:06:49 +08:00
rich2014
5aaa6bc54a UPD: extract TSeedFileUtil from TiCloudDriverFileSource 2025-02-04 09:58:29 +08:00
rich2014
2385f18866 UPD: improve detection of seed file in iCloudDriver 2 2025-02-04 00:02:05 +08:00
rich2014
a2e5b0eb2b UPD: improve detection of seed file in iCloudDriver 2025-02-03 22:58:23 +08:00
Skif-off
e8a19a4569
UPD: Russian language file (#2142) 2025-02-02 18:08:22 +03:00
Alexander Koblov
62d6fb32c8 UPD: German language file 2025-02-02 14:51:21 +03:00
Alexander Koblov
8c1c69a4af UPD: libssh2 build script 2025-02-02 14:51:21 +03:00
Alexander Koblov
30e0176b75 UPD: Zip - refactoring 2025-02-02 14:51:21 +03:00
Alexander Koblov
5a5b826bd0 ADD: Get icon theme name under GTK 2025-02-02 13:55:46 +03:00
Alexander Koblov
11f8742da2 FIX: Compatibility with Lazarus 4.99 2025-01-31 21:44:58 +03:00
rich2014
8f9205e017 ADD: support create(New) File in TMountedFileSource 2025-01-31 17:47:45 +08:00
rich2014
e11490874b ADD: support create Directory in TMountedFileSource 2025-01-31 17:25:57 +08:00
rich2014
cf490dbd34 FIX: macOS 11- compatibility, remove NSImage.imageWithSystemSymbolName_accessibilityDescription() 2025-01-31 15:32:08 +08:00
Alexander Koblov
054cebe599 FIX: Zip - Invalid pointer operation 2025-01-30 22:06:28 +03:00
Alexander Koblov
dcde783795 UPD: Zip - speed up .zip extraction 2025-01-30 21:51:27 +03:00
Alexander Koblov
255ecc7bda DEL: Obsolete units 2025-01-30 21:03:25 +03:00
rich2014
1182709542 FIX: iCloudDriverFileSource Main Icon Path 2025-01-31 01:02:36 +08:00
rich2014
8648f21105 FIX: Relative Target Path with fsoCopy/fsoMove in TMountedFileSource 2025-01-31 00:23:16 +08:00
rich2014
8c47809d2c ADD: support fsoMove from TFileSystemFileSource to TMountedFileSource 2025-01-30 22:31:32 +08:00
rich2014
282fb12b7a ADD: icon for iCloud Driver (in Vfs List) 2025-01-30 17:59:28 +08:00
rich2014
319c47f67d UPD/fsoCopy: set targetPath for mountPoint in TMountedFileSource for TWcxArchiveFileSource 2025-01-30 11:30:03 +08:00
rich2014
e7fbe1dd56 FIX: TFile with empty file in ArchiveFileSource related 2025-01-30 11:29:59 +08:00
rich2014
40f5251161 ADD: support fsoCopy from TMountedFileSource to TWcxArchiveFileSource 2025-01-30 11:29:46 +08:00
rich2014
bf477c59d6 UPD: getMountPointFromPath() in TMountedFileSource 2025-01-30 11:29:36 +08:00
rich2014
ece67c1b0a UPD: remove dependency of iCloudDriver in FileView 2025-01-30 11:29:32 +08:00
rich2014
5f40088c3f ADD: add iCloudDriver as VfsModule 2025-01-30 11:29:29 +08:00
rich2014
1db3bb54e4 UPD: zh_TW language file 2025-01-28 23:16:48 +08:00
rich2014
64b655d292 UPD: zh_CN language file 2025-01-28 23:16:44 +08:00
rich2014
64cd59ecef UPD: i18n for iCloud Driver 2025-01-28 23:16:34 +08:00
Alexander Koblov
4fe27b1287 FIX: Zip - Use new Deflate64 decoder (fixes #2115) 2025-01-27 23:26:32 +03:00
rich2014
490d850cd1 FIX: remove iCloudDriver's dependency on CurrentWorkingDirectory 2025-01-27 23:46:00 +08:00
rich2014
0894245130 FIX: compilation on not macOS 2025-01-27 22:55:47 +08:00
rich2014
7b21584aa5 FIX: working directory in TiCloudDriverUIHandler.draw() 2025-01-27 17:49:25 +08:00
rich2014
c9c61eeba3 ADD: support loading iCloud Drive on restart 2025-01-27 17:37:43 +08:00
rich2014
5c44a8c628 FIX: calling ApplyRenameMask in ugiofilesourceutil 2025-01-27 16:54:05 +08:00
rich2014
19e82d61ce UPD: refactor GetFileName() from TiCloudFileSource to TMountedFileSource 2025-01-27 15:38:42 +08:00
rich2014
345ea783dc ADD: set CreationTimeProperty in FillFromStat() of uFileSystemSource 2025-01-27 14:24:02 +08:00
rich2014
bd01ba90fd ADD: apply iCloud Driver in Modern Form ToolBar 2025-01-27 14:03:26 +08:00
rich2014
3d8c2a7192 ADD: add used apps to iCloud Driver 2025-01-27 14:01:57 +08:00
rich2014
5e4d553cb4 ADD: support clicking the iCloud download Icon on the seed file to Download in BriefView 2025-01-27 13:35:39 +08:00
rich2014
7d5a6bdb56 FIX: the iCloud icon is not displayed at non-first columns in BriefView 2025-01-27 12:19:09 +08:00
rich2014
3f9c6229e9 ADD: draw iCloud related Icons in BriefView 2025-01-27 11:44:43 +08:00
rich2014
ecc7ec746b FIX: clicking on the Header of FileView in iCloud Drivers 2025-01-27 11:04:33 +08:00
rich2014
ff8c8e908c ADD: add check whether MountPoint exists 2025-01-27 11:02:31 +08:00
rich2014
d0d70e5fa8 ADD: adjust the TFile corresponding to MountPoint in TMountedListOperation 2025-01-27 10:27:05 +08:00
rich2014
2958b138f9 ADD: apply TFileSource.GetFileName() 2025-01-27 10:27:05 +08:00
rich2014
ca378ab948 ADD: abstract TFile.Name into FileSource. different FileSources can process FileName differently. 2025-01-27 10:27:05 +08:00
Alexander Koblov
5b60341ad7 ADD: Zip - New Deflate64 decoder (issue #2115) 2025-01-26 19:10:51 +03:00
Alexander Koblov
4913c46b61 FIX: Build under GTK2 2025-01-23 20:20:37 +03:00
VenusGirl❤
4b5988ae34
UPD: Korean language file (#2104) 2025-01-21 08:33:21 +03:00
Alexander Koblov
6dd5b5a1d6 UPD: Portugal translation (issue #2099) 2025-01-19 22:30:54 +03:00
Alexander Koblov
af46d2f076 UPD: Slovak language (fixes #2092) 2025-01-19 22:30:29 +03:00
Alexander Koblov
e682a876de ADD: SevenZip - check library version 2025-01-19 16:55:43 +03:00
Alexander Koblov
a0eaa37f04 FIX: Copy and paste files with a newline character (fixes #2085) 2025-01-18 15:19:00 +03:00
Alexander Koblov
7475060655 UPD: Try to create .dmg package 5 times 2025-01-18 12:55:19 +03:00
Alexander Koblov
afa8faf711 ADD: Editor toolbar scalable icons 2025-01-17 23:01:37 +03:00
Alexander Koblov
37c22c3ef4 UPD: Use close_range function (issue #2004) 2025-01-17 20:02:35 +03:00
Alexander Koblov
05f3ab8446 ADD: CloseRange function 2025-01-17 18:34:01 +03:00
Alexander Koblov
e853cdadd9 FIX: Viewer - don't show empty cells in the thumbnails view 2025-01-16 17:47:31 +03:00
Alexander Koblov
884720a573 FIX: Viewer - zoom image by mouse wheel 2025-01-15 18:11:38 +03:00
Alexander Koblov
d2b624be18 FIX: Limit max file descriptor number (fixes #2004) 2025-01-14 21:40:45 +03:00
Alexander Koblov
5fbaae7732 FIX: Wrong icon size 2025-01-13 20:01:45 +03:00
Alexander Koblov
a15f560ea3 FIX: Invalid SVG scaling (fixes #2068) 2025-01-13 19:55:59 +03:00
Alexander Koblov
38a5f529d9 FIX: Viewer - preview thumbnail vertical space (issue #2070) 2025-01-12 16:10:08 +03:00
Alexander Koblov
e1fbd5c089 FIX: Hitting Tab key when Quick Preview open applies focus both file panes (fixes #2079) 2025-01-12 14:42:33 +03:00
Alexander Koblov
8914e6cd13 ADD: Allow to use archive icon from built-in theme 2025-01-12 14:25:13 +03:00
Alexander Koblov
b267d10937 FIX: Initialize uSystem before Interfaces 2025-01-12 14:00:33 +03:00
Alexander Koblov
7a4ac40739 UPD: Initialize OnGetApplicationName early 2025-01-12 13:54:09 +03:00
Alexander Koblov
4fc93d275c FIX: Unable to make a privileged operation if app's executable has non-default file name in linux (fixes #2071) 2025-01-12 13:43:04 +03:00
Alexander Koblov
671df91744 ADD: Prepare to disable a GTK2 workaround 2025-01-11 15:18:31 +03:00
Alexander Koblov
2a2862c0f1 FIX: Crash under GTK2 (fixes #2069) 2025-01-11 15:14:27 +03:00
Alexander Koblov
026e9755d8 UPD: GetSystemFolderIcon function under Linux 2025-01-11 14:56:44 +03:00
Alexander Koblov
85d1985b9f ADD: JSON highlighter 2025-01-08 19:33:25 +03:00
Alexander
3cff308d7b
ADD: QML syntax highlighter (#2040) 2025-01-08 18:45:15 +03:00
Alexander Koblov
0c65eea9dd
UPD: Try to create .dmg package 5 times 2025-01-08 16:31:36 +03:00
Alexander Koblov
0135b6d4e8 FIX: Load folder system icon under Linux (fixes #2061) 2025-01-08 13:38:17 +03:00
Alexander Koblov
cad083f6e8 FIX: Read fonts settings from xml-config (fixes #2052) 2025-01-07 16:01:01 +03:00
Skif-off
fdcc704ced
UPD: Russian language file (#2032) 2025-01-05 22:12:20 +03:00
Alexander Koblov
a79429eedc FIX: Hotkey list background is not cleared (fixes #2044) 2025-01-05 21:53:26 +03:00
Alexander Koblov
17fb9dcb9d FIX: The height of color ComboBox is too small (fixes #2043) 2025-01-05 21:21:08 +03:00
rich2014
18d4448ed2 ADD: support clicking the iCloud download Icon on the seed file to Download (like Finder) 2025-01-03 01:15:45 +08:00
rich2014
d597ee49b6 ADD: implement CurrentWorkingDirectory in TMountedFileSource 2025-01-01 02:09:13 +08:00
rich2014
76f1bc9d07 ADD: draw overlay APP icon in iCloud Driver 2025-01-01 02:09:13 +08:00
rich2014
dc3a68d907 ADD: filesource in TFileSourceUIParams 2025-01-01 02:09:13 +08:00
rich2014
69e928ea09 ADD: add IconRect into drawing params in uColumnsFileView.TDrawGridEx.DrawCell() 2025-01-01 02:09:13 +08:00
Alexander Koblov
4f3ec507f6 FIX: Copy via a temporary directory 2024-12-31 15:25:57 +03:00
Alexander Koblov
b2a3fa2686 FIX: Extract from archive (fixes #2039) 2024-12-31 15:04:51 +03:00
rich2014
112ffaa593 UPD: refactor TFileSourceUIHandler related 2024-12-30 00:15:34 +08:00
rich2014
3340404a90 UPD: display 'iCloud Download Icon' and 'Tag Color Icon' for seed file in sequence in iCloud Driver 2024-12-29 23:44:43 +08:00
rich2014
f2ed08ba7a ADD: display iCloud Download Icon for seed file in iCloud Driver 2024-12-29 22:14:00 +08:00
rich2014
ace08aa36d ADD: UI infrastructure related to FileSource 2024-12-29 22:13:59 +08:00
Alexander
a769421642
ADD: Kotlin syntax highlighter (#2034) 2024-12-29 16:04:24 +03:00
Alexander Koblov
bbf030a6aa FIX: WinToUnixFileAttr function 2024-12-29 14:04:56 +03:00
Alexander Koblov
87f8ba928f FIX: Crash on startup under Windows (fixes #2033) 2024-12-29 13:53:35 +03:00
Alexander Koblov
6ad950c95e UPD: Everything plugin 2024-12-29 13:28:59 +03:00
rich2014
30d8b77eda FIX: the issue when Copying / Moving files without confirm dialog #2035 2024-12-29 10:20:13 +08:00
Alexander Koblov
c7cf06829c FIX: WCX - restore directory attributes after CloseArchive 2024-12-28 17:33:34 +03:00
VenusGirl❤
a233c69f15
UPD: Korean language file (#2031) 2024-12-28 16:16:30 +03:00
rich2014
8b70e6bb1b FIX: the issue of calling TFileSystemWatcher.RemoveWatch() @ 3ecba99 2024-12-28 20:42:08 +08:00
rich2014
3ecba99193 ADD: enable watching real path in TFileView 2024-12-28 20:36:12 +08:00
rich2014
b57192405f ADD: support File Watch in TMountedFileSource (and iCloud Driver) 2024-12-28 20:32:37 +08:00
rich2014
c586f5f5ba ADD: realPath / virtualPath in TFileSystemFileSource, for FileSystem Watch 2024-12-28 20:30:47 +08:00
rich2014
47fa44ef6b UPD: show '..' instead of DisplayName with '..' in iCloudDriver 2024-12-27 21:30:28 +08:00
rich2014
67c9fc946b ADD: add Download Now / Remove Download into contextMenu in iCloudDriver 2024-12-27 21:23:35 +08:00
rich2014
68112b7fdd FIX: compilation on windows 2024-12-27 17:32:57 +08:00
rich2014
e900156fb1 ADD: GetDisplayFileName() in iCloudDriver 2024-12-26 22:43:23 +08:00
rich2014
86caadb164 ADD: GetDisplayName to FileSource (display file name depends on different FileSources) 2024-12-26 22:40:41 +08:00
rich2014
b0ad1a0c51 ADD: in iCloudDriver, files ending with .icloud are undownloaded cloud files, not non-displayed system files. 2024-12-26 19:27:45 +08:00
rich2014
27d3a8eee1 UPD: refactor IsSysFile/IsHidden from TFile to FileSource (it depends on different FileSources) 2024-12-26 19:11:47 +08:00
rich2014
eca52c6459 UPD: better support for target path begin with '..' in F5 / F6 2024-12-25 21:04:07 +08:00
rich2014
7c9c1dc94b UPD: refactor method name in FileSourceManager and FileSourceProcessor 2024-12-24 20:59:58 +08:00
rich2014
de6fa6ce31 ADD: support iCloudDriver to correctly get file at root 2024-12-24 00:12:45 +08:00
rich2014
3540c79f99 ADD: TMountedFileSource and iCloudDrivers support jumping to parent path 2024-12-24 00:10:30 +08:00
rich2014
19b046aefe ADD: decompose FileSourceProcessor into two stages 2024-12-23 23:48:25 +08:00
Ihar Areshchankau
7491784318
ADD: Built-in editor menu item "Edit - Time/Date". (#2016) 2024-12-23 09:09:13 +03:00
Alexander Koblov
4879122cdc
FIX: Copy files (fixes #2022) 2024-12-23 09:08:27 +03:00
rich2014
c0629daf08 FIX: fsoCopy in Archive Files 2024-12-22 17:32:20 +08:00
rich2014
cbedb26d4f UPD: refactor TMountedFileSource to inherit TFileSystemFileSource base on FileSourceProcessor 2024-12-21 20:53:54 +08:00
rich2014
ae3d2abeaf UPD: apply FileSourceManager in TfrmMain.CopyFiles(), support fsoCopy for TMountedFileSource 2024-12-21 16:56:27 +08:00
rich2014
b8a101a71c UPD: add fsoCopy logic to TDefaultFileSourceProcessor/TFileSystemFileSourceProcessor/TMountedFileSourceProcessor 2024-12-21 16:56:27 +08:00
rich2014
d578945573 UPD: refactor FileSource Processor to support more operations 2024-12-21 16:56:27 +08:00
Alexander Koblov
0b3b2deb89 ADD: Display GTK3 version 2024-12-19 21:31:32 +03:00
Alexander Koblov
63cd93783a DEL: Invalid version information 2024-12-19 21:07:18 +03:00
rich2014
b031cf6133 FIX: the issue of moving file to other path #2017 2024-12-19 21:41:49 +08:00
Alexander Koblov
d5b2c51a67 FIX: Viewer - problem with RegEx search, it cannot find 'qt' case-insensitive (fixes #2012) 2024-12-16 20:14:14 +03:00
Alexander Koblov
530aafdc2d FIX: Extra semicolon after "then" 2024-12-15 00:17:02 +03:00
Alexander Koblov
f0f2b02c53 FIX: Quick view panel crash (fixes #2011) 2024-12-14 16:18:50 +03:00
Alexander Koblov
01a66177ec FIX: Free Pascal 3.3.1 compatibility 2024-12-08 22:32:00 +03:00
j2969719
5b04565930
UPD: Use -sfx switch for rar (#1996) 2024-12-08 19:55:11 +03:00
Alexander Koblov
561e10ab32 UPD: Language files 2024-12-08 13:12:52 +03:00
Alexander Koblov
537ffde16d UPD: Korean language file 2024-12-08 13:06:42 +03:00
Alexander Koblov
ebed22101e FIX: Use UTF8StringReplace 2024-12-08 12:26:00 +03:00
Alexander Koblov
eb2bf85573 FIX: Multi-line pattern search option state 2024-12-08 12:06:37 +03:00
VenusGirl❤
beb512835e
UPD: Korean language files (#1993) 2024-11-30 22:11:15 +03:00
Alexander Koblov
d6d54dfb93 ADD: Toolbar - line break separator style 2024-11-30 21:32:01 +03:00
rich2014
3df9f5260c ADD: refactor FileSource - step 4: apply FileSourceManager in fMain, support fsoMove for TMountedFileSource 2024-12-01 00:19:50 +08:00
rich2014
0c10a9c033 ADD: refactor FileSource - step 4: support fsoMove logic for TMountedFileSource 2024-12-01 00:16:47 +08:00
rich2014
7d664ad53c ADD: refactor FileSource - step 3: move fsoMove logic into TSearchResultFileSourceProcessor (from fMain) 2024-12-01 00:12:53 +08:00
rich2014
7fcceac697 ADD: refactor FileSource - step 2: move fsoMove logic into TDefaultFileSourceProcessor (from fMain) 2024-12-01 00:11:14 +08:00
rich2014
52a3869fcb ADD: refactor FileSource - step 1: add FileSourceManager/FileSourceProcessor infrastructure 2024-12-01 00:08:22 +08:00
Alexander Koblov
1c09afa958 ADD: Try to create .dmg package multiple times 2024-11-30 14:57:50 +03:00
Alexander Koblov
a899cf77a9 UPD: Release workflow 2024-11-30 14:56:09 +03:00
Alexander Koblov
dbfd5abb79 UPD: Sound notifications - disable by default 2024-11-30 00:13:50 +03:00
Alexander Koblov
01420e301e DEL: Unused files 2024-11-29 21:02:49 +03:00
Alexander Koblov
3eeb0aeaa0 DEL: Unused unit 2024-11-29 21:02:49 +03:00
Alexander Koblov
8f0d4a4907 FIX: Create archive from another archive content 2024-11-29 20:20:51 +03:00
Alexander Koblov
db7dfa19fb FIX: Don't check a disk free space for file systems which don't have a disk size (issue #753) 2024-11-27 23:41:20 +03:00
Alexander Koblov
1dfd10e789 ADD: Try to create .dmg package multiple times 2024-11-27 21:44:24 +03:00
Alexander Koblov
d1d437c9cc FIX: Load search template with content plugins 2024-11-26 20:41:43 +03:00
Alexander Koblov
8b8dff2137 FIX: SevenZip - crash on exit 2024-11-26 00:02:44 +03:00
rich2014
118ea526d4 ADD: support fsoDelete in TMountedFileSource 2024-11-25 22:19:41 +08:00
Alexander Koblov
45402ba3d1 UPD: PackInfoDlg - file size formatting 2024-11-24 23:15:16 +03:00
Alexander Koblov
9ee1109693 UPD: Use CompareDateTime when compare DateTime fields 2024-11-24 22:50:31 +03:00
Alexander Koblov
863cebc19a FIX: Load DateTime from search template 2024-11-24 22:30:43 +03:00
Alexander Koblov
e69ffe017d FIX: Crash on search template loading 2024-11-24 21:39:38 +03:00
rich2014
fabb04cd75 ADD: support fsoCopy in TMountedFileSource 2024-11-24 21:18:01 +08:00
rich2014
df3652d707 ADD: support fsoCopyIn in TMountedFileSource 2024-11-24 21:09:59 +08:00
rich2014
e6e0e083fa UPD: refactor getRealPath() to TMountedFileSource 2024-11-24 21:07:31 +08:00
Alexander Koblov
6ec5f573b9 ADD: RPM - dependencies information 2024-11-24 14:37:13 +03:00
j2969719
2cacca2c3a
UPD: WDX search user interface (#1839) 2024-11-24 13:09:50 +03:00
Alexander Koblov
23252a36f9 UPD: Disable modification of temporary archives 2024-11-23 23:36:53 +03:00
Alexander Koblov
5405d59451 UPD: Zip - create TAR arcives in the GNU format by default 2024-11-23 16:20:05 +03:00
rich2014
eac96f8c71 FIX: standardize the path in getMacOSDisplayNameFromPath() 2024-11-23 19:24:12 +08:00
rich2014
f046c9f085 ADD: iCloud Driver basic functions 2024-11-19 23:17:26 +08:00
rich2014
17eeef8253 ADD: iCloud Driver FileSource Infrastructure base on Mounted FileSource 2024-11-19 22:51:38 +08:00
rich2014
dd1e211985 ADD: Mounted FileSource Infrastructure 2024-11-19 22:46:54 +08:00
Alexander Koblov
5736695059 ADD: SevenZip - language files 2024-11-18 20:12:02 +03:00
Alexander Koblov
27e6888b2c ADD: SevenZip - translate resource strings 2024-11-17 23:57:15 +03:00
Alexander Koblov
16756b6362 FIX: SevenZip - configuration dialog TAB order 2024-11-17 21:37:54 +03:00
Alexander Koblov
38abc6ffc4 UPD: SevenZip - move initialization to ExtensionInitialize procedure 2024-11-17 21:31:29 +03:00
Alexander Koblov
566d2397bf ADD: SevenZip - new archive formats (v15.14) 2024-11-17 21:10:52 +03:00
Alexander Koblov
f827859854 FIX: SevenZip - extract empty files (issue #1672) 2024-11-17 18:20:53 +03:00
Alexander Koblov
1521d9dfda FIX: SevenZip - memory leak 2024-11-17 18:19:05 +03:00
Alexander Koblov
e5f21889fe ADD: SevenZip - new archive formats (v15.14) 2024-11-17 17:57:05 +03:00
Alexander Koblov
ef6d192b0f ADD: SevenZip - Unix support 2024-11-17 16:45:10 +03:00
Alexander Koblov
59517f8caa UPD: SevenZip - prepare Unix support (step 8) 2024-11-17 16:18:55 +03:00
Alexander Koblov
2c7934f31e FIX: DialogAPI - show dialog from a non-main thread 2024-11-16 14:56:27 +03:00
Alexander Koblov
b75946dc55 UPD: Publish sysconf function 2024-11-16 14:52:04 +03:00
Alexander Koblov
eb00ca2cf5 UPD: SevenZip - prepare Unix support (step 7) 2024-11-12 20:00:51 +03:00
Alexander Koblov
b9e5f1a772 UPD: SyncDirs - file size formatting 2024-11-12 19:49:09 +03:00
Skif-off
85034e987f
UPD: Russian language file (#1969) 2024-11-11 09:24:19 +03:00
VenusGirl❤
e2b68b6e53
UPD: Korean language file doublecmd.ko.po (#1965) 2024-11-10 22:24:10 +03:00
Alexander Koblov
1845694471 FIX: Snapshots uploading when a target files don't exists 2024-11-10 22:21:15 +03:00
Alexander Koblov
5c6b46f892 UPD: SevenZip - prepare Unix support (step 6) 2024-11-10 19:44:46 +03:00
Alexander Koblov
86b19c2b10 UPD: SevenZip - prepare Unix support 2024-11-10 18:28:30 +03:00
Alexander Koblov
f2b3345653 UPD: SevenZip - prepare Unix support 2024-11-10 15:55:45 +03:00
Alexander Koblov
9066702bc4 UPD: SevenZip - prepare Unix support 2024-11-10 13:33:05 +03:00
Alexander Koblov
057eb0ac96 FIX: SevenZip - get directory attributes 2024-11-10 13:29:14 +03:00
Alexander Koblov
503584708b UPD: CheckPhotosVersion - optimization 2024-11-10 11:56:25 +03:00
Alexander Koblov
defc205605 FIX: Create *.dmg under macOS 13+ 2024-11-09 16:29:33 +03:00
Alexander Koblov
4c8aa72a3c ADD: Open images in the Microsoft Photos application starting with version 2024.11050.3002.0 and above 2024-11-09 14:53:11 +03:00
j2969719
f11392854a
UPD: Dont show maximize button in filecopy dialogs (#1959) 2024-11-08 22:24:30 +03:00
Alexander Koblov
8996c1bc15 UPD: Disable Samba plugin 2024-11-08 21:19:44 +03:00
Alexander Koblov
e1733465be FIX: NFS - ignore fmShareDenyWrite (issue #1964) 2024-11-08 21:02:40 +03:00
Alexander Koblov
4e1ead1789 FIX: Don't show a progress for operations with ShowProgress:= False 2024-11-08 20:55:29 +03:00
Alexander Koblov
9ec8f9d483 ADD: Viewer - calculate a folder size 2024-11-06 21:25:43 +03:00
j2969719
fd70dbe29a
ADD: MultiArc - check exitstatus on list parsing (#1936) 2024-11-04 22:08:15 +03:00
Alexander Koblov
edb8bab9f4 UPD: Snapshots workflow 2024-11-04 21:29:53 +03:00
Alexander Koblov
36378feaa6 ADD: SevenZip - long file name support 2024-11-04 21:27:21 +03:00
Alexander Koblov
51161fb569 FIX: SevenZip - get plugin path 2024-11-04 21:25:03 +03:00
Alexander Koblov
e86a46ae17 UPD: Release workflow 2024-11-04 21:00:29 +03:00
Alexander Koblov
9d35e96060 UPD: SevenZip - prepare Unix support 2024-11-04 20:54:20 +03:00
Alexander Koblov
77e3fc8445 ADD: SevenZip - long file name support (issue #1672) 2024-11-04 20:34:44 +03:00
Alexander Koblov
275d06df1b UPD: German language files 2024-11-03 23:44:51 +03:00
Alexander Koblov
a60bd9b79d FIX: Memory leak 2024-11-03 23:29:08 +03:00
rich2014
d498e63c20 FIX: leaks in MacPreview 2024-11-01 21:34:00 +08:00
rich2014
c357c055ea UDP: zh_TW language file 2024-11-01 19:05:34 +08:00
rich2014
2073688c09 UDP: zh_CN language file 2024-11-01 19:05:30 +08:00
rich2014
3f86f6d14e UPD: i18n for rsMenuMacOSGrantPermissionToSupportFinderTags 2024-11-01 19:05:26 +08:00
rich2014
51de0fb1c2 ADD: if Finder Tags access permission is missing, the Colored Tags Menu Item in the context menu changes to prompt for authorization on macOS
on macOS 15, APP needs authorization to access Finder Tags
2024-11-01 19:05:22 +08:00
Alexander Koblov
8ae7b5ca3a ADD: SevenZip - self-extract module 2024-10-31 23:33:43 +03:00
rich2014
d28cd151f6 UPD: support dynamic search menu(sidebar finder tags) in Modern Form Style Tool Bar 2024-10-31 21:40:21 +08:00
Alexander Koblov
7e347cffcd FIX: Viewer - code mode and a byte order mark 2024-10-29 22:18:03 +03:00
Alexander Koblov
5951ace48d FIX: FTP - Build under Haiku 2024-10-28 23:37:09 +03:00
Alexander Koblov
600edcc021 FIX: Create symbolic link - forward error code (Windows) 2024-10-28 21:40:16 +03:00
Alexander Koblov
dd7128a35f ADD: Create symbolic link error - skip all button 2024-10-28 21:07:26 +03:00
j2969719
ab42674559
ADD: MultiArc - cleaning chars in size string w/o additional helpers (#1883) 2024-10-28 09:08:53 +03:00
Alexander Koblov
df4164b626 ADD: FTP - Print address resolving status 2024-10-27 18:30:51 +03:00
Alexander Koblov
2aa9fe2f5a FIX: FTP - ResolveName under macOS (issue #1604) 2024-10-27 18:30:51 +03:00
rich2014
47cffccc5e UPD: Finder Tags are only etrieved once when loading the file list, avoiding loading it every time drawCell() is called 2024-10-27 19:46:18 +08:00
rich2014
85510ee9b6 UPD: reimplement drawTagsAsDecoration() with fpMacOSFinderTag 2024-10-27 19:35:35 +08:00
rich2014
e960d880e3 ADD: fpMacOSFinderTag in TFilePropertyType 2024-10-27 19:33:37 +08:00
Alexander Koblov
3b22b4b5c6 UPD: Language files 2024-10-27 14:13:13 +03:00
Alexander Koblov
6b46a2f4cd FIX: Main menu - "Network" and "Favorites" do not have an underlined letter (fixes #1841) 2024-10-27 14:13:13 +03:00
j2969719
9d0bdc0224
UPD: WCX - disable options that were not reported in plugin caps (#1945) 2024-10-27 13:35:47 +03:00
Alexander Koblov
0b35d32a7a FIX: DC does not close "Options" on pressing ESC after you selected "Tooltips" section (fixes #1929) 2024-10-27 13:30:34 +03:00
Alexander Koblov
1b72f53617 UPD: Network file source - remove a standard port from address 2024-10-27 13:21:51 +03:00
Alexander Koblov
d9887075e2 ADD: UnixFileTimeToFileTime function 2024-10-26 19:21:06 +03:00
Alexander Koblov
dc3fd9c5ab FIX: GLib warning 2024-10-26 19:03:19 +03:00
j2969719
a7093dbd96
UPD: MultiArc - If day or month not set, make mtime invalid (#1863) 2024-10-26 15:14:58 +03:00
rich2014
69663f87a0 UPD: zh_CN language file 2024-10-26 19:36:18 +08:00
Alexander Koblov
e43bfc3c57 UPD: German language file 2024-10-26 14:30:21 +03:00
Alexander Koblov
8e7dcd1477 FIX: Crash on viewing directory symlink on Linux (fixes #1942) 2024-10-26 13:58:22 +03:00
Alexander Koblov
1e1a01ef2a UPD: Network file source - don't display an invalid file size and time 2024-10-26 13:50:26 +03:00
Alexander Koblov
f43748ee0e FIX: Memory leak 2024-10-26 13:48:26 +03:00
Alexander Koblov
ebeafd8089 FIX: Network file source - use a pretty names 2024-10-26 01:01:02 +03:00
rich2014
b8ec3221fd UPD: improve the way that 'Go' menu icons are setup to be compatible with macOS 14+ 2024-10-25 22:14:08 +08:00
rich2014
6396d2e625 UPD: zh_TW language file 2024-10-24 22:56:15 +08:00
rich2014
9ed0246608 UPD: zh_CN language file 2024-10-24 22:48:50 +08:00
rich2014
51d5596f24 UPD: i18n for 'Search for combined tags' 2024-10-24 22:42:21 +08:00
rich2014
50c505da51 FIX: the issue when no tag selected in 'Search for combined finder tags' on macOS 2024-10-24 22:40:41 +08:00
rich2014
cee9297f07 FIX: memory leaks related to Finder Tags Popover on macOS 2024-10-24 21:06:54 +08:00
rich2014
f56c649302 ADD: search for combined finder tags 2024-10-24 21:06:54 +08:00
Alexander Koblov
12adaeca8a ADD: Simple network file source (via GIO) 2024-10-23 20:19:24 +03:00
rich2014
c199a7d36e UPD: include tag name in search result tab name on macOS 2024-10-22 22:37:56 +08:00
rich2014
fbb7f756e0 ADD: color round in Modern Form Style ToolBar - Search Menu on macOS 2024-10-22 21:02:35 +08:00
j2969719
b86380aaa5
UPD: Always suggest tar option by default if multiple files selected; suggest separate archives option if single file selected to preserve file extension (#1892) 2024-10-22 09:00:35 +03:00
Alexander Koblov
ddcfc127f0
FIX: Compiling 2024-10-22 08:55:27 +03:00
Skif-off
4adfa52f83
UPD: More correct sorting of the "Path" and "Link to" fields. (#1884) 2024-10-22 08:41:04 +03:00
j2969719
d616b527db
FIX: MultiArc - crash on discard click (#1934) 2024-10-22 08:37:37 +03:00
Alexander Koblov
0544f3b046 FIX: Options visibility 2024-10-21 20:46:21 +03:00
Alexander Koblov
5e40d547ea UPD: Language files 2024-10-21 20:01:10 +03:00
Alexander Koblov
60e6ddd2c6 ADD: Create separate checksum file for each directory 2024-10-21 19:55:20 +03:00
rich2014
b3625ffa47 ADD: support Finder Tag for macOS 14+ 2024-10-20 19:10:14 +08:00
rich2014
904e910e8b FIX: ContextMenu crash if the finder tag name is not found 2024-10-20 16:16:46 +08:00
Alexander Koblov
093d191417 UPD: Greek language file 2024-10-19 13:57:06 +03:00
VenusGirl❤
8ed19f0763
UPD: Korean language file doublecmd.ko.po (#1920) 2024-10-19 13:55:02 +03:00
Alexander Koblov
14abe92c63 FIX: Background context menu font (fixes #1917) 2024-10-17 21:14:47 +03:00
rich2014
aa41a1d75c ADD: support searching by Finder Tag Name Menu in Modern Form Style ToolBar on macOS 2024-10-18 00:20:16 +08:00
rich2014
10393c3bfe ADD: support base function of searching by finder tag name 2024-10-18 00:18:35 +08:00
rich2014
5952e6e4a5 ADD: support sidebar property in Finder Tag Model 2024-10-18 00:11:08 +08:00
Skif-off
feee22e21c
UPD: Russian translation (#1916) 2024-10-15 20:34:36 +03:00
dependabot[bot]
114f1cae6c
UPD: Bump actions/checkout from 3 to 4 (#1915) 2024-10-14 09:04:36 +03:00
Artem V. Ageev
395278e637
ADD: Dependabot (#1913) 2024-10-13 18:16:19 +03:00
rich2014
44f5493321 FIX: focused state of the cell when calling OnDrawCell() 2024-10-13 23:03:22 +08:00
rich2014
45f448f99c UPD: enable XAttr change monitoring, eg. Finder Tag Changed 2024-10-13 22:03:53 +08:00
rich2014
82eb373ee7 ADD: draw Finder Tags as Decorative Icons in BriefView mode 2024-10-13 21:18:43 +08:00
rich2014
1478a5eea4 ADD: improve OnCellDraw setting in ColumnView mode 2024-10-13 18:42:39 +08:00
rich2014
4509e71249 ADD: draw Finder Tags as Decorative Icons at FileName Column in ColumnView mode 2024-10-13 18:42:34 +08:00
Alexander Koblov
45f7a74bd5 UPD: Enable elevation under macOS (experimental) 2024-10-13 00:52:26 +03:00
Alexander Koblov
1b39c9b210 FIX: Elevation - Verify child/parent process under macOS 2024-10-13 00:35:34 +03:00
Alexander Koblov
3469361f2a FIX: Elevation - EAGAIN error code processing 2024-10-13 00:35:34 +03:00
Alexander Koblov
9cf517b4e7 UPD: Italian language file 2024-10-12 21:55:50 +03:00
Alexander Koblov
d174021001 UPD: German language file 2024-10-12 21:46:55 +03:00
Alexander Koblov
13abc11239 FIX: Hang on TServerListnerThread.Destroy 2024-10-12 20:57:21 +03:00
rich2014
ad44f75025 ADD #1265: active Edit shortcut for Sharing, eg. Command+C / Command+V 2024-10-12 19:02:05 +08:00
rich2014
6ff4d166b5 FIX: refresh Favorite Finder Color Tags Menu View in ContextMenu on old macOS version 2024-10-12 19:01:43 +08:00
rich2014
ea812adf0d UPD: zh_TW language updated 2024-10-11 19:41:00 +08:00
rich2014
5d886afbca UPD: zh_CN language updated 2024-10-11 19:27:10 +08:00
rich2014
a69813350f UPD: i18n for Finder Tag Menu 2024-10-11 19:20:35 +08:00
rich2014
36aed0e126 FIX: Initialize WidgetSet in advance 2024-10-11 19:06:16 +08:00
rich2014
697f88ddcb UPD: add const for Finder Menu Item in ContextMenu on macOS 2024-10-11 19:02:09 +08:00
rich2014
cbb4b2fa5b UPD: optimize memory release in ContextMenu on macOS 2024-10-11 19:01:41 +08:00
rich2014
95be3520aa ADD: dynamically update caption of Finder Menu Item in ContextMenu on macOS 2024-10-11 19:01:18 +08:00
rich2014
00163720f1 ADD: add Favorite Finder Color Tags Menu View to ContextMenu on macOS (clickable) 2024-10-11 00:12:34 +08:00
rich2014
97149bfbf5 ADD: add Favorite Finder Color Tags Menu View to ContextMenu on macOS (showing only, not clickable yet) 2024-10-10 23:11:52 +08:00
Alexander Koblov
c0b4c5521f FIX: Get current icon theme name 2024-10-09 20:36:17 +03:00
Alexander Koblov
2ef5b6c33d UPD: German language file 2024-10-08 20:13:50 +03:00
j2969719
99829590d9
ADD: MultiArc - IgnoreString support (#1881) 2024-10-08 08:23:01 +03:00
VenusGirl❤
ec5c977d2d
UPD: Korean language file doublecmd.ko.po (#1904) 2024-10-08 08:16:25 +03:00
j2969719
f9a5214df4
FIX: Tooltip (#1905) 2024-10-07 23:26:30 +03:00
j2969719
d62505b057
ADD: MultriArc - comment parsing (#1880) 2024-10-07 20:01:30 +03:00
rich2014
2cce7e3845 ADD: get Favorite Finder Tags 2024-10-07 23:17:51 +08:00
rich2014
638f4a7997 UPD: refactor Finder Tag related code to separate Model and UI 2024-10-07 21:35:07 +08:00
j2969719
0110f2b639
UPD: MultiArc - fill size props for mafFileNameList (#1882) 2024-10-07 08:30:01 +03:00
Alexander Koblov
7d85724eeb UPD: German language file 2024-10-06 23:13:24 +03:00
Alexander Koblov
1bf48d63dd FIX: Labels and panels background color 2024-10-06 20:06:44 +03:00
Alexander Koblov
3fc2fa3428 FIX: Labels background color (issue #1885) 2024-10-06 00:21:41 +03:00
Alexander Koblov
87ae081b9b FIX: TKASCDEdit - ReadOnly flag 2024-10-05 21:37:43 +03:00
Alexander Koblov
f018766903 FIX: Compiling 2024-10-05 19:17:30 +03:00
Alexander Koblov
c13e3a07e6 UPD: Don't show '*' in the tabs list menu (issues #1890, #1784) 2024-10-05 18:40:47 +03:00
kongomongo
5eb2756f09
ADD: Make cMaxStringItems configurable (and rename it to gMaxStringItems) (#1867) 2024-10-05 15:38:40 +03:00
Alexander Koblov
56611a51ca FIX: Pack using hidden archivers 2024-10-05 15:32:10 +03:00
j2969719
d51ac676f4
ADD: MultiArc - Show as normal files option (#1860) 2024-10-05 14:57:15 +03:00
Alexander Koblov
66dedd742c FIX: Panels background color (issue #1889) 2024-10-05 13:53:47 +03:00
Alexander Koblov
f5a67b9883 FIX: Panels background color (issue #1889) 2024-10-05 13:38:25 +03:00
rich2014
04babd85e2 FIX #1887: the background color of the button panel 2024-10-05 12:46:59 +08:00
j2969719
1271cd1a68
ADD: MultiArc - AskHistory support (#1838) 2024-10-04 20:44:44 +03:00
rich2014
61b3f9cae3 FIX #1885: the background color in fFileProperties 2024-10-04 23:45:04 +08:00
rich2014
6394f21656 FIX #1885: the background color of the button panel in fFileProperties and fCheckSumVerify 2024-10-04 22:59:10 +08:00
rich2014
6c24641cd5 FIX: the issue when no item in the list is selected in TfrmCheckSumCalc #1817 2024-10-04 21:45:24 +08:00
rich2014
d067998bed ADD: support Finder Tag - step 23: better compatibility with macOS 11- NSTableView style 2024-10-04 21:15:38 +08:00
rich2014
53086dbf8c ADD: support Finder Tag - step 22: change to case insensitive 2024-10-04 20:30:29 +08:00
rich2014
5f3ea44844 ADD: support Finder Tag - step 21: add to context menu 2024-10-04 20:08:22 +08:00
rich2014
b5af91a15b ADD: support Finder Tag - step 20: add support for macOS 11- 2024-10-04 20:03:29 +08:00
rich2014
6a99fd2ebb UPD: zh_TW language updated 2024-10-03 14:23:49 +08:00
rich2014
27e4b32d30 UPD: zh_CN language updated 2024-10-03 14:09:59 +08:00
rich2014
7acc44c2c6 UPD: i18n for new control in Modern Form style (ulng) 2024-10-03 14:09:18 +08:00
rich2014
0b102f7897 UPD: i18n for new control in Modern Form style 2024-10-03 00:49:49 +08:00
Alexander Koblov
ea75da6f0b Revert "UPD: FTP - assign connection remote path as virtual drive root (issue #1665)"
This reverts commit 67c5d3a2b1.
2024-10-01 21:45:53 +03:00
Alexander Koblov
c42011485b ADD: Drag and drop - option to move instead copy (fixes #271) 2024-10-01 21:44:14 +03:00
rich2014
432f7edd29 ADD: support Finder Tag - step 19: add filename label 2024-10-02 00:46:29 +08:00
Alexander Koblov
dabd5fbdc2 ADD: Play sounds using GStreamer under Linux/FreeBSD 2024-09-30 20:19:55 +03:00
j2969719
df4c16a213
FIX: Unix attr color (#1871) 2024-09-29 22:56:35 +03:00
Alexander Koblov
ef94d8327b ADD: Play sounds using SDL2 under Linux/FreeBSD 2024-09-29 20:16:46 +03:00
rich2014
9c26a1cd5e ADD: Modern Form Style - add compare/sync/edit control for macOS 11+ 2024-09-29 23:05:49 +08:00
rich2014
5291ed3c35 ADD: Modern Form Style - "Full Disk Access" button for macOS 11+ 2024-09-29 21:13:38 +08:00
rich2014
bc6e961a0d ADD: support Finder Tag - step 17: UI is more consistent with Finder 2024-09-29 20:34:24 +08:00
Alexander Koblov
67c5d3a2b1 UPD: FTP - assign connection remote path as virtual drive root (issue #1665) 2024-09-29 14:55:14 +03:00
rich2014
7f1fb46919 ADD: support Finder Tag - step 17: Enter key to confirm 2024-09-28 23:06:41 +08:00
Alexander Koblov
480f7f6181 FIX: Remove ScrollWidth (issue #1817) 2024-09-27 20:31:07 +03:00
Alexander Koblov
3293676910 FIX: SFTP - execute command in the current directory 2024-09-27 18:28:42 +03:00
Alexander Koblov
d298af4453 FIX: Reset busy flag on abort 2024-09-27 18:25:36 +03:00
rich2014
fc6c26f151 ADD: support Finder Tag - step 16: the editing text that is exactly the same as the token can be retained in the filter list 2024-09-26 21:31:09 +08:00
rich2014
f32ab111d6 ADD: support Finder Tag - step 15: remove duplicate tags 2024-09-26 21:30:30 +08:00
rich2014
c4b07ba6dd ADD: support Finder Tag - step 14: update token by setObjectValue(), avoid multiple updates caused by modifying text content 2024-09-26 21:30:13 +08:00
Alexander Koblov
ab74407105 UPD: Slovak language file (fixes #1862) 2024-09-25 22:29:34 +03:00
Alexander Koblov
76eecf639c ADD: SyncDirs - display compare by content operation progress 2024-09-25 22:06:27 +03:00
Skif-off
731cf1cfb0
ADD: Sound notifications: enable/disable feature; environment variables in paths. (#1866) 2024-09-25 20:12:07 +03:00
Alexander Koblov
a0eac93139 FIX: History - save a last active file when open archive 2024-09-25 20:09:44 +03:00
rich2014
6f8f46b058 ADD: support Finder Tag - step 13: make editor and filterList automatically resize 2024-09-25 23:43:09 +08:00
rich2014
c75b3b2716 ADD: support Finder Tag - step 12: improve font and const 2024-09-25 22:01:01 +08:00
j2969719
9a290fd289
UPD: MultiArc - When ExtractWithoutPath is not supported unpack file by file into a tempdir. (#1850) 2024-09-25 11:44:15 +03:00
bovirus
0261d283f4
UPD: Improve installer script (#1852) 2024-09-24 21:19:36 +03:00
VenusGirl❤
9a7768549d
UPD: Korean language file doublecmd.ko.po (#1861) 2024-09-24 21:01:58 +03:00
rich2014
1bfec1424c FIX: color in Filter List of Finder Tag Edit Panel 2024-09-24 23:28:56 +08:00
rich2014
2b8ec129ed ADD: support Finder Tag - step 12: improve FilterList UI & Interactivity 2024-09-24 22:11:42 +08:00
rich2014
e1336aa137 ADD: support Finder Tag - step 11: select token by Mouse 2024-09-24 20:52:12 +08:00
rich2014
967dcff2c3 ADD: support Finder Tag - step 10: select token by Keyboard 2024-09-24 19:54:56 +08:00
Alexander Koblov
e906196a37 UPD: Load Double Commander icon from resources 2024-09-23 20:43:27 +03:00
rich2014
0d38c4e9f0 ADD: support Finder Tag - step 8: dynamically update filter lists 2024-09-24 00:26:24 +08:00
Alexander Koblov
466cca2851 FIX: SyncDirs - template with exclude directories 2024-09-23 19:01:43 +03:00
Alexander Koblov
5adb793286 FIX: Reset mouse state (after using extra buttons) 2024-09-23 18:50:33 +03:00
rich2014
69196478bc ADD: support Finder Tag - step 8: add filter list view to Edit Panel 2024-09-23 22:33:41 +08:00
Alexander Koblov
62dd19e08b FIX: Synchronize directories - the vertical scroll bar will not update the content of the list view when dragged with the mouse (fixes #1855) 2024-09-22 22:10:15 +03:00
Alexander Koblov
483bbef8db FIX: Don't show virtual folders 2024-09-22 13:59:09 +03:00
Alexander Koblov
81af12959d FIX: Access Violation when open TAR archive (fixes #1849) 2024-09-22 13:08:58 +03:00
rich2014
c470b315a6 ADD: support Finder Tag - step 7: fix the issue about text selection 2024-09-22 16:32:47 +08:00
rich2014
4807910fd7 ADD: support Finder Tag - step 6: improve in dark mode 2024-09-21 23:59:18 +08:00
Skif-off
11d29e883e
FIX: RemoveQuotation: Skip spaces when removing quotation without splitting into arguments (Unix-like OS). (#1843) 2024-09-21 14:55:49 +03:00
rich2014
1b7a57f97c ADD: support Finder Tag - step 6: improve tag UI (color/size/RoundRect) 2024-09-21 16:51:35 +08:00
j2969719
931341c272
FIX: MultiArc - Use FixExeExt if the path to the fallback executable is specified. (#1847) 2024-09-20 23:47:12 +03:00
Alexander Koblov
e32c0398f3 FIX: The function "Show Occupied Space" does not distinguish between 0-size directories and non-accessible directories (issue #1846) 2024-09-20 20:55:56 +03:00
rich2014
fe369a3749 ADD: support Finder Tag - step 5: add/delete/save tags 2024-09-20 23:40:58 +08:00
rich2014
0604dcb6c7 ADD: support Finder Tag - step 4: get all tags from finder database, enable tag color 2024-09-20 21:11:02 +08:00
rich2014
1a9bbd1626 ADD: support Finder Tag - step 3: prepare for tag color 2024-09-20 19:03:43 +08:00
Alexander Koblov
5a76864932 UPD: German language file 2024-09-19 22:30:42 +03:00
Alexander Koblov
b0297748ab ADD: DialogAPI - Read/write a complex properties 2024-09-19 22:19:07 +03:00
Alexander Koblov
1da73f2809 FIX: Viewer - Ctrl+End (go to file end) goes incorrect (fixes #817) 2024-09-19 20:44:51 +03:00
Alexander Koblov
792e73b463 ADD: Better hotkey conflict detection (issue #1841) 2024-09-19 20:40:05 +03:00
rich2014
8f922a5408 ADD: support Finder Tag - step 2: show tags (without color) 2024-09-19 23:55:25 +08:00
rich2014
cbadb275d4 ADD: support Finder Tag - step 1: Modern Form Style skeleton 2024-09-19 21:20:37 +08:00
j2969719
960cbad7fb
UPD: Progressbar state (#1834)
* UPD: Don't show text and don't make the progressbar normal when testing archive or if ProcessDataProc didn't touch it.
2024-09-19 08:41:55 +03:00
Alexander Koblov
f9c2c136ae ADD: Create directory - option to disable auto-complete (fixes #1494) 2024-09-18 22:16:52 +03:00
Alexander Koblov
0a5de71113 ADD: DialogAPI - CreateComponent function 2024-09-18 21:44:13 +03:00
Alexander Koblov
c0c13d5e17 FIX: FileIsUnixExecutable function result with zero size file 2024-09-18 21:08:48 +03:00
Alexander Koblov
9bb9d0f9bc FIX: Disable workaround with Lazarus >= 3.2 2024-09-18 20:37:36 +03:00
Alexander Koblov
210959a833 ADD: DialogAPI - SetProperty/GetProperty functions 2024-09-17 20:21:32 +03:00
j2969719
1c6a71258c
ADD: MultiArc - FallBackArchivers (#1837) 2024-09-17 00:07:21 +03:00
Alexander Koblov
fa9bf4e35b UPD: Allocate space using an independent property 2024-09-16 23:56:50 +03:00
Alexander Koblov
f462a30d51 FIX: Free Pascal >= 3.0 compatibility 2024-09-16 21:08:32 +03:00
rich2014
a5bc7dfcca UPD: zh_TW language updated for Modern Form Style 2024-09-15 20:23:20 +08:00
rich2014
83d6e44848 UPD: i18n for the folder name in Modern Form style 2024-09-15 19:31:20 +08:00
rich2014
8e5ddb0d7d UPD: zh_CN language updated for Modern Form Style 2024-09-15 17:31:04 +08:00
rich2014
b96e143afe UPD: i18n for Modern Form style 2024-09-15 17:18:44 +08:00
Alexander Koblov
27aec457a7 UPD: XXH3-128 speed up 2024-09-14 21:35:28 +03:00
Alexander Koblov
73fe99b49c FIX: Build under non-macOS 2024-09-14 18:32:38 +03:00
Alexander Koblov
013c11bf3c UPD: XXH3-128 hash extension 2024-09-14 18:24:44 +03:00
Alexander Koblov
ea8c59fed2 ADD: XXH3-128 hash algorithm (#issue #1779) 2024-09-14 17:38:01 +03:00
rich2014
1a136c7754 UPD: preparing for modern Form style i18n 2024-09-14 19:22:08 +08:00
j2969719
9e26803e53
UPD: Hide invalid props (#1832) 2024-09-13 20:31:43 +03:00
rich2014
bb504347c8 UPD: improve the Icon in 'Go' ToolBarItem Menu 2024-09-13 21:48:37 +08:00
rich2014
2448a1002d UPD: Modern Form Style - simplify the code for CommandMenuItem 2024-09-12 23:49:18 +08:00
rich2014
3c8fa58a14 ADD: Option+Space ShortCut for macOS QuickLook 2024-09-12 22:25:54 +08:00
rich2014
4c93d2f80b UPD: Lazarus running on macOS 11- supported to compile Double Commander 2024-09-12 20:42:37 +08:00
rich2014
276c76a512 ADD: trash path in Modern Form Style - Common Dir 2024-09-11 21:44:25 +08:00
rich2014
38c7971ea1 UPD: optimize APP Icon
1. use the Icon in the APP bundle instead of the Icon in the LCL Project
2. cancel setting setRepresentedURL to avoid blank Icon in titlebar
2024-09-10 23:38:15 +08:00
rich2014
436669e5d5 ADD: Modern Form Style - Common Dir control for macOS 11+ 2024-09-10 23:31:29 +08:00
rich2014
12f387d9c1 ADD: Modern Form Style - reorganize the layout of some controls for macOS 11+ 2024-09-10 23:04:13 +08:00
rich2014
378d3e829d ADD: Modern Form Style - Search Files Control for macOS 11+ 2024-09-10 23:03:55 +08:00
rich2014
d4268a4c84 ADD: Modern Form Style - Terminal Control for macOS 11+ 2024-09-10 23:03:35 +08:00
rich2014
35ff5616f3 ADD: Modern Form Style - Quick Look Panel Control for macOS 11+ 2024-09-10 23:03:19 +08:00
rich2014
29cc734aaa FIX: fix the filepath that need escaping 2024-09-10 23:03:04 +08:00
rich2014
352c0168db ADD: Modern Form Style - Menu Control for macOS 11+ 2024-09-10 00:31:18 +08:00
rich2014
2a15152286 ADD: Modern Form Style - Show Infol In Finder Control for macOS 11+ 2024-09-10 00:22:56 +08:00
rich2014
ef764c8ae9 ADD: Modern Form Style - Reveal In Finder Control for macOS 11+ 2024-09-10 00:22:05 +08:00
rich2014
cc0bb25644 ADD: Modern Form Style - Refresh Control for macOS 11+ 2024-09-09 16:12:45 +08:00
rich2014
0033be0732 ADD: Modern Form Style - MultiName Control for macOS 11+ 2024-09-09 16:12:40 +08:00
rich2014
d2882db5ee ADD: Modern Form Style - AirDop Control for macOS 11+ 2024-09-09 16:12:36 +08:00
rich2014
9310362d06 FIX #1819: TfrmMain.NSServiceMenuGetFilenames may be called before the FileView is fully created on macOS 13+ 2024-09-09 09:56:55 +08:00
rich2014
22783fa3d2 ADD: Modern Form Style - Swap Panels Control for macOS 11+ 2024-09-09 01:10:46 +08:00
rich2014
a2f339fb24 ADD: Modern Form Style - Share Control for macOS 11+ 2024-09-09 00:31:46 +08:00
rich2014
e8b4058d84 UPD: on Cocoa, change the return type of NSServiceMenuGetFilenames() from TStringList to TStringArray 2024-09-09 00:30:52 +08:00
Alexander Koblov
d7bbc55b20 UPD: Polish translation 2024-09-08 19:23:21 +03:00
Skif-off
d575e6a708
ADD: Lua - ExpandVar, GetPluginField, GoToFile (DC); ExpandEnv, FileSetTime, GetFileProperty, RemoveDirectory (SysUtils) (#1810) 2024-09-08 13:41:53 +03:00
rich2014
8114032450 ADD: Modern Form Style - ShowMode Group Item Control for macOS 11+ 2024-09-08 02:10:33 +08:00
rich2014
8dfa4a52f9 ADD: Modern Form Style - Horz/Vert Split Toogle Button for macOS 11+ 2024-09-08 02:10:09 +08:00
rich2014
c05b9e6a66 ADD: Modern Form Style - Tree View Toogle Button for macOS 11+ 2024-09-08 02:08:55 +08:00
rich2014
d011b40705 ADD: Modern Form Style infrastructure for macOS 11+ 2024-09-08 02:07:57 +08:00
Alexander Koblov
b99af5fc32 FIX: Set focus by eight mouse button (Qt) 2024-09-07 13:21:57 +03:00
Alexander Koblov
a489af1a7c FIX: Extend cell width if text is not fitting into column under Qt (issue #1811) 2024-09-07 13:21:57 +03:00
Alexander Koblov
65b46ae819 FIX: Wrong text decoding in internal differ tool (fixes #1816) 2024-09-07 01:29:04 +03:00
Alexander Koblov
718d279ea7 UPD: Speed up checksum calculation 2024-09-06 23:55:48 +03:00
Alexander Koblov
7d644055cd UPD: KAScrypt - clean up 2024-09-04 20:23:43 +03:00
Alexander Koblov
855fbfe8f8 UPD: BLAKE3 - synchronize asm-code with upstream 2024-09-04 20:16:06 +03:00
Alexander Koblov
c159f39a8a FIX: Drive list - non-letter hotkeys (Windows) 2024-08-27 21:30:10 +03:00
Alexander Koblov
3df381014e FIX: Overwrite older (fixes #1786) 2024-08-26 00:15:41 +03:00
rich2014
de5e1d44e0 UPD: adapt macOS APP Menu related code to the new version of Lazarus/Cocoa 2024-08-22 21:08:42 +08:00
Alexander Koblov
9f5efd0547 FIX: Swapping panels causes the drive name in the inactive panel to be inconsistent (fixes #1723) 2024-08-21 17:22:19 +03:00
Alexander Koblov
a1402335f2 ADD: mbFileGetTime function 2024-08-21 14:00:02 +03:00
Alexander Koblov
81616d392e UPD: Hungarian translation (fixes #1758) 2024-08-16 23:04:06 +03:00
Alexander Koblov
e60cfd00a3 FIX: Build macOS releases 2024-08-15 22:16:03 +03:00
Alexander Koblov
82e33bb641 UPD: Differ - use new mbFileIsText function 2024-08-14 20:47:21 +03:00
Alexander Koblov
12528b977c ADD: Viewer - don't use code mode with binary files (issue #1778) 2024-08-14 20:40:09 +03:00
Alexander Koblov
72481da2ea ADD: mbFileIsText function 2024-08-14 20:35:10 +03:00
Alexander Koblov
1812ed6e47
FIX: Build macOS snapshots 2024-08-13 08:23:22 +03:00
Alexander Koblov
1ee7a6b2b8 FIX: Viewer - Incorrect selection offset after search in Text mode (issue #1755) 2024-08-12 21:31:51 +03:00
Alexander Koblov
fcca7ac789 ADD: Show system (root) drive under macOS (fixes #1640) 2024-08-11 15:09:32 +03:00
Alexander Koblov
fa88664159 ADD: Use arrow-down/up to rename next/previous file in list when renaming (feature #1147) 2024-08-09 22:36:32 +03:00
Alexander Koblov
1a6b8338af UPD: Relocate some Linux specific code 2024-08-03 16:12:41 +03:00
Alexander Koblov
06af97c346 FIX: Range check error 2024-08-02 21:21:58 +03:00
Alexander Koblov
fefa77a1b0 ADD: Feature [0002306] Notification about the end of a long running operation (step 2) 2024-07-31 20:34:43 +03:00
Alexander Koblov
27849c0dcd ADD: Feature [0002306] Notification about the end of a long running operation (step 1) 2024-07-30 23:58:53 +03:00
Alexander Koblov
a07d47b1c5 ADD: Play sound unit 2024-07-30 20:27:52 +03:00
Alexander Koblov
fcbdf75482 Revert "FIX: SevenZip - password dialog priority"
This reverts commit 0aef56bc46.
2024-07-29 22:07:32 +03:00
Alexander Koblov
048a8511a5 UPD: Use DirHistoryCount with context menu only 2024-07-29 22:05:22 +03:00
rich2014
8d886d686d UPD: Uniform Type Identifiers framework supported on x86_64
use -weak_framework instead of linkframework
2024-07-29 22:48:35 +08:00
Alexander Koblov
f3d000321f ADD: Navigation through directory global history menu 2024-07-27 14:28:34 +03:00
Alexander Koblov
0092c7afa7 ADD: Make DirHistoryCount configurable (fixes #1736) 2024-07-25 15:00:05 +03:00
Alexander Koblov
f21aa9cc86 FIX: Don't reload file list on brightness level of inactive panel change (fixes #1760) 2024-07-23 13:23:01 +03:00
Alexander Koblov
74e742c26b FIX: Don't show dark mode settings under old Windows versions (fixes #1760) 2024-07-23 13:15:11 +03:00
rich2014
30336f33c0 FIX: set MACOSX_DEPLOYMENT_TARGET=10.11 in create_packages.mac to keep it consistent with other scripts
extractdwrflnfo didn't support 10.5
2024-07-18 20:51:00 +08:00
Alexander Koblov
752d3c9f23 FIX: Zip - crash on file replace with some .tar archives (fixes #1744) 2024-07-14 14:43:20 +03:00
xBZZZZ
661859913c
FIX: IntToStrTS when ThousandSeparator is NUL (#1738)
also simplify IntToStrTS (smaller, less variables)
2024-07-11 20:31:06 +03:00
Alexander Koblov
06a5cc8fa2 UPD: Don't hide folders with system attribute under Windows (fixes #1741) 2024-07-07 13:10:54 +03:00
Alexander Koblov
e650495a5a UPD: Use LC_CTYPE to determine locale under Linux 2024-07-06 13:20:43 +03:00
Alexander Koblov
7e2421de3e FIX: Cmd key named as Winkey on DC for macOS (fixes #1733) 2024-07-06 13:17:00 +03:00
rich2014
900b369d5c UPD: detect Encoding by the first 4KB in Viewer, keep consistent with the Editor 2024-07-03 23:11:55 +08:00
Alexander Koblov
6f44e95e14 FIX: FileAllocate function 2024-07-01 20:20:55 +03:00
rich2014
4f4c53dcb1 UPD: encoding name mapping for Chinese, Japanese, and Korean in MyDetectCodePageType() 2024-07-01 22:32:24 +08:00
rich2014
dc2d77a5bf Fix: subtle synchronization issue related to Grids in DisplayFileListChanged() 2024-07-01 22:09:07 +08:00
Alexander Koblov
c4ae646f00 FIX: Don't use pre-allocation of disk space on the FAT32 under Linux (fixes #1739) 2024-06-30 14:31:54 +03:00
Alexander Koblov
005b798a92 FIX: Disk toolbar width 2024-06-28 20:27:53 +03:00
Alexander Koblov
55da32615a FIX: Mouse cursor action indicators graphical issues (fixes #1729) 2024-06-27 20:19:11 +03:00
Alexander Koblov
aad26e8f14 UPD: Don't change disk toolbar size and position according to file panels splitter 2024-06-26 19:44:39 +03:00
Alexander Koblov
2782b26b07 UPD: Publish TKASToolPanel.OnResize property 2024-06-24 20:44:07 +03:00
Alexander Koblov
6270e0920a ADD: Open images in the Microsoft Photos application under Windows 11 (build >= 22631) 2024-06-24 20:38:27 +03:00
Alexander Koblov
8422b1b077 ADD: Icons cm_ShowTabsList and cm_MapNetworkDrive 2024-06-21 22:02:14 +03:00
Alexander Koblov
a0a9221472 FIX: Access denied checking (fixes #1725) 2024-06-21 21:54:26 +03:00
Alexander Koblov
2a57395f58 ADD: SyncDirs - stop compare by content 2024-06-21 21:49:09 +03:00
Skif-off
f822e0751b
ADD: SyncDirs: 'Unknown' filter (#1728) 2024-06-21 21:37:31 +03:00
Alexander Koblov
ce960e0774 UPD: About - link colors 2024-06-20 20:50:13 +03:00
Alexander Koblov
e410909169 FIX: System language detection (issue #1724) 2024-06-20 18:04:07 +03:00
Alexander Koblov
ecb6bd85e9 UPD: Language files 2024-06-19 21:21:24 +03:00
Alexander Koblov
6e187ef760 ADD: Map Network Drive command (fixes #1720) 2024-06-19 21:15:27 +03:00
Alexander Koblov
cd3746da5e ADD: Don't show extensions for special items 2024-06-19 19:54:33 +03:00
Alexander Koblov
8c857bd6d2 FIX: Project file 2024-06-19 19:46:07 +03:00
Alexander Koblov
caae56af3e ADD: UnRAR - more accurate time support 2024-06-16 15:09:09 +03:00
Alexander Koblov
d0f9193461 ADD: Zip - more accurate time support (fixes #1700) 2024-06-16 15:06:02 +03:00
Alexander Koblov
1b9671eda7 ADD: Wcx-plugins - more accurate time support 2024-06-16 15:03:29 +03:00
Alexander Koblov
573515e601 FIX: Mount drive 2024-06-16 13:25:48 +03:00
Alexander Koblov
24edd85df6 UPD: Use TFileTimeEx type 2024-06-16 12:41:02 +03:00
Alexander Koblov
035cee8d76 FIX: Allow negative Unix-time (issue #1700) 2024-06-15 12:55:12 +03:00
Alexander Koblov
dde35d68dd UPD: Use TFileTimeEx type 2024-06-15 12:43:21 +03:00
Alexander Koblov
80d4477cc0 UPD: UnRAR - RARHeaderDataEx type 2024-06-14 22:37:06 +03:00
Arkanoid1973
1780ca370d
UPD: French translation (#1712) 2024-06-14 20:31:10 +03:00
Alexander Koblov
f996c38bed FIX: Renaming through the context menu in place stopped working (fixes #1711) 2024-06-14 20:28:23 +03:00
Alexander Koblov
fca1db719a UPD: Release workflow 2024-06-12 13:39:02 +03:00
VenusGirl❤
4094688e42
UPD: Korean language file doublecmd.ko.po (#1709) 2024-06-11 21:33:24 +03:00
Arkanoid1973
4b978d231e
UPD: French translation (#1708) 2024-06-11 20:47:42 +03:00
Alexander Koblov
eb05d249ce ADD: Go highlighter 2024-06-11 20:39:55 +03:00
Alexander Koblov
4c4a425a52 FIX: Russian language file 2024-06-10 20:16:08 +03:00
rich2014
0f2e388a29 FIX: mouse Scroll Lines limit in Options (min=1 and max=0 before, not follow LCL specifications) 2024-06-10 14:16:45 +08:00
Alexander Koblov
193dc62a3a FIX: Delete-window auto-size (fixes #1667) 2024-06-09 18:30:34 +03:00
Alexander Koblov
ce4eb5ebb0 FIX: Open/Save dialogs all files filter 2024-06-09 11:50:15 +03:00
Alexander Koblov
22110c33c7 FIX: Build under Windows (fixes #1702) 2024-06-07 22:41:22 +03:00
rich2014
01c8c0c81b FIX #1680: Internal Viewer crashes on macOS
in FPC 3.2.2, there are some bugs in Iconvert().
use the fixed Iconvert() instead of the FPC version on macOS.
2024-06-02 01:28:35 +08:00
Alexander Koblov
044706b658 FIX: Wrong default path for rar extension in WCX plugin for macOS (fixes #1697) 2024-06-01 13:53:10 +03:00
Alexander Koblov
a56d313b34 FIX: Deleting is extremely slow under KDE (issue #812) 2024-05-29 21:03:24 +03:00
Alexander Koblov
64c0ae2933 UPD: Viewer - multi-byte encoding list 2024-05-29 20:59:52 +03:00
Alexander Koblov
a2da252b19 ADD: Viewer - show text in the selected single-byte encoding in the hex, dec and bin modes (fixes #1674) 2024-05-28 21:59:46 +03:00
rich2014
3a72a90799 ADD: #1424 Dock Menu item "New Window" i18n 2024-05-28 22:58:03 +08:00
rich2014
cdf070569b ADD: Dock Menu item "New Window" on macOS 2024-05-28 22:36:07 +08:00
rich2014
93e4fafb3a UPD: zh_CN language updated 2024-05-28 00:22:08 +08:00
Alexander Koblov
520e337f7f FIX: Dark mode - don't cache theme data (issue #1238) 2024-05-27 18:08:16 +03:00
Alexander Koblov
519d4c4c41 FIX: Dark mode - multiple rows of tabs 2024-05-27 18:08:16 +03:00
rich2014
5fadb85903 UPD: simplify APP menu related codes with new version of Lazarus 2024-05-27 22:53:53 +08:00
rich2014
2a8513c243 UPD: "Services" was changed to reference the language pack of LCL 2024-05-27 22:48:47 +08:00
rich2014
5c38b38460 UPD: lclstrconsts.*.po updated from lazarus/lcl/languages
it needs to be updated for menu title i18n on macOS
2024-05-27 22:46:01 +08:00
Alexander Koblov
a404e2ffe7 FIX: Right-click on the smartphone icon (fixes #1647) 2024-05-25 17:29:54 +03:00
Alexander Koblov
92b83bfb0d UPD: Snapshots workflow 2024-05-25 14:41:20 +03:00
Alexander Koblov
1286c4fc42 FIX: Mark unsupported variable-width encodings 2024-05-25 13:56:09 +03:00
Alexander Koblov
c0ff9250bf FIX: Copy extended attributes when move files (fixes #1670) 2024-05-23 21:13:04 +03:00
Alexander Koblov
4ae5fc08b2 UPD: FTP - disable unavailable option 2024-05-21 23:09:06 +03:00
Alexander Koblov
84f1a960b1 FIX: FTP - Access violation if you try to "Quick connect" when you are already connected (fixes #1664) 2024-05-21 23:06:43 +03:00
Alexander Koblov
3fb10a1a5b UPD: Belarusian language file 2024-05-21 23:05:38 +03:00
Alexander Koblov
afc3a9fc9b UPD: FTP - clean up 2024-05-20 23:21:50 +03:00
Alexander Koblov
28b2254601 ADD: FTP - protocol drop-down list (issue #1604) 2024-05-20 23:13:54 +03:00
Jozef Gaal
f633ea144c
UPD: Slovak language file (#1649) 2024-05-20 22:15:03 +03:00
Mihaly Nyilas
a6a0398111
UPD: Hungarian translation (#1591) 2024-05-20 22:14:14 +03:00
Alexander Koblov
6f9218adcb FIX: Wfx-plugins - don't allow forbidden symbols in the plugin name (issue #1655) 2024-05-20 21:45:50 +03:00
Alexander Koblov
28152ec7f9 FIX: FTP - opens incorrect path when quick connection used (issue #1654) 2024-05-20 21:40:05 +03:00
Alexander Koblov
01cc57a338 FIX: FTP - don't print an error when not necessary (fixes #1656) 2024-05-20 20:38:57 +03:00
Alexander Koblov
e83d6a320d ADD: Debian source package build script 2024-05-19 14:55:12 +03:00
Alexander Koblov
d2416cc2a4 FIX: FTP - detect encoding before getting current directory 2024-05-19 13:48:08 +03:00
Alexander Koblov
4763aaa86e ADD: SSH+SCP - open current directory when remote directory is not specified 2024-05-15 20:30:11 +03:00
Alexander Koblov
832462f36a ADD: Wcx-plugins - don't show file time for files with zero time (fixes #1634) 2024-05-11 16:50:59 +03:00
Alexander Koblov
508d8c9ada FIX: FTP - possible buffer overflow 2024-05-11 14:47:35 +03:00
Alexander Koblov
65e72c0d31 FIX: Packing shows "Copying" instead of "Packing" (fixes #1626) 2024-05-09 19:22:06 +03:00
Alexander Koblov
94d501e320 ADD: Base64 - don't show original file size, it is unknown (issue #1630) 2024-05-09 17:50:59 +03:00
Alexander Koblov
024b0d632f ADD: WCX-plugins - Don't show zero file size when size is unknown 2024-05-09 17:46:50 +03:00
Alexander Koblov
159a91ab61 ADD: Base64 - display a packed size 2024-05-09 12:59:31 +03:00
Alexander Koblov
8ea19a565c FIX: DialogBoxParam function 2024-05-05 00:32:40 +03:00
Alexander Koblov
fb40c7c4a9 ADD: SFTP - open current directory when remote directory is not specified 2024-05-04 15:21:08 +03:00
Alexander Koblov
4cdf3f0e6c FIX: Run in terminal option default value (fixes #504) 2024-05-04 13:33:39 +03:00
Alexander Koblov
a19d3c3ad5 FIX: Multiarc copy Copying dialog shows incorrect speed and time remaining on the first copy start (fixes #1609) 2024-05-04 12:48:30 +03:00
Alexander Koblov
6fc5d04149 FIX: Multiarc does not update the "Copying" dialog with "From" / "To" information on the start of the archive extraction (fixes #1606) 2024-05-04 00:00:53 +03:00
Alexander Koblov
f92077f4e2 UPD: Unrar library (fixes #1592) 2024-05-03 22:37:07 +03:00
Alexander Koblov
c96e552037 FIX: Thousands separator in file size does not respect the system setting (fixes #1602) 2024-05-02 21:02:41 +03:00
Alexander Koblov
b6621eeb75 ADD: Homebrew libraries path to run-time libraries search path (issue #227) 2024-05-02 20:16:27 +03:00
Alexander Koblov
ddd1dd1377 UPD: Don't execute MS Photos with elevation 2024-05-02 18:07:36 +03:00
Alexander Koblov
dae59469ce FIX: Default button height under non macOS 2024-05-02 18:05:21 +03:00
Alexander Koblov
344b8eb21f DEL: Unused units 2024-05-01 20:30:55 +03:00
Alexander Koblov
61a1b24712 FIX: Case sensitive "cd" command (fixes #1577) 2024-05-01 20:29:22 +03:00
Alexander Koblov
d0c00d792e ADD: Open images in the Microsoft Photos application using WinRT APIs 2024-05-01 17:09:43 +03:00
rich2014
4f0eb9bc9e FIX #1593: height of some Buttons on macOS (refer to the implementation in TfrmButtonForm) 2024-05-01 18:53:09 +08:00
Alexander Koblov
693f0883cb FIX: FitFileName function under Qt and Lazarus 3.x 2024-04-28 19:19:15 +03:00
rich2014
69ab554ba5 FIX: background color of some Buttons (issue #1593) 2024-04-28 20:51:40 +08:00
Alexander Koblov
6099cdc228 FIX: Multiple b64 registration in plugins (fixes #1598) 2024-04-27 22:17:05 +03:00
Alexander Koblov
68a12f8e7a FIX: Terminal settings has wrong default path to Terminal.app (fixes #1595) 2024-04-27 00:20:50 +03:00
Alexander Koblov
0afd35e6fd UPD: Debian control file 2024-04-20 13:18:50 +03:00
Alexander Koblov
39d7cecdbc FIX: Label font color 2024-04-20 12:52:07 +03:00
Alexander Koblov
d2bef610d8 FIX: MacPreview - open only supported file types (issue #1481) 2024-04-18 21:35:10 +03:00
Alexander Koblov
c4c8e69189 FIX: Viewer - zoom image 2024-04-18 17:56:07 +03:00
Alexander Koblov
8725b8ceac FIX: Cannot delete a file from .tar.bz2 archive (fixes #1582) 2024-04-16 17:58:01 +03:00
Alexander Koblov
5a48d0b603 ADD: Ability to handle long paths for zip archiver (issue #1581) 2024-04-15 20:43:54 +03:00
Alexander Koblov
44abcdeb4a FIX: Lazarus 3.99 compatibility 2024-04-12 00:00:06 +03:00
Lars The
629473c426
UPD: Reorder special folders names (#1573)
Cosmetic rearrangement of the different special folder names for better understanding of the source code.
2024-04-11 21:53:33 +03:00
Alexander Koblov
f7333011bb FIX: Access violation on Tab - Close All Tabs (fixes #1570) 2024-04-11 21:17:24 +03:00
Alexander Koblov
e751c2ded2 FIX: Rebuild multiarc.ini (fixes #1568) 2024-04-10 21:21:38 +03:00
Alexander Koblov
ef9ae898a0 FIX: Rename folder using same name but different capitalization (fixes #1569) 2024-04-10 20:50:34 +03:00
Alexander Koblov
73059633f0 UPD: Italian language file 2024-04-09 21:14:24 +03:00
Alexander Koblov
2128ec073e UPD: Don't show unavailable context menu items (issue #1564) 2024-04-09 21:07:49 +03:00
Alexander Koblov
0bed1bda2d UPD: Zip - speed up .zip creation 2024-04-09 20:56:13 +03:00
Alexander Koblov
1ee04fc7c1 FIX: Create new column set identifier when save as 2024-04-08 22:09:42 +03:00
Alexander Koblov
f4da7688ba FIX: Default column set identifier 2024-04-08 20:38:24 +03:00
Alexander Koblov
cde5faedf4 FIX: System language detection under macOS (fixes #1560) 2024-04-08 18:20:05 +03:00
Alexander Koblov
6e413a96dc FIX: Warnings 2024-04-06 13:38:58 +03:00
Alexander Koblov
e4a5db79db ADD: Haiku install script 2024-04-06 12:58:20 +03:00
Alexander Koblov
fea28f382b ADD: Capability to set custom decimal separator 2024-04-04 21:17:36 +03:00
xBZZZZ
0f1f582578
FIX: Use cmem unit before cthreads unit (#1553) (#1553) 2024-04-02 20:35:06 +03:00
Alexander Koblov
17c4b7f460 FIX: Disable auto-refresh when Double Commander window is in the background (issue #606) 2024-03-31 13:13:06 +03:00
Alexander Koblov
69a8ec935f UPD: Optimization, refactoring 2024-03-30 20:58:55 +03:00
Alexander Koblov
b3f06168fa UPD: Enable libheif image reader (issue #1538) 2024-03-30 20:31:36 +03:00
Alexander Koblov
4c78fe6214 FIX: Read AVIF using libheif image reader (issue #1538) 2024-03-30 20:28:50 +03:00
Alexander Koblov
a685367b0c UPD: Disable libheif image reader, it works wrong with some images from https://github.com/link-u/avif-sample-images (issue #1538) 2024-03-30 14:55:15 +03:00
Alexander Koblov
37e268c3f8 FIX: Double Commander crashes when trying to view AVIF image (issue #1538) 2024-03-30 14:55:15 +03:00
Alexander Koblov
070a667cc9 UPD: Store cache in the program directory in portable mode 2024-03-29 21:20:52 +03:00
Alexander Koblov
c6e5f13764 DEL: Obsolete addons (fixes #1545) 2024-03-29 20:43:35 +03:00
Alexander Koblov
b80b584700 UPD: Use Command+Drag&Drop to move under macOS (fixes #1536) 2024-03-29 20:41:54 +03:00
Alexander Koblov
e2cf8a099d FIX: Set focus on mouse click (Lazarus 3.x) 2024-03-27 20:48:25 +03:00
Alexander Koblov
26023ec1ed UPD: Clean up 2024-03-23 18:51:41 +03:00
Alexander Koblov
205dd3cada FIX: List index (0) out of bounds 2024-03-23 16:19:52 +03:00
Alexander Koblov
f9313ed71c FIX: Set focus on mouse click (Lazarus 3.x) 2024-03-23 14:31:57 +03:00
Alexander Koblov
09238c8615 FIX: Disable unavailable options 2024-03-20 20:38:04 +03:00
Alexander Koblov
72ac5aed61 ADD: Viewer - Max code size limit (fixes #1461) 2024-03-20 20:29:49 +03:00
Alexander Koblov
7bfe465048 ADD: cm_Edit - capability to open file under cursor ('cursor' parameter) 2024-03-16 16:22:50 +03:00
Alexander Koblov
1b39937de7 FIX: Lazarus 3.99 compatibility 2024-03-16 13:30:03 +03:00
Alexander Koblov
9db5a98161 UPD: Clean up 2024-03-16 00:22:57 +03:00
Alexander Koblov
c42cd75da9 FIX: Comparing files by content locks up DC (issue #1527) 2024-03-14 23:59:57 +03:00
Alexander Koblov
2f4a17518e UPD: Enable create separate archives when multiply files selected only (issue #1523) 2024-03-13 20:20:00 +03:00
j2969719
ed485edd9d
FIX: FTP - SSH checkbox (#1488) 2024-03-10 14:08:15 +03:00
Alexander Koblov
6c84cb59d6 FIX: Open .tar.gz archives 2024-03-09 12:40:20 +03:00
Alexander Koblov
a8a855d7f3 ADD: Edit path by double click (option) 2024-03-08 22:27:11 +03:00
Alexander Koblov
bcf728ee89 ADD: Zip - optimize .tar.gz handling (fixes #471) 2024-03-05 22:10:09 +03:00
Alexander Koblov
05b14ee6c4 FIX: Zip - open .bz2, .xz and .zst archives 2024-03-04 18:31:21 +03:00
Alexander Koblov
2927a95b64 UPD: Zip - refactoring 2024-03-03 14:35:56 +03:00
Alexander Koblov
1da29f4779 FIX: Different color status bars in Options when using QT version in GTK DE (fixes #1456) 2024-03-02 20:11:28 +03:00
Alexander Koblov
8374f75385 Revert "ADD: Zip - determine tarballs with double extension"
This reverts commit 4fe92d8254.
2024-03-02 19:40:27 +03:00
Alexander Koblov
4fe92d8254 ADD: Zip - determine tarballs with double extension 2024-03-02 17:54:13 +03:00
Alexander Koblov
4e4887033e ADD: Zip - optimize tarballs handling (fixes #458) 2024-03-02 17:49:03 +03:00
Graham Inggs
849760f020
Update clean.sh (#1504)
Clean temporary files plugins/wcx/unrar/lib/rarlng.rsj and plugins/wfx/ftp/lib/ftppropdlg.lfm
2024-03-02 17:32:51 +03:00
Alexander Koblov
184c870c79 UPD: Project files 2024-03-01 23:53:33 +03:00
Alexander Koblov
2e0343433d FIX: Verify after copy under macOS 2024-02-29 23:25:25 +03:00
Alexander Koblov
cdbb2852f6 ADD: Viewer - open file under cursor by Shift+F3 (fixes #1276) 2024-02-29 21:04:29 +03:00
Alexander Koblov
2c94aa22b8 ADD: Verify after copy under macOS 2024-02-27 22:35:08 +03:00
Alexander Koblov
3b8e210e6a FIX: Build with RabbitVCS define 2024-02-27 20:54:21 +03:00
Alexander Koblov
cf2bf7f7f0 UPD: Project files 2024-02-27 20:52:37 +03:00
Alexander Koblov
d5c2c59798 FIX: Unreachable code 2024-02-27 20:35:01 +03:00
Alexander Koblov
e01d5186f7 FIX: Skip button 2024-02-27 20:32:16 +03:00
Alexander Koblov
c3b3644a57 ADD: Skip all when copy/move a file to itself 2024-02-27 20:28:51 +03:00
Alexander Koblov
b1e6a248eb FIX: Directory check condition 2024-02-23 12:46:46 +03:00
Alexander Koblov
46c39f0024 UPD: Exif-wdx - use non-localized field names for storage 2024-02-23 12:17:17 +03:00
Alexander Koblov
74b3763c56 ADD: Allow rename confirm by mouse click outside edit field 2024-02-22 20:11:56 +03:00
Alexander Koblov
4dbffb2748 FIX: Free Pascal 3.2.3 compatibility 2024-02-22 19:53:31 +03:00
Alexander Koblov
b9079e7827 FIX: Differ - binary mode 2024-02-21 19:48:11 +03:00
Alexander Koblov
f83d70f253 FIX: Differ - binary mode (wrong memory read) 2024-02-20 19:53:07 +03:00
Alexander Koblov
71725d1bd0 FIX: Differ - text mode modal dialog 2024-02-20 19:45:39 +03:00
Alexander Koblov
2a971d683c ADD: FTP - IPv6 support (issue #1483) 2024-02-17 20:37:09 +03:00
rich2014
1734d761b7 Fix #1484: file permissions of Info.plist 2024-02-17 22:59:27 +08:00
Alexander Koblov
384cac5495 ADD: WMP-plugin - save/restore volume level 2024-02-17 16:56:46 +03:00
Alexander Koblov
b7c4cb1584 ADD: Rust highlighter 2024-02-17 14:50:06 +03:00
Alexander Koblov
cfd166f052 UPD: Greek language file 2024-02-16 22:40:48 +03:00
Alexander Koblov
5229bfc66e UPD: Java script highlighter 2024-02-16 20:31:58 +03:00
Alexander Koblov
d8462d0ec5 UPD: C# highlighter 2024-02-16 19:53:04 +03:00
Alexander Koblov
a5009f63af FIX: Apply color settings 2024-02-13 22:43:55 +03:00
Alexander Koblov
c2804dc2cd FIX: Quick view - initial viewer size 2024-02-11 01:25:12 +03:00
Alexander Koblov
741e55c0ea FIX: Viewer - wrong initial image size and position 2024-02-09 22:03:17 +03:00
Alexander Koblov
d308ae7e30 UPD: Polish language file 2024-02-06 23:10:22 +03:00
Alexander Koblov
4b4c1c13dc UPD: COMMANDER_INI_PATH environment variable value 2024-02-06 22:02:44 +03:00
Alexander Koblov
2215be969b FIX: Viewer - reset regular expression search state 2024-02-06 21:54:04 +03:00
Alexander Koblov
bf4138f198 FIX: Multi-Rename Tool - []] template (issue #1469) 2024-02-05 19:55:54 +03:00
rich2014
2a04efd4db FIX: DefaultFormatSettings needs to be initialized again on macOS (issue #1465) 2024-02-04 21:16:04 +08:00
Alexander Koblov
912420fb32 FIX: Wrong decimal separator (issue #1465) 2024-02-03 19:58:04 +03:00
Alexander Koblov
7adcd8647e FIX: Don't load icon theme twice 2024-02-02 20:52:52 +03:00
Skif-off
a1b3b967b7
ADD: Lua - LazUtf8.DetectEncoding and SysUtils.GetTempName functions (#1464) 2024-02-01 08:40:25 +03:00
Alexander Koblov
3d32638970 FIX: Editor - find/replace switch 2024-01-28 14:41:10 +03:00
Alexander Koblov
c439aac266 FIX: Interface freeze when call directory hotlist with inaccessible network drive (issue #1441) 2024-01-27 17:37:48 +03:00
Alexander Koblov
8b4d9a068e FIX: ExpandAbsolutePath function (fixes #412) 2024-01-27 16:23:27 +03:00
Alexander Koblov
0522508448 FIX: ExpandAbsolutePath function (fixes #412) 2024-01-27 15:57:26 +03:00
Alexander Koblov
573441fc15 FIX: Source bitmap is too small 2024-01-27 14:41:29 +03:00
Alexander Koblov
56b24e5765 ADD: Templates menu sorting 2024-01-27 14:37:55 +03:00
Alexander Koblov
e4cdb921d0 FIX: Invalid typecast 2024-01-27 14:36:01 +03:00
rich2014
b5e943d659 FIX #1451: autoplay in MacPreview 2024-01-25 22:43:00 +08:00
Alexander Koblov
b137622398 FIX: Differ - initial line differences colors 2024-01-23 19:59:18 +03:00
Alexander Koblov
77a83234a7 UPD: Use system thousand separator (issue #1449) 2024-01-21 18:41:00 +03:00
Alexander Koblov
8ec446d80e FIX: TUnixFileTime under Windows 2024-01-21 13:39:07 +03:00
Alexander Koblov
192ccfd999 ADD: Extract Zstandard archives with a large dictionary 2024-01-20 14:49:02 +03:00
Alexander Koblov
785ccd8bf2 ADD: COMMANDER_EXE and COMMANDER_INI_PATH environment variables 2024-01-20 14:18:32 +03:00
Alexander Koblov
e350e9b7ff DEL: Debug message 2024-01-18 20:55:20 +03:00
Alexander Koblov
3685bb0a86 FIX: ELayoutException: Position range overflow (issue #769, #1358) 2024-01-18 20:51:01 +03:00
Alexander Koblov
3793a548f7 FIX: ELayoutException: Position range overflow (issue #736) 2024-01-18 20:42:25 +03:00
Alexander Koblov
0aef56bc46 FIX: SevenZip - password dialog priority 2024-01-16 00:13:56 +03:00
Alexander Koblov
8b8e78a00c UPD: Enable overlay icons by default under Unix 2024-01-16 00:02:12 +03:00
Alexander Koblov
57059c125b FIX: Quick View - Access violation 2024-01-15 20:22:02 +03:00
Alexander Koblov
6bbfb62293 FIX: Lua - use lua_isnumber function 2024-01-14 18:20:53 +03:00
Alexander Koblov
889e685389 UPD: Use DebugLn instead WriteLn (issue #361) 2024-01-14 14:34:45 +03:00
Alexander Koblov
39de6b76f5 FIX: Renaming file breaks the visible length of the other file names (fixes #321) 2024-01-14 13:59:59 +03:00
Alexander Koblov
33078fd3dc FIX: Window title with non-english characters (fixes #1442) 2024-01-13 00:42:06 +03:00
Alexander Koblov
285bb31d19 FIX: Bug [0001417] Changed sorting settings aren't applied immediately 2024-01-12 22:01:43 +03:00
Alexander Koblov
434ac259d4 FIX: Skip archive icon when clear system icon cache 2024-01-12 21:47:58 +03:00
Skif-off
cc11730617
ADD: Lua - Dialogs.InputListBox will also return the index of selected item. (#1440) 2024-01-11 06:15:44 +03:00
rich2014
9c7051bb86 FIX #1433: Accelerator key (&) supportted in Menu with new version of Lazarus 2024-01-08 21:49:24 +08:00
VenusGirl❤
7617271824
UPD: Korean language file doublecmd.ko.po (#1434) 2024-01-07 15:52:38 +03:00
rich2014
ecac177983 FIX: memory leaks in Share on MacOS 2024-01-07 13:29:20 +08:00
rich2014
e3c9945296 UPD: "Open with" menu items sorting refactored on macOS 2024-01-07 12:39:41 +08:00
rich2014
64d65252c1 UDP: getOtherAppFromDialog() refactored in uShellContextMenu on macOS 2024-01-07 00:07:09 +08:00
rich2014
b73086ff95 ADD #1430: "Open with" multiple files supported 2024-01-06 23:36:06 +08:00
rich2014
1b3f41012b UPD: replace ExecCmdFork() with LSOpenFromURLSpec() which supports opening multiple files 2024-01-06 22:34:00 +08:00
Alexander Koblov
ec477e54af UPD: German language file 2024-01-05 17:58:13 +03:00
Alexander Koblov
227c802540 UPD: Header painting 2024-01-05 15:34:21 +03:00
Alexander Koblov
b3e2248d8e ADD: Grid line color option 2024-01-05 14:56:11 +03:00
Skif-off
09863ff767
UPD: Russian translation (#1428) 2024-01-05 14:07:19 +03:00
Alexander Koblov
69b20f461f UPD: About dialog 2024-01-05 13:42:46 +03:00
rich2014
a1dd16a8cf UPD: install.txt in dmg for macOS updated 2024-01-05 00:21:14 +08:00
Alexander Koblov
b6ebe3a061 UPD: Language files 2024-01-04 19:15:33 +03:00
Alexander Koblov
fc76f3016c ADD: Show list of all open tabs as a menu 2024-01-04 15:03:20 +03:00
rich2014
0942269b58 UPD: Manually running snapshots script 2024-01-04 00:10:11 +08:00
rich2014
32d712532f UPD: Chinese language file doublecmd.zh_TW.po 2024-01-03 23:57:33 +08:00
rich2014
6adb88ea72 UPD: dmg related scripts updated 2024-01-03 23:48:19 +08:00
rich2014
92456b7880 UPD: create beautiful dmg for macOS 2024-01-03 22:27:53 +08:00
rich2014
e5dd28249d ADD: dmg stuff for macOS 2024-01-03 22:27:53 +08:00
rich2014
986983e9c9 ADD: create-dmg script for macOS 2024-01-03 22:27:53 +08:00
Alexander Koblov
745ae87f4a UPD: Language files 2024-01-03 17:15:40 +03:00
Alexander Koblov
5f16ea304c FIX: Mount point link state (issue #406) 2024-01-03 17:11:59 +03:00
Alexander Koblov
ba24fc8d9a FIX: Mount point bug (fixes #406) 2024-01-03 16:30:08 +03:00
VenusGirl❤
c853cc8eeb
UPD: Korean language file doublecmd.ko.po (#1426) 2024-01-03 13:37:43 +03:00
Skif-off
10830c02ef
UPD: Russian translation (#1427) 2024-01-03 13:36:36 +03:00
Alexander Koblov
794b8e694f UPD: Copyright year 2024-01-02 20:13:37 +03:00
Alexander Koblov
d2bbc98e36 FIX: Alt+Z ambiguous in Polish (fixes #1421) 2024-01-02 19:53:03 +03:00
rich2014
7242b41828 UPD: file format i18n 2024-01-01 00:24:21 +08:00
rich2014
5c842621bd UPD: file format supported in "Other..." dialog 2023-12-31 23:22:01 +08:00
rich2014
80bd221119 ADD: support closing windows with Command+W on macOS 2023-12-31 22:42:34 +08:00
Alexander Koblov
a3ee638979 ADD: Clear system icon cache on file association change 2023-12-30 16:45:16 +03:00
Alexander Koblov
20a161d513 ADD: TStringHashListUtf8.Remove method 2023-12-30 16:35:46 +03:00
Alexander Koblov
0d3d2e7990 FIX: Incomplete thumbnail after auto refresh (issue #1409) 2023-12-30 15:25:56 +03:00
Alexander Koblov
ce720efcfd FIX: Don't cache icons of encrypted files 2023-12-28 22:24:57 +03:00
Alexander Koblov
70fcb79d64 ADD: Scalable folder icon 2023-12-28 18:06:24 +03:00
Alexander Koblov
695ec01ba4 FIX: Default shortcut icons 2023-12-28 18:03:37 +03:00
VenusGirl❤
0cae3b4aef
UPD: Korean language file lclstrconsts.ko.po (#1419)
Correct some spelling and typos
2023-12-26 21:34:27 +03:00
VenusGirl❤
ea6e1b113e
UPD: Korean language file doublecmd.ko.po (#1418)
Correct some spelling and typos
2023-12-26 21:33:42 +03:00
Alexander Koblov
34b882e036 FIX: AddSpecial function (GTK2) 2023-12-26 20:19:23 +03:00
rich2014
c127237193 UPD: debug code removed in TShellContextMenu.FillOpenWithSubMenu() 2023-12-26 21:55:38 +08:00
rich2014
c84e7af695 UPD: Refactor and Simplify menu Delimiter related code 2023-12-26 20:22:12 +08:00
rich2014
cebe949469 UPD: Refactor and Simplify code using CocoaApi instead of Low Level CF Functions in TShellContextMenu.FillOpenWithSubMenu() 2023-12-26 20:17:52 +08:00
rich2014
990501fedd FIX: "Other..." is not added if “Open with" is empty 2023-12-26 20:12:36 +08:00
Alexander Koblov
6b26bf3ddc FIX: Build under Unix 2023-12-26 00:16:16 +03:00
Alexander Koblov
549e8c2550 ADD: Menu translation 2023-12-25 23:36:07 +03:00
Alexander Koblov
9cdef48085 DEL: Obsolete icons 2023-12-25 22:13:48 +03:00
Alexander Koblov
edd65a1abe UPD: Show overlay icons (option behavior) 2023-12-25 22:13:48 +03:00
Alexander Koblov
98fa9d96a2 ADD: BitmapMerge procedure 2023-12-25 22:13:48 +03:00
VenusGirl❤
f16b70c480
ADD: Korean language audioinfo.lng (#1416) 2023-12-25 22:13:23 +03:00
VenusGirl❤
a155953d97
ADD: Korean language file ftp.ko.po (#1415) 2023-12-25 22:12:32 +03:00
VenusGirl❤
f693b23df2
ADD: Korean language file zip.ko.po (#1414) 2023-12-25 22:12:02 +03:00
VenusGirl❤
71ac3ad873
ADD: Korean language file unrar.ko.po (#1413) 2023-12-25 22:11:34 +03:00
VenusGirl❤
b305ddcc31
UPD: Korean language file doublecmd.ko.po (#1412)
Correct all mistranslated errors and complete translation of added untranslated strings
2023-12-25 22:10:43 +03:00
VenusGirl❤
dd3c5e3054
UPD: Korean language file lclstrconsts.ko.po (#1411) 2023-12-25 22:09:26 +03:00
rich2014
2471e90557 ADD: "Other..." added to "Open with" on macOS 2023-12-26 00:17:31 +08:00
rich2014
4573198ba4 UPD #1301: "Open with" menu item ordered, keep consistent with Finder 2023-12-25 23:26:26 +08:00
rich2014
1e9a0bb736 UPD: enable DisplayName on macOS, eg. LSCopyDisplayNameForURL() in "OpenWith" ContextMenu 2023-12-25 22:13:11 +08:00
Alexander Koblov
872078e178 UPD: Highlight active tab (issue #1351) 2023-12-24 15:44:41 +03:00
Alexander Koblov
0fefd265c3 UPD: Highlight active tab (issue #1351) 2023-12-24 15:25:09 +03:00
Alexander Koblov
7635906a13 ADD: Install instruction (macOS) 2023-12-24 14:37:25 +03:00
Alexander Koblov
3ba096d853 UPD: DialogAPI - DialogBoxParam function 2023-12-23 23:58:09 +03:00
Alexander Koblov
5c863fcd2e UPD: Project file (required packages versions) 2023-12-23 23:45:44 +03:00
Alexander Koblov
ff93132469 DEL: Obsolete icon 2023-12-23 22:57:47 +03:00
Alexander Koblov
43bf9df753 FIX: List index out of bounds 2023-12-23 22:55:15 +03:00
Alexander Koblov
4f7eb489a3 FIX: Access violation 2023-12-23 15:23:40 +03:00
Alexander Koblov
cae3081623 ADD: Quick View - status bar popup menu 2023-12-23 14:10:19 +03:00
Alexander Koblov
0ed4d7436a FIX: Division by zero 2023-12-23 13:22:31 +03:00
Alexander Koblov
29ebd0850b UPD: Language files 2023-12-22 22:21:47 +03:00
Alexander Koblov
ed6e5e94b9 ADD: Viewer - Plugins menu 2023-12-22 22:20:58 +03:00
Alexander Koblov
a896af9641 FIX: Windows XP compatibility 2023-12-22 20:54:35 +03:00
Alexander Koblov
dfbfb2d351 UPD: Lazarus version 2023-12-22 20:49:45 +03:00
rich2014
f11073847b UPD: UPD: jump to Home directory instead of Exe directory after decteting the driver unmounted, Keep it consistent with unmouting in DC 2023-12-22 23:39:04 +08:00
Alexander Koblov
021fe137a1 FIX: Update tree view options (hidden objects) 2023-12-21 23:55:27 +03:00
Alexander Koblov
c01d0c0336 UPD: Application bundle icon 2023-12-21 20:05:24 +03:00
rich2014
a50a39b4b7 FIX: the issue that Drive Name changes cannot be automatically updated.
replace kqueue with FSEvent, keep consistent with file monitoring technology.
completely remove dependence on kqueue now.
2023-12-22 00:46:26 +08:00
rich2014
9d7a07b50a ADD: class TSimpleDarwinFSWatcher added 2023-12-21 01:07:01 +08:00
rich2014
2e5b4845de Fix: crash on startup, introduced by 919f3a4, cthreads/cmem should be the first unit 2023-12-21 01:05:52 +08:00
rich2014
1e38a54f66 UPD #1289: change to be case insensitive in Drive List on MacOS 2023-12-21 00:41:31 +08:00
VenusGirl❤
ebbc60642a
Update doublecmd.iss (#1398) 2023-12-20 18:42:04 +03:00
Alexander Koblov
50e61222c3 FIX: Shift+Drag icon from main toolbar to middle toolbar error (fixes #1403) 2023-12-20 18:19:10 +03:00
Alexander Koblov
fb22e6ef95 UPD: Use SafeLoadLibrary function 2023-12-20 18:17:28 +03:00
Alexander Koblov
919f3a4e18 UPD: Initialize error mode early (issue #473) 2023-12-20 18:16:40 +03:00
Alexander Koblov
fe02b0adc8 UPD: Application bundle icon 2023-12-19 21:03:40 +03:00
rich2014
bb2a2a7575 FIX: DragDrop issue when switching APP by Command+Tab on MacOS 2023-12-20 00:18:59 +08:00
Alexander Koblov
211a9b894e FIX: Show macfuse drives (issue #1046) 2023-12-17 22:08:56 +03:00
VenusGirl❤
52c0b84d65
Update lclstrconsts.ko.po (#1397)
Korean update
2023-12-17 22:08:21 +03:00
Alexander Koblov
71d735b2df UPD: Speed up file copying and moving with verify (fixes #1000) 2023-12-17 21:15:29 +03:00
Alexander Koblov
6429138092 ADD: Highlight active tab (issue #1351) 2023-12-17 13:48:10 +03:00
Skif-off
bd9285a1db
ADD: SyncDirs: 'DateTimeFormat' parameter (#1396) 2023-12-17 01:03:52 +03:00
Alexander Koblov
be9ccaa59e FIX: Zip - Don't set attributes when extract symbolic links (fixes #1393) 2023-12-16 14:43:10 +03:00
Alexander Koblov
a3783c6e42 FIX: Release package name format 2023-12-16 13:29:31 +03:00
Alexander Koblov
217222c196 UPD: German language file 2023-12-14 20:41:05 +03:00
rich2014
5fc72aa950 UPD: Simplified Chinese translation 2023-12-15 00:13:56 +08:00
rich2014
3fc926159e UPD: Share to 'Share...' on MacOS 2023-12-14 23:43:56 +08:00
rich2014
b0f249691c UPD: ListToNSArray() refactored to be consistent with ListToNSUrlArray() 2023-12-14 20:01:16 +08:00
rich2014
0cea3e61bd UPD: showMacOSSharingServiceMenu() refactored 2023-12-14 19:59:55 +08:00
rich2014
7b0923c1f7 FIX: memory leaks in Share on MacOS 2023-12-14 19:52:51 +08:00
Alexander Koblov
a6cdf056fc FIX: Bug [0002348] Cannot open empty zip files 2023-12-13 20:29:23 +03:00
Alexander Koblov
fcaa6a5ee8 UPD: Language files 2023-12-13 20:21:38 +03:00
rich2014
a2872814e3 ADD: ContextMenu "Share" i18n 2023-12-13 23:02:43 +08:00
rich2014
0c3f996e0e ADD: Share ContextMenu supported on MacOS 2023-12-13 20:23:37 +08:00
Alexander Koblov
8d11b30b5c UPD: FTP - Component name 2023-12-12 22:04:49 +03:00
Alexander Koblov
5669554329 UPD: Unrar - MsgChoiceBox function 2023-12-12 22:00:35 +03:00
Alexander Koblov
1fdccb4e36 UPD: DialogAPI - MsgChoiceBox function 2023-12-12 21:58:34 +03:00
Alexander Koblov
9bc15f97b2 ADD: DialogAPI - TSynEdit control messages 2023-12-12 20:54:30 +03:00
Alexander Koblov
e9d43cf414 FIX: FTP - Show file properties dialog 2023-12-11 19:38:25 +03:00
Alexander Koblov
f0320f65ce ADD: FTP - Show file properties dialog 2023-12-10 22:42:29 +03:00
Alexander Koblov
1d3f9bdd83 ADD: FTP - Show file overwrite dialog (remote copy) 2023-12-10 19:10:33 +03:00
Alexander Koblov
8883b6936a ADD: FTP - copy files between remote directories (SSH) 2023-12-10 18:57:14 +03:00
Alexander Koblov
66bc5720c5 FIX: Quick View - view file with same name and different path in flat view mode 2023-12-10 13:08:17 +03:00
Alexander Koblov
8834eb44e7 UPD: German language file 2023-12-09 14:51:45 +03:00
Alexander Koblov
0f6cf04319 ADD: Unrar - Show error message when Rar executable not found (fixes #1388) 2023-12-09 14:48:03 +03:00
Alexander Koblov
dfa30dbf62 UPD: INI file highlighter - hash sign comments (minimal Lazarus version) 2023-12-09 00:52:26 +03:00
Alexander Koblov
ca1bf8c4b0 FIX: Custom columns - Load inactive mark color (fixes #1389) 2023-12-08 19:50:24 +03:00
Alexander Koblov
47fd6c736b FIX: File not found exception 2023-12-05 19:58:07 +03:00
Alexander Koblov
0f062a7138 FIX: Drag&Drop into PowerPro 2023-12-05 00:16:15 +03:00
Alexander Koblov
766792120e UPD: Wfx-plugin header 2023-12-04 23:08:06 +03:00
Alexander Koblov
7c398cfca6 UPD: KAScrypt description 2023-12-04 22:42:12 +03:00
Alexander Koblov
950c479527 UPD: Rename DCPcrypt to KAScrypt 2023-12-04 20:25:15 +03:00
Alexander Koblov
74fcee4467 ADD: INI file highlighter - enable hash sign comments 2023-12-03 19:57:36 +03:00
Alexander Koblov
91b57011ee FIX: Build under 32 bit 2023-12-03 17:03:38 +03:00
Alexander Koblov
acf3d13b64 FIX: Drag-and-dropping a picture (JPG, PNG, ...) from Firefox to Double Commander changes the type to BMP (fixes #1383) 2023-12-03 14:46:38 +03:00
Alexander Koblov
93f57286d3 FIX: HTTP Browser plugin compatibility 2023-12-03 14:46:38 +03:00
Alexander Koblov
822bb09f8f ADD: Editor - disable save action with read-only file (fixes #1379) 2023-12-03 12:22:18 +03:00
Alexander Koblov
7720dd970e ADD: FileIsReadOnly function 2023-12-03 12:17:07 +03:00
Alexander Koblov
a0c19151b5 FIX: Hangs when cannot open/create file with elevation (issue #1379) 2023-12-02 23:19:36 +03:00
Skif-off
4cbf094658
UPD: Russian translation (#1382) 2023-12-02 21:24:07 +03:00
Alexander Koblov
02edc2c392 UPD: Language files 2023-12-02 19:04:15 +03:00
Alexander Koblov
fef6ce8dc2 UPD: Language files 2023-12-02 18:13:21 +03:00
Alexander Koblov
a509abc40d UPD: Prepare GTK3 support 2023-12-02 18:08:58 +03:00
Alexander Koblov
3998581673 FIX: Range check error 2023-12-02 15:41:12 +03:00
Alexander Koblov
99b821e879 UPD: Refactoring 2023-12-02 13:12:36 +03:00
Alexander Koblov
5cb86ee55b FIX: Default hash file format (issue #1183) 2023-12-01 20:29:34 +03:00
Alexander Koblov
cc19b745ae ADD: Capability to choose hash file format (fixes #1183) 2023-11-30 22:56:05 +03:00
rich2014
84c5074511 Fix #1350: Access violation in hot keys options dialog 2023-11-29 23:00:59 +08:00
Alexander Koblov
fc91f7c954 FIX: Quick View - load next file with plugins 2023-11-28 19:53:35 +03:00
Alexander Koblov
4b6bfe3345 FIX: Save last error 2023-11-28 19:51:34 +03:00
Alexander Koblov
0d6d4d4e94 FIX: Differ - Invalid type cast (fixes #1374) 2023-11-27 20:17:01 +03:00
Alexander Koblov
d067079e0a FIX: Bug [0001778] WLX plugin Imagine lock current directory 2023-11-26 16:22:06 +03:00
Alexander Koblov
9e97bc10d5 ADD: FTP - SSH-agent authentication (issue #1133) 2023-11-26 13:27:56 +03:00
Demetrius flavious
4d8b7b8b16
FIX: Shell execute for parent directory (fixes #1354) (#1364) 2023-11-25 17:32:50 +03:00
Alexander Koblov
d34dfa7339 UPD: German language file 2023-11-25 16:56:01 +03:00
Alexander Koblov
cad91f4210 UPD: Disable debug messages (fixes #1370) 2023-11-24 20:41:13 +03:00
rich2014
b43710b786 FIX: Lazarus/Lcl/Cocoa compatibility 2023-11-22 01:50:43 +08:00
Alexander Koblov
539c6215d7 FIX: Close button autosize (fixes #1368) 2023-11-21 20:21:18 +03:00
Alexander Koblov
3ef7774bdf UPD: Clean up 2023-11-20 19:57:13 +03:00
Alexander Koblov
6443c5b638 FIX: Drawing icons without alpha channel 2023-11-20 18:20:25 +03:00
Alexander Koblov
1a1f2e58f0 UPD: Read version number from project file 2023-11-19 21:32:24 +03:00
Alexander Koblov
f7b4475541 FIX: Lazarus 3.0 compatibility (workaround) 2023-11-19 21:14:24 +03:00
rich2014
79900ca898 FIX: Lazarus/Lcl/Cocoa compatibility 2023-11-19 22:01:32 +08:00
Alexander Koblov
7281a8d6ec FIX: Build under Windows 2023-11-19 15:35:18 +03:00
Alexander Koblov
0d97682dc6 FIX: Plugins under Haiku x86_64 (workaround) 2023-11-19 14:50:42 +03:00
Demetrius flavious
2c58fbdc14
ADD: custom directory separator when copying file names to clipboard (#1352) 2023-11-19 11:18:12 +03:00
Alexander Koblov
30c36c5de0 FIX: FTP - Warning about TLS support 2023-11-18 16:31:12 +03:00
Alexander Koblov
6a57688876 FIX: Internal editor F4 edit crash (issue #1358) 2023-11-18 13:39:44 +03:00
Alexander Koblov
ceeffbaef6 ADD: FTP - OpenSSL 3 support 2023-11-18 11:19:30 +03:00
Alexander Koblov
e3d7ac1a0f UPD: Synapse library 2023-11-18 11:18:07 +03:00
Alexander Koblov
6fe082419e ADD: FTP - Print TLS details 2023-11-17 20:33:30 +03:00
Alexander Koblov
e39d537380 ADD: FTP - reuse ssl session for data connection (GnuTLS) 2023-11-17 20:30:47 +03:00
Alexander Koblov
0c25b15d41 FIX: FTP - Don't load GnuTLS library when other already used 2023-11-16 19:12:29 +03:00
Alexander Koblov
5493a63874 UPD: FTP - Rewrote GnuTLS units 2023-11-16 18:20:23 +03:00
Alexander Koblov
3a2045b399 UPD: FTP - Synapse blcksock unit 2023-11-16 18:11:23 +03:00
Alexander Koblov
072063b8a8 FIX: Viewer - Prevent view directory in the non-local file system 2023-11-15 22:34:06 +03:00
Alexander Koblov
e56beb368f UPD: Set run-time library search path (fixes #276, #1316) 2023-11-15 20:33:24 +03:00
Alexander Koblov
7d70bc3539 ADD: Hotkey for queue button in the confirmation dialogs (fixes #1232) 2023-11-15 18:16:29 +03:00
Alexander Koblov
6e544ccfc7 UPD: FTP - Disable Schannel TLS/SSL (fixes #437) 2023-11-14 21:01:26 +03:00
Alexander Koblov
7168ebf8c8 FIX: Number of different files not updated during the directory comparison (fixes #328) 2023-11-14 20:56:27 +03:00
Alexander Koblov
522e3d507f ADD: Export DC_CONFIG_PATH environment variable 2023-11-14 18:18:56 +03:00
Alexander Koblov
6bb8c1c67f UPD: Set run-time library search path (fixes #276, #1316) 2023-11-14 18:09:03 +03:00
Alexander Koblov
db18ea0f38 FIX: Native dark mode flags (Windows >= 10) 2023-11-13 21:05:11 +03:00
Alexander Koblov
7ed543a1c5 FIX: Don't load same wlx-plugin multiple times 2023-11-13 20:07:12 +03:00
Alexander Koblov
8e155150a9 FIX: Differ shows "identical" on different files (fixes #1338) 2023-11-12 15:15:52 +03:00
Alexander Koblov
c299330174 UPD: Language files 2023-11-11 14:30:08 +03:00
Alexander Koblov
ece8367329 FIX: Differ shows "identical" on different files (fixes #1338) 2023-11-11 14:29:01 +03:00
Alexander Koblov
1705059397 FIX: Crash with libfontconfig under Linux i386 2023-11-06 20:12:35 +03:00
Alexander Koblov
24838d18f3 ADD: TFileSystemWatcher.Features function 2023-11-04 14:19:42 +03:00
Skif-off
38e7edf2cd
ADD: Editor - 'Group Undo' option (#1331) 2023-11-04 13:59:21 +03:00
Alexander Koblov
f5539c640a FIX: Cannot extract symbolic links from ZIP archives (fixes #1332) 2023-11-04 13:55:02 +03:00
Alexander Koblov
d5f3755e61 FIX: Cannot extract symbolic links from ZIP archives (fixes #1332) 2023-11-04 13:24:29 +03:00
Alexander Koblov
bb213486a3 UPD: Unrar - Language files 2023-10-31 20:37:45 +03:00
Alexander Koblov
3b7ddb2524 ADD: Unrar 7 support 2023-10-31 20:34:58 +03:00
Alexander Koblov
8dee95cc1b UPD: mbReadFileToString function 2023-10-31 20:11:44 +03:00
Alexander Koblov
566b1b75e4 ADD: DialogAPI - MsgChoiceBox and DialogBoxParam functions 2023-10-31 20:05:57 +03:00
Alexander Koblov
236c6a143f ADD: Allow to view directories by cm_View (fixes #1323) 2023-10-29 16:56:38 +03:00
Alexander Koblov
4265a6089b FIX: Refresh a file list after file rename in the flat view mode (issue #1322) 2023-10-29 16:12:13 +03:00
Alexander Koblov
76a5f8025b FIX: Access violation on attempt to edit directory in file search results (fixes #949) 2023-10-27 19:41:35 +03:00
Alexander Koblov
5777435901 FIX: Non-integer input using audioinfo Search plugin causes error/crash (fixes #922) 2023-10-27 19:39:20 +03:00
Alexander Koblov
d4742bcb40 FIX: About dialog - close button position 2023-10-27 19:36:29 +03:00
Alexander Koblov
d80d94ef3e FIX: About dialog - close button position 2023-10-26 22:11:37 +03:00
Alexander Koblov
585e804c10 UPD: Create hardlink and symlink dialogs 2023-10-25 23:18:28 +03:00
Alexander Koblov
28d13ee123 FIX: Environment variables are case sensitive under Unix 2023-10-25 22:26:35 +03:00
Alexander Koblov
fe32a00340 ADD: Network connect button (fixes #265) 2023-10-25 22:22:41 +03:00
Alexander Koblov
0991a28b23 UPD: Combine files - show dialog at the main form center 2023-10-25 22:10:48 +03:00
Alexander Koblov
0946eb1a47 FIX: Combine files dialog autosize 2023-10-25 21:59:12 +03:00
Alexander Koblov
bea36afb82 UPD: About dialog 2023-10-25 20:23:41 +03:00
Alexander Koblov
6c21e2adb8 FIX: Buttons autosize 2023-10-25 19:32:30 +03:00
Alexander Koblov
25ec4cc253 FIX: Buttons autosize 2023-10-25 19:21:49 +03:00
Alexander Koblov
997407ba22 FIX: Symlink form autosize 2023-10-25 19:05:24 +03:00
Alexander Koblov
3c3f408f70 UPD: GetCurrentIconTheme function 2023-10-23 21:38:31 +03:00
Alexander Koblov
9f1a98a1b8 ADD: Fly desktop environment 2023-10-23 21:30:45 +03:00
Alexander Koblov
d6248457c5 FIX: Save XML-config into symbolic link 2023-10-21 21:53:26 +03:00
Alexander Koblov
7f38508f46 FIX: Save XML-config into symbolic link 2023-10-21 17:03:13 +03:00
Alexander Koblov
63dd485b34 ADD: Set process current directory when execute <?..?> command 2023-10-21 13:21:39 +03:00
Alexander Koblov
fbb03850c5 UPD: Use TempFileSystemFileSource 2023-10-21 01:34:23 +03:00
Alexander Koblov
27f7173c53 FIX: File full path corruption 2023-10-21 00:41:46 +03:00
Alexander Koblov
dec24438eb ADD: Viewer - allow quick view using internal associations with '{!DC-VIEWER}' command 2023-10-21 00:31:54 +03:00
Alexander Koblov
9d9157e6e1 UPD: Viewer - load previous/next file hotkeys 2023-10-20 21:11:53 +03:00
Alexander Koblov
10823479aa ADD: Viewer - SynEdit use editor settings 2023-10-20 20:48:17 +03:00
Alexander Koblov
e3a3e63dba ADD: Viewer - SynEdit use editor settings 2023-10-19 18:18:22 +03:00
Alexander Koblov
2d581148ee ADD: Feature [0001289] Store tabs in a separate config file 2023-10-19 18:13:49 +03:00
rich2014
f6a7835bd7 Fix #1312: Key Event eaten by QLPreviewView 2023-10-15 15:07:39 +08:00
rich2014
f4a5ad5ef0 Fix: Cocoa/TKASPathEdit: call AutoComplete() only when changed by user now 2023-10-14 21:25:13 +08:00
rich2014
41d9b7e830 UPD: SplashForm: simplify Panel using default color, compatible with new version of Lazarus
1. adapt to new version on cocoa
2. the appearance on all platforms remains the same
3. see also: f49aedaf1f
2023-10-14 21:25:13 +08:00
Alexander Koblov
27d7666e45 ADD: Viewer - scroll by up/down/pageup/pagedown/left/right keys when caret disabled 2023-10-14 00:55:18 +03:00
Alexander Koblov
4cf86dd929 FIX: FileSystemWatcher - 'rename' event under Linux 2023-10-13 19:57:31 +03:00
Mihaly Nyilas
2ff00ae905
UPD: Hungarian language file (#1314) 2023-10-11 23:19:29 +03:00
Alexander Koblov
d8bc7ce213 UPD: TXzDecompressionStream.Seek function 2023-10-09 19:45:44 +03:00
Alexander Koblov
a7f80e5fd1 FIX: Range check error (fixes #1292) 2023-10-09 19:36:06 +03:00
Alexander Koblov
493987e2e4 UPD: Don't show menu separator when it's not required 2023-10-09 18:39:38 +03:00
Alexander Koblov
f4c82e3c7a FIX: Crash - configure custom columns (issue #1310) 2023-10-09 18:37:02 +03:00
Alexander Koblov
f586b0c1cc FIX: Wrong rows height 2023-10-08 23:50:26 +03:00
Alexander Koblov
c968b0de67 FIX: ELayoutException: Position range overflow (issue #736) 2023-10-08 17:25:46 +03:00
Alexander Koblov
873d4fcd5c FIX: Build deb_wdx 2023-10-08 16:19:58 +03:00
Alexander Koblov
6ee8e81d6d ADD: Open with other from flatpak sandbox (issue #309)
FIX: Memory leak
2023-10-08 13:01:58 +03:00
Alexander Koblov
dc49a59a9c FIX: Test archive operation progress 2023-10-08 01:24:47 +03:00
Alexander Koblov
bf1a1e61df UPD: Zip - readme.txt 2023-10-07 19:25:59 +03:00
Alexander Koblov
5c0192a445 UPD: Zip - increase buffer size 2023-10-07 19:07:55 +03:00
Alexander Koblov
34841ed2c8 UPD: Better archive file operations progress indication 2023-10-07 18:54:07 +03:00
Alexander Koblov
d0a4cbd864 FIX: Zip - show correct compression progress
ADD: Zip - create .tar.* archives at one step
2023-10-07 18:51:45 +03:00
Alexander Koblov
c7c51230d1 ADD: Zip - show total progress when compress 2023-10-06 20:22:02 +03:00
Alexander Koblov
f89ab9056e ADD: Zip - show total progress when extract 2023-10-06 19:31:23 +03:00
Alexander Koblov
dca8d10726 ADD: Operation progress - show only percent when size unknown 2023-10-06 19:19:32 +03:00
Alexander Koblov
0ec75f36bc FIX: Read image using libturbojpeg library under macOS (fixes #1300) 2023-10-04 20:30:04 +03:00
Alexander Koblov
9c22daae6a FIX: Loading the same Thumbnails multiple times in TThumbFileView (fixes #1295) 2023-10-02 20:11:08 +03:00
rich2014
9bb0aea519 UDP: treat wsFullScreen as Maximized when saving Main Form WindowState 2023-10-01 20:41:05 +08:00
rich2014
bb0f0026b5 UPD: Cocoa: workaround code about WindowState removed by new Lcl/Cocoa version 2023-10-01 20:32:22 +08:00
Alexander Koblov
ad3298dd23 UPD: Don't open X-display under Wayland 2023-09-30 14:02:09 +03:00
Alexander Koblov
dd9704a8a3 ADD: Move file to trash from flatpak sandbox (issue #309) 2023-09-30 11:22:48 +03:00
Alexander Koblov
6a8b3fe1d5 ADD: O_PATH constant 2023-09-30 11:05:44 +03:00
Alexander Koblov
782d208d9b FIX: Build under non macOS 2023-09-29 22:48:18 +03:00
Alexander Koblov
337c6ef4dc FIX: Wrong byte order when read JPEG image using libturbojpeg under macOS (issue #1290) 2023-09-29 22:37:47 +03:00
rich2014
7f5efba427 FIX & UPD #1290: generate thumbnails by system native QuickLook on MacOS 2023-09-29 14:37:09 +08:00
Alexander Koblov
e81933aff0 ADD: Viewer - scroll by up/down keys when caret disabled (fixes #1267) 2023-09-28 23:01:38 +03:00
Alexander Koblov
70262a35d4 FIX: Don't expand a virtual path under Windows 2023-09-28 19:45:56 +03:00
Alexander Koblov
5712b87023 UPD: Use xdg-open to open files from flatpak sandbox (issue #309) 2023-09-28 19:41:39 +03:00
Alexander Koblov
1efe181fd2 FIX: Don't show garbage mounts from flatpak sandbox (issue #309) 2023-09-28 18:26:41 +03:00
Alexander Koblov
ed026035ed UPD: Don't show directory change error on start 2023-09-26 23:36:02 +03:00
Alexander Koblov
aee27d7f2e FIX: Drag&Drop - move file when drop it on the tab by left + right mouse button (fixes #1287) 2023-09-25 20:03:16 +03:00
rich2014
cf0fd59892 UPD: AutoRefresh: further optimize the processing of sub-directory events
fswatch does not callback with sub-directory events, when no directory has FlatView enabled (most of the time)
2023-09-25 23:08:21 +08:00
rich2014
b40d8f44de UPD #1278: About and Preferences added to AppMenu 2023-09-25 18:40:12 +08:00
rich2014
1f71a393a3 FIX: SplashForm: OnCLose missed before 2023-09-25 18:37:42 +08:00
Alexander Koblov
7abd581bc3 FIX: ShowModal function 2023-09-24 22:19:03 +03:00
Alexander Koblov
ee83513936 UPD: Viewer - don't show print menu when unavailable (fixes #1291) 2023-09-24 21:59:54 +03:00
rich2014
c2d947bf17 Fix #1274: the windows are not correctly enabled after multiple ShowModal() 2023-09-24 23:01:32 +08:00
Alexander Koblov
ce81d4bbde FIX: Find files - search hex sequence 2023-09-23 22:05:30 +03:00
rich2014
8a52783969 Fix: AutoRefresh: compilation issue on Windows and Linux 2023-09-23 22:27:17 +08:00
rich2014
8494d60e8a UPD #1266: AutoRefresh: subdirectory events are only handled in FlatView mode 2023-09-23 21:47:23 +08:00
Alexander Koblov
443fc6d370 FIX: Portable any map graphic format reader 2023-09-22 20:57:01 +03:00
Alexander Koblov
bba5731565 FIX: Sorting files/folders ignores Case sensitivity on Cyrillic names (fixes #1277) 2023-09-21 20:45:20 +03:00
Matej
f78d4171bb
Update lclstrconsts.sl.po (#1261)
Updated Slovenian translation.
2023-09-19 08:04:00 +03:00
Alexander Koblov
4ee3818bb8 FIX: Empty dir size in status bar calculates to -1 (fixes #1268) 2023-09-17 14:52:44 +03:00
Alexander Koblov
5605cc3d8a FIX: ImageMagick 7 compatibility
FIX: Crash on close when ImageMagick not found
2023-09-17 14:47:23 +03:00
Alexander Koblov
d98d27d833 FIX: Drag&Drop - restore selection of active file when start drag with control key pressed 2023-09-14 20:39:25 +03:00
Demetrius flavious
b26aba0b28
Fix: missing 'mbExpandFileName' invocations for 273759d1 for issue #130 (#1259) 2023-09-12 21:20:18 +03:00
Alexander Koblov
e9835c734d ADD: Haiku support 2023-09-09 18:02:33 +03:00
Demetrius flavious
273759d119
Fix: directory change to non-normalized paths - issue #130 (#1061) 2023-09-09 17:19:41 +03:00
Alexander Koblov
0115f01430 ADD: Zip - save password to cache (issue #1254) 2023-09-09 14:55:04 +03:00
Alexander Koblov
f3f6a20fbb FIX: Files associations made in KDE doesn't affect Double Commander (fixes #637) 2023-09-09 13:42:43 +03:00
Alexander Koblov
e2e3ac9031 FIX: Change zip plugin configuration force quits (fixes #1233) 2023-09-09 13:34:21 +03:00
Alexander Koblov
4b16ac8d95 UPD: Language files 2023-09-08 23:03:37 +03:00
Alexander Koblov
7b3df5558d FIX: Quick View - focus wrong control when load file from archive (issue #1254) 2023-09-08 22:43:12 +03:00
Alexander Koblov
8d04bf014d FIX: Wrong background with gtk2 theme Gnome OSX-IV-1.3 (fixes #32) 2023-09-08 21:25:41 +03:00
rich2014
b2129d7790 UPD: remove unnecessary code, and improve MainForm display 2023-09-03 19:22:37 +08:00
rich2014
623185b685 UPD & FIX: handle Splash Form consistently across all platforms, especially on MacOS
1. more Lazarus’ idioms for SplashForm (like Lazarus IDE)
2. SplashForm can be shown correctly on MacOS
3. improved display of SplashForm in Gt2k
4. tested on Win32, Gtk2, Qt5, Cocoa
2023-09-03 19:20:36 +08:00
Matej
6b55aa43f0
Update doublecmd.sl.po (#1248)
This is an update to Slovenian translation. I get an error, when Previewing the changes, but have no idea how to resolve it.
2023-09-02 14:29:59 +03:00
Alexander Koblov
15c1cc8fdf FIX: Viewer find skips first matching occurrence (fixes #1250) 2023-08-31 21:54:01 +03:00
Alexander Koblov
a815a476e6 FIX: Load libheif.dll and it dependencies from the same path 2023-08-31 20:08:51 +03:00
Alexander Koblov
9f2e26306e ADD: Load library from system PATH 2023-08-31 20:07:02 +03:00
Paul Gessos
0fc983fe24
Update doublecmd.el.po until line 4200 (#1247) 2023-08-30 07:14:06 +03:00
Alexander Koblov
65cc9a9597 UPD: Sort icons color 2023-08-19 13:33:27 +03:00
Alexander Koblov
4e98bfd650 ADD: Build snapshots with unrar library 2023-08-18 22:06:14 +03:00
Alexander Koblov
d1d603bcdf ADD: Build snapshots with unrar library 2023-08-18 22:02:06 +03:00
Alexander Koblov
e9172af6ee FIX: Crash with invalid file view type (fixes #1231) 2023-08-18 21:22:08 +03:00
sitiom
4c4ea18ca7
Change Winget Releaser job to ubuntu-latest (#1230) 2023-08-18 08:19:18 +03:00
Alexander Koblov
e663df72d5 FIX: SyncDirs - create target subdirectory (fixes #1227) 2023-08-16 21:17:48 +03:00
Alexander Koblov
33014e2afd FIX: Date & Time formatting in Options default preset cannot get it back if change it (fixes #1225) 2023-08-15 21:39:59 +03:00
Alexander Koblov
7c1296856c FIX: SevenZip - heap corruption 2023-08-15 19:48:22 +03:00
Alexander Koblov
315b3f0e0d FIX: SevenZip - double-free (VT_BSTR) 2023-08-14 19:58:35 +03:00
Alexander Koblov
de65350e17 FIX: cm_AddPlugin - case insensitive pluginst.inf check 2023-08-13 15:18:35 +03:00
Alexander Koblov
27a9940505 UPD: File properties dialog - enable user/group autocomplete 2023-08-12 16:37:10 +03:00
Alexander Koblov
16e028c05f FIX: Folder size within disk images not shown (fixes #1219) 2023-08-12 14:14:37 +03:00
Alexander Koblov
3627522862 FIX: Changing the "Open as" encoding of a newly created file clears text editor (fixes #1001) 2023-08-10 23:32:13 +03:00
Alexander Koblov
6de0f92dcb UPD: File properties dialog - allow manual user/group change 2023-08-10 19:29:06 +03:00
Graham Inggs
10c259525e
Update clean.sh (#1214)
Clean temporary file plugins/wcx/zip/lib/ZipLng.rsj
2023-08-09 16:25:10 +03:00
Alexander Koblov
050945901d UPD: Read version number from doublecmd.lpi 2023-08-08 21:02:23 +03:00
Alexander Koblov
c8c2d0faf8 ADD: Show portable devices in the drive list (issue #1211) 2023-08-07 22:15:22 +03:00
Alexander Koblov
c9186d1e81 FIX: Zip - crash in the options dialog 2023-08-06 18:00:33 +03:00
rich2014
bcef15a228 UPD: asterisk added to the hint to mark the Tab Locked 2023-08-06 09:38:44 +08:00
Alexander Koblov
70bdd45fa4 FIX: Combining to file with one of the part's full name fails with deleting this part (fixes #1198) 2023-08-05 20:09:30 +03:00
rich2014
bc8f7ac3c2 FIX #1195: wrong hint is shown when Mouse Move in the blank of the TabControl 2023-08-05 22:04:25 +08:00
rich2014
421417a09b UPD: hint in TFileViewHeader improved 2023-08-05 21:47:59 +08:00
rich2014
623358eb14 Fix #1187: wrong height of Header in empty TColumnsFileView 2023-08-05 21:42:52 +08:00
Alexander Koblov
85720b46e3 UPD: Install scripts (Windows) 2023-08-05 10:56:46 +03:00
Alexander Koblov
74c15bb648 FIX: Read zero minor version 2023-08-05 00:33:32 +03:00
Alexander Koblov
354eae9bcb FIX: Broken link icon with cm_FlatViewSel 2023-08-04 22:25:48 +03:00
rich2014
c1d4cebee4 Fix: wrong hints of PathLabel 2023-08-04 23:35:57 +08:00
Alexander Koblov
fac7aade70 ADD: Create *.msi package 2023-08-03 23:35:17 +03:00
Alexander Koblov
182981fb0c FIX: [0001897] MSI Installer Does Not Ask for Installation Destination (issue #611) 2023-08-03 23:34:44 +03:00
Alexander Koblov
13f9a14f4f UPD: GVFS - don't unescape drive path 2023-08-02 22:16:48 +03:00
Alexander Koblov
9ed66b26ce FIX: Exif - don't show invalid date 2023-08-02 22:04:43 +03:00
Alexander Koblov
06391ac736 FIX: Unix mode 2023-08-02 20:13:54 +03:00
Alexander Koblov
7beaff2b48 FIX: Publish to WinGet 2023-08-02 20:09:53 +03:00
Alexander Koblov
c6f455c676 ADD: Release workflow (macOS) 2023-08-02 20:07:23 +03:00
rich2014
889d3c705a FIX #1184: Cancel Button in fQuickSearch 2023-08-02 18:26:18 +08:00
Alexander Koblov
d7cbbfac0e UPD: Polish translation 2023-08-01 23:29:27 +03:00
Alexander Koblov
d5255624c6 UPD: Beta version number format 2023-08-01 23:28:08 +03:00
Alexander Koblov
185c437877 UPD: Beta version number format 2023-07-31 20:00:42 +03:00
Alexander Koblov
9ae1cbc152 FIX: Exif plugin - detect string 2023-07-31 19:30:01 +03:00
Alexander Koblov
0be7fae2bd UPD: Disable 'last search' button at start (fixes #176) 2023-07-31 19:28:39 +03:00
Alexander Koblov
03483a1044 FIX: Hotkey labels from Keys show up in toolbar hover info tags (fixes #1044) 2023-07-30 13:57:24 +03:00
Alexander Koblov
f036b26454 FIX: Text viewer cannot show text with filesize>=2G (fixes #958) 2023-07-30 00:09:36 +03:00
Alexander Koblov
dd927285d0 FIX: The symbolic link to the directory appears twice during synchronization (fixes #1053) 2023-07-29 23:35:19 +03:00
Alexander Koblov
ef08388b48 UPD: Use GitHub Discussions to suggest a new feature or improvement 2023-07-29 18:34:45 +03:00
Alexander Koblov
b07956b2cf UPD: Lazarus version 2023-07-29 17:13:10 +03:00
Alexander Koblov
de1ca78cc3 FIX: About dialog - crash 2023-07-29 15:33:07 +03:00
Alexander Koblov
274c712458 UPD: German language file 2023-07-29 15:27:42 +03:00
rich2014
ab64636e64 Fix: ESC handle in Ask Dialog 2023-07-26 21:52:24 +08:00
rich2014
ba2c077600 UPD: simplify the reference to NSAPP 2023-07-25 22:04:27 +08:00
rich2014
39b5ed90bc UPD: Cocoa: workaround code about edtCommand removed by new Lcl/Cocoa version 2023-07-23 18:54:22 +08:00
rich2014
8359ee6da1 Fix: ESC handle in About Dialog 2023-07-23 18:32:18 +08:00
Alexander Koblov
2efbd8515c FIX: AudioInfo - don't show invalid 'Track (zero-filled)' field 2023-07-21 12:10:47 +03:00
Alexander Koblov
27e23900bf FIX: AudioInfo - read track number 2023-07-21 11:41:49 +03:00
Alexander Koblov
b9b1e6fc03 FIX: ColorBox vertical spacing 2023-07-21 11:16:30 +03:00
Alexander Koblov
266dd8593a FIX: Build under Haiku 2023-07-20 15:35:25 +03:00
Alexander Koblov
e09a5ad052 UPD: Free Pascal and Lazarus versions 2023-07-20 15:31:01 +03:00
Alexander Koblov
b322c5c0b3 UPD: Version number 2023-07-20 13:49:13 +03:00
1173 changed files with 186419 additions and 120467 deletions

View file

@ -1,6 +1,9 @@
blank_issues_enabled: true
blank_issues_enabled: false
contact_links:
- name: Feature request
url: https://github.com/doublecmd/doublecmd/discussions/categories/suggestions
about: Please use GitHub Discussions to suggest a new feature or improvement
- name: I have a question about Double Commander
url: https://github.com/doublecmd/doublecmd/discussions
url: https://github.com/doublecmd/doublecmd/discussions/categories/general
about: Please use GitHub Discussions to ask questions

View file

@ -1,22 +0,0 @@
name: "Feature request"
labels: [enhancement]
description: Suggest a new feature or improvement
body:
- type: markdown
attributes:
value: |
Before filling a new feature request, please use the [search form](https://doublecmd.sourceforge.io/mantisbt/view_all_bug_page.php) to try to locate similar features at the old bug tracker.
- type: textarea
attributes:
label: Description
placeholder:
validations:
required: true
- type: textarea
attributes:
label: Proposed technical implementation details (optional)
placeholder:
validations:
required: false

7
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

112
.github/scripts/create_release.sh vendored Executable file
View file

@ -0,0 +1,112 @@
#!/bin/bash
# The new package will be saved here
PACK_DIR=$PWD/doublecmd-release
# Temp dir for creating *.dmg package
BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
# Save revision number
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
# Read version number
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
# Set widgetset
export lcl=cocoa
mkdir -p $PACK_DIR
# Update application bundle version
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleVersion $DC_REVISION
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleShortVersionString $DC_VER
plutil -convert xml1 $(pwd)/doublecmd.app/Contents/Info.plist
chmod 644 $(pwd)/doublecmd.app/Contents/Info.plist
build_unrar()
{
DEST_DIR=$(pwd)/install/darwin/lib/$CPU_TARGET
pushd /tmp/unrar
make clean lib CXXFLAGS+="-std=c++14 -DSILENT --target=$TARGET" LDFLAGS+="-dylib --target=$TARGET"
mkdir -p $DEST_DIR && mv libunrar.so $DEST_DIR/libunrar.dylib
popd
}
build_doublecmd()
{
# Build all components of Double Commander
./build.sh release
# Copy libraries
cp -a install/darwin/lib/$CPU_TARGET/*.dylib ./
# Prepare *.dmg package
mkdir -p $BUILD_PACK_DIR
install/darwin/install.sh $BUILD_PACK_DIR
pushd $BUILD_PACK_DIR
mv doublecmd.app 'Double Commander.app'
codesign --deep --force --verify --verbose --sign '-' 'Double Commander.app'
popd
# Create *.dmg package
HDI_TRY=1
while [ $HDI_TRY -le 5 ]; do
echo "Try to create a package $HDI_TRY ..."
# Bug: https://github.com/actions/runner-images/issues/7522
echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true;
echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done;
install/darwin/create-dmg/create-dmg \
--volname "Double Commander" \
--volicon "$BUILD_PACK_DIR/.VolumeIcon.icns" \
--background "$BUILD_PACK_DIR/.background/bg.jpg" \
--window-pos 200 200 \
--window-size 680 366 \
--text-size 16 \
--icon-size 128 \
--icon "Double Commander.app" 110 120 \
--app-drop-link 360 120 \
--icon "install.txt" 566 123 \
--icon ".background" 100 500 \
"$PACK_DIR/doublecmd-$DC_VER.$lcl.$CPU_TARGET.dmg" \
"$BUILD_PACK_DIR/"
if [ $? -eq 0 ]; then
break
fi
HDI_TRY=$((HDI_TRY+1))
sleep 10
done
# Clean DC build dir
./clean.sh
rm -f *.dylib
rm -rf $BUILD_PACK_DIR
}
# Set processor architecture
export CPU_TARGET=aarch64
export TARGET=arm64-apple-darwin
# Set minimal Mac OS X target version
export MACOSX_DEPLOYMENT_TARGET=11.0
build_unrar
build_doublecmd
# Set processor architecture
export CPU_TARGET=x86_64
export TARGET=x86_64-apple-darwin
# Set minimal Mac OS X target version
export MACOSX_DEPLOYMENT_TARGET=11.0
build_unrar
build_doublecmd

View file

@ -1,7 +1,4 @@
rem Set Double Commander version
set DC_VER=1.1.0
rem The new package will be created from here
set BUILD_PACK_DIR=%TEMP%\doublecmd-release
@ -15,12 +12,20 @@ rem Get revision number
call src\platform\git2revisioninc.exe.cmd %CD%
echo %REVISION%> %PACK_DIR%\revision.txt
rem Read version number
for /f tokens^=2delims^=^" %%a in ('findstr "MajorVersionNr" src\doublecmd.lpi') do (set DC_MAJOR=%%a)
for /f tokens^=2delims^=^" %%a in ('findstr "MinorVersionNr" src\doublecmd.lpi') do (set DC_MINOR=%%a)
for /f tokens^=2delims^=^" %%a in ('findstr "RevisionNr" src\doublecmd.lpi') do (set DC_MICRO=%%a)
if [%DC_MINOR%] == [] set DC_MINOR=0
if [%DC_MICRO%] == [] set DC_MICRO=0
set DC_VER=%DC_MAJOR%.%DC_MINOR%.%DC_MICRO%
rem Change log
git log -n 10 --format="%%h %%al %%ai%%n%%s%%n" > %PACK_DIR%\changelog.txt
rem Get libraries
pushd install
curl -o windows.7z -L https://github.com/doublecmd/snapshots/raw/main/windows.7z
curl -o windows.7z -L https://github.com/doublecmd/external/raw/main/windows.7z
"%ProgramFiles%\7-Zip\7z.exe" x windows.7z
del /Q windows.7z
popd

55
.github/scripts/create_snapshot.lnx vendored Executable file
View file

@ -0,0 +1,55 @@
#!/bin/bash
# The new package will be saved here
PACK_DIR=$PWD/doublecmd-release
# Temp dir for creating *.tar.xz package
BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
# Save revision number
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
# Read version number
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
# Get libraries
pushd install
wget https://github.com/doublecmd/external/raw/main/linux.tar.gz
tar xzf linux.tar.gz
rm -f linux.tar.gz
popd
# Set widgetset
export lcl=gtk3
# Set processor architecture
export CPU_TARGET=$(fpc -iTP)
build_doublecmd()
{
# Build all components of Double Commander
./build.sh release
# Copy libraries
cp -a install/linux/lib/$CPU_TARGET/*.so ./
# Create *.tar.xz package
mkdir -p $BUILD_PACK_DIR
install/linux/install.sh --portable-prefix=$BUILD_PACK_DIR
pushd $BUILD_PACK_DIR
# Set run-time library search path
patchelf --set-rpath '$ORIGIN' doublecmd/doublecmd
tar -cJf $PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.tar.xz doublecmd
popd
# Clean DC build dir
./clean.sh
rm -rf $BUILD_PACK_DIR
}
mkdir -p $PACK_DIR
build_doublecmd

View file

@ -1,8 +1,5 @@
#!/bin/bash
# Set Double Commander version
DC_VER=1.1.0
# The new package will be saved here
PACK_DIR=$PWD/doublecmd-release
@ -12,6 +9,19 @@ BUILD_PACK_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
# Save revision number
DC_REVISION=$(install/linux/update-revision.sh ./ ./)
# Read version number
DC_MAJOR=$(grep 'MajorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+')
DC_MINOR=$(grep 'MinorVersionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_MICRO=$(grep 'RevisionNr' src/doublecmd.lpi | grep -o '[0-9.]\+' || echo 0)
DC_VER=$DC_MAJOR.$DC_MINOR.$DC_MICRO
# Get libraries
pushd install
wget https://github.com/doublecmd/external/raw/main/darwin.tar.gz
tar xzf darwin.tar.gz
rm -f darwin.tar.gz
popd
# Set widgetset
export lcl=cocoa
@ -19,21 +29,65 @@ export lcl=cocoa
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleVersion $DC_REVISION
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleShortVersionString $DC_VER
plutil -convert xml1 $(pwd)/doublecmd.app/Contents/Info.plist
chmod 644 $(pwd)/doublecmd.app/Contents/Info.plist
build_doublecmd()
{
# Build all components of Double Commander
./build.sh release
# Create *.dmg package
# Copy libraries
cp -a install/darwin/lib/$CPU_TARGET/*.dylib ./
# Prepare *.dmg package
mkdir -p $BUILD_PACK_DIR
install/darwin/install.sh $BUILD_PACK_DIR
pushd $BUILD_PACK_DIR
mv doublecmd.app 'Double Commander.app'
codesign --deep --force --verify --verbose --sign '-' 'Double Commander.app'
hdiutil create -anyowners -volname "Double Commander" -imagekey zlib-level=9 -format UDZO -fs HFS+ -srcfolder 'Double Commander.app' $PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.dmg
popd
# Create *.dmg package
HDI_TRY=0
HDI_MAX=5
while true; do
HDI_TRY=$((HDI_TRY+1))
echo "Try to create a package $HDI_TRY ..."
# Bug: https://github.com/actions/runner-images/issues/7522
echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true;
echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done;
sudo install/darwin/create-dmg/create-dmg \
--volname "Double Commander" \
--volicon "$BUILD_PACK_DIR/.VolumeIcon.icns" \
--background "$BUILD_PACK_DIR/.background/bg.jpg" \
--window-pos 200 200 \
--window-size 680 366 \
--text-size 16 \
--icon-size 128 \
--icon "Double Commander.app" 110 120 \
--app-drop-link 360 120 \
--icon "install.txt" 566 123 \
--icon ".background" 100 500 \
"$PACK_DIR/doublecmd-$DC_VER-$DC_REVISION.$lcl.$CPU_TARGET.dmg" \
"$BUILD_PACK_DIR/"
if [ $? -eq 0 ]; then
break
fi
if [ $HDI_TRY -eq $HDI_MAX ]; then
break
fi
sleep 10
done
# Clean DC build dir
./clean.sh
rm -rf $BUILD_PACK_DIR
@ -53,6 +107,6 @@ build_doublecmd
# Set processor architecture
export CPU_TARGET=x86_64
# Set minimal Mac OS X target version
export MACOSX_DEPLOYMENT_TARGET=10.11
export MACOSX_DEPLOYMENT_TARGET=11.0
build_doublecmd

View file

@ -11,7 +11,7 @@ if [[ "$OSTYPE" == "msys" ]]; then
icacls.exe ssh_key //inheritance:r
echo "rm *.7z" >> upload_snapshot.txt
echo "-rm *.7z" >> upload_snapshot.txt
echo "put *.7z" >> upload_snapshot.txt
echo "put *.txt" >> upload_snapshot.txt
@ -19,7 +19,7 @@ else
chmod 0600 ssh_key
echo "rm *.dmg" >> upload_snapshot.txt
echo "-rm *.dmg" >> upload_snapshot.txt
echo "put *.dmg" >> upload_snapshot.txt
echo "put *.php" >> upload_snapshot.txt

58
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,58 @@
name: build-release
on:
workflow_dispatch:
release:
types: [prereleased, released]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-mac:
runs-on: macos-14
steps:
- name: Install Free Pascal
uses: doublecmd/lazarus-install@mac
with:
lazarus-version: "stable"
- name: Get Lazarus source
uses: actions/checkout@v6
with:
repository: 'fpc/Lazarus'
ref: 'fixes_4'
- name: Build and install Lazarus
run: |
make all
sudo make install
- name: Create Lazarus config
run: |
sudo mkdir -p /etc/lazarus
sudo cp tools/install/macosx/environmentoptions.xml /etc/lazarus/environmentoptions.xml
sudo sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" /etc/lazarus/environmentoptions.xml
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download unrar source code
run: wget https://www.rarlab.com/rar/unrarsrc-7.2.3.tar.gz -O /tmp/unrarsrc.tar.gz
- name: Extract unrar source code
run: cd /tmp && tar xzf unrarsrc.tar.gz
- name: Build packages
run: ./.github/scripts/create_release.sh
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: doublecmd-release/doublecmd*.dmg
tag: ${{ github.ref }}
overwrite: true
file_glob: true

View file

@ -1,6 +1,7 @@
name: build-snapshot
on:
workflow_dispatch:
push:
paths:
- 'components/**'
@ -16,62 +17,139 @@ concurrency:
jobs:
build-mac:
runs-on: macos-11
runs-on: macos-14
steps:
- name: Install Free Pascal
uses: alexx2000/setup-fpc@master
uses: doublecmd/lazarus-install@mac
with:
lazarus-version: "stable"
- name: Get Lazarus source
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
repository: 'fpc/Lazarus'
- name: Build and install Lazarus
run: make all install
run: |
make all
sudo make install
- name: Create Lazarus config
run: |
sudo mkdir -p /etc/lazarus
sudo cp tools/install/macosx/environmentoptions.xml /etc/lazarus/environmentoptions.xml
sudo sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" /etc/lazarus/environmentoptions.xml
mkdir -p $HOME/.lazarus
cp tools/install/macosx/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
sed -i -e "s|_PPCARCH_|fpc|g; s|/Developer/lazarus|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Prepare source
run: sed -i -e "s|BOX_CLIENT_SECRET = '\*'|BOX_CLIENT_SECRET = '$BOX_CLIENT_SECRET'|g" plugins/wfx/MacCloud/src/drivers/oauth2/box/uboxclient.pas
env:
BOX_CLIENT_SECRET: ${{ secrets.BOX_CLIENT_SECRET }}
- name: Build packages
run: ./.github/scripts/create_snapshot.sh
- name: Deploy to snapshot server
run: ./.github/scripts/upload_snapshot.sh
env:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
- name: Share data between jobs
uses: actions/upload-artifact@v7
with:
name: snapshot-mac
retention-days: 1
compression-level: 0
path: doublecmd-release/doublecmd*.dmg
build-win:
runs-on: windows-latest
steps:
- name: Install Lazarus
uses: alexx2000/setup-fpc@win
uses: doublecmd/lazarus-install@win
with:
lazarus-version: "2.2.6"
lazarus-version: "stable"
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Restore timestamps
uses: chetan/git-restore-mtime-action@v2
- name: Build packages
run: ./.github/scripts/create_snapshot.bat
- name: Deploy to snapshot server
run: ./.github/scripts/upload_snapshot.sh
- name: Share data between jobs
uses: actions/upload-artifact@v7
with:
name: snapshot-win
retention-days: 1
compression-level: 0
path: doublecmd-release/*
build-lin:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install fpc patchelf libgtk-3-dev libdbus-1-dev
- name: Get Lazarus source
uses: actions/checkout@v6
with:
repository: 'fpc/Lazarus'
- name: Build and install Lazarus
run: |
make all
sudo make install
- name: Create Lazarus config
run: |
mkdir -p $HOME/.lazarus
cp tools/install/linux/environmentoptions.xml $HOME/.lazarus/environmentoptions.xml
sed -i -e "s|__LAZARUSDIR__|/usr/local/share/lazarus|g" $HOME/.lazarus/environmentoptions.xml
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Build packages
run: ./.github/scripts/create_snapshot.lnx
- name: Share data between jobs
uses: actions/upload-artifact@v7
with:
name: snapshot-lin
retention-days: 1
compression-level: 0
path: doublecmd-release/doublecmd*.tar.xz
upload:
needs: [build-win, build-mac, build-lin]
runs-on: ubuntu-latest
environment: snapshots
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
with:
merge-multiple: true
- name: Save revision number
run: echo "REVISION=$(cat revision.txt)" >> "$GITHUB_ENV"
shell: bash
env:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
- name: Upload binaries to snapshots
uses: svenstaro/upload-release-action@v2
with:
repo_name: doublecmd/snapshots
repo_token: ${{ secrets.SNAPSHOTS }}
file: ./*
release_name: Revision ${{ env.REVISION }}
tag: ${{ env.REVISION }}
body: ${{ vars.BODY }}
overwrite: true
file_glob: true

View file

@ -4,10 +4,10 @@ on:
types: [released]
jobs:
publish:
runs-on: windows-latest # action can only be run on windows
runs-on: ubuntu-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: alexx2000.DoubleCommander
installers-regex: '.(exe|msi)$'
installers-regex: '\.msi$'
token: ${{ secrets.WINGET_TOKEN }}

1
.gitignore vendored
View file

@ -16,6 +16,7 @@
*.w?x
units/
/doublecmd
tools/extractdwrflnfo
# Lazarus autogenerated files (duplicated info)
*.rst

View file

@ -49,7 +49,7 @@
@echo Clean up components output directories
@del /Q /S components\chsdet\lib\*.*
@del /Q /S components\dcpcrypt\lib\*.*
@del /Q /S components\kascrypt\lib\*.*
@del /Q /S components\doublecmd\lib\*.*
@del /Q /S components\gifanim\lib\*.*
@del /Q /S components\KASToolBar\lib\*.*

View file

@ -5,7 +5,7 @@ rm -f units/*/*
# Clean up components output directories
rm -rf components/chsdet/lib/*
rm -rf components/dcpcrypt/lib/*
rm -rf components/kascrypt/lib/*
rm -rf components/doublecmd/lib/*
rm -rf components/gifanim/lib/*
rm -rf components/Image32/lib/*
@ -27,9 +27,12 @@ find plugins -iname '*.a' -delete
rm -f src/doublecmd.res doublecmd
rm -f tools/extractdwrflnfo
rm -f plugins/wcx/unrar/lib/rarconfdlg.lfm
rm -f plugins/wcx/unrar/lib/rarlng.rsj
rm -f plugins/wcx/zip/lib/ZipConfDlg.lfm
rm -f plugins/wcx/zip/lib/ZipLng.rsj
rm -f plugins/wcx/zip/lib/abresstring.rs?
rm -f plugins/wfx/ftp/lib/FtpConfDlg.lfm
rm -f plugins/wfx/ftp/lib/ftppropdlg.lfm
rm -f plugins/wfx/samba/lib/smbauthdlg.lfm
# Remove debug files

View file

@ -7,8 +7,8 @@
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
<IncludeFiles Value="source"/>
<OtherUnitFiles Value="source"/>
<IncludeFiles Value="source;source/Clipper2"/>
<OtherUnitFiles Value="source;source/Clipper2"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Conditionals Value="if (TargetCPU &lt;> &apos;arm&apos;) then
@ -19,7 +19,7 @@ end"/>
</CompilerOptions>
<Description Value="Image32 is a comprehensive 2D graphics library written entirely in Delphi Pascal, and without dependencies on other libraries. It provides an extensive range of image manipulation and drawing functions that includes text rendering through native parsing of truetype font files."/>
<License Value="Boost Software License - Version 1.0"/>
<Version Major="4" Minor="3"/>
<Version Major="4" Minor="8" Release="1"/>
<Files>
<Item>
<Filename Value="source/Img32.Draw.pas"/>
@ -85,6 +85,34 @@ end"/>
<Filename Value="source/Img32.Vector.pas"/>
<UnitName Value="Img32.Vector"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Core.pas"/>
<UnitName Value="Clipper.Core"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Engine.pas"/>
<UnitName Value="Clipper.Engine"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.inc"/>
<Type Value="Include"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Minkowski.pas"/>
<UnitName Value="Clipper.Minkowski"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.Offset.pas"/>
<UnitName Value="Clipper.Offset"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.pas"/>
<UnitName Value="Clipper"/>
</Item>
<Item>
<Filename Value="source/Clipper2/Clipper.RectClip.pas"/>
<UnitName Value="Clipper.RectClip"/>
</Item>
</Files>
<RequiredPkgs>
<Item>
@ -96,7 +124,7 @@ end"/>
</RequiredPkgs>
<UsageOptions>
<IncludePath Value="source"/>
<UnitPath Value="$(PkgOutDir);source"/>
<UnitPath Value="$(PkgOutDir);source;source/Clipper2"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>

View file

@ -10,7 +10,8 @@ interface
uses
Img32.Draw, Img32.Extra, Img32.Fmt.SVG, Img32, Img32.Resamplers,
Img32.SVG.Core, Img32.SVG.Path, Img32.SVG.Reader, Img32.Text,
Img32.Transform, Img32.Vector;
Img32.Transform, Img32.Vector, Clipper.Core, Clipper.Engine,
Clipper.Minkowski, Clipper.Offset, Clipper, Clipper.RectClip;
implementation

View file

@ -4,6 +4,6 @@ A 2D graphics library written in Delphi Pascal
https://github.com/AngusJohnson/Image32
Version: 4.3+ (2022/10/16)
Version: 4.8.1 (2025/01/18)
Author: Angus Johnson

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,133 @@
unit Clipper.Minkowski;
(*******************************************************************************
* Author : Angus Johnson *
* Date : 21 December 2023 *
* Copyright : Angus Johnson 2010-2022 *
* Purpose : Minkowski Addition and Difference *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
{$I Clipper.inc}
interface
uses
Classes, Math, Clipper.Core;
function MinkowskiSum(const Pattern, Path: TPath64;
PathIsClosed: Boolean): TPaths64; overload;
function MinkowskiSum(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer = 2): TPathsD; overload;
function MinkowskiDiff(const path1, path2: TPath64): TPaths64; overload;
function MinkowskiDiff(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer): TPathsD; overload;
implementation
uses
Clipper;
function AddPoints(val1, val2: TPoint64): TPoint64;
{$IFDEF INLINING} inline; {$ENDIF}
begin
Result.X := val1.X + val2.X;
Result.Y := val1.Y + val2.Y;
end;
//------------------------------------------------------------------------------
function SubtractPoints(val1, val2: TPoint64): TPoint64;
{$IFDEF INLINING} inline; {$ENDIF}
begin
Result.X := val1.X - val2.X;
Result.Y := val1.Y - val2.Y;
end;
//------------------------------------------------------------------------------
function Minkowski(const Base, Path: TPath64;
IsSum: Boolean; IsClosed: Boolean): TPaths64;
var
i,j,k,g,h, delta, baseLen, pathLen: integer;
tmp: TPaths64;
quad: TPath64;
begin
delta := Iif(IsClosed, 0 , 1);
baseLen := Length(Base);
pathLen := Length(Path);
setLength(tmp, pathLen);
for i := 0 to pathLen -1 do
begin
setLength(tmp[i], baseLen);
if IsSum then
for j := 0 to baseLen -1 do
tmp[i][j] := AddPoints(Path[i], Base[j])
else
for j := 0 to baseLen -1 do
tmp[i][j] := SubtractPoints(Path[i], Base[j]);
end;
SetLength(quad, 4);
SetLength(Result, (pathLen - delta) * baseLen);
g := Iif(IsClosed, pathLen - 1, 0);
for i := delta to pathLen - 1 do
begin
h := baseLen - 1;
k := (i - delta) * baseLen;
for j := 0 to baseLen - 1 do
begin
quad[0] := tmp[g][h];
quad[1] := tmp[i][h];
quad[2] := tmp[i][(j)];
quad[3] := tmp[g][(j)];
if not IsPositive(quad) then
Result[k + j] := ReversePath(quad) else
Result[k + j] := copy(quad, 0, 4);
h := j;
end;
g := i;
end;
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const Pattern, Path: TPath64; PathIsClosed: Boolean): TPaths64;
begin
Result := Union( Minkowski(Pattern, Path, true, PathIsClosed), frNonZero);
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer): TPathsD;
var
tmp: TPaths64;
scale: double;
begin
scale := Power(10, decimalPlaces);
tmp := Union( Minkowski(ScalePath(Pattern, scale),
ScalePath(Path, scale), true, PathIsClosed), frNonZero);
Result := ScalePathsD(tmp, 1/scale);
end;
//------------------------------------------------------------------------------
function MinkowskiDiff(const path1, path2: TPath64): TPaths64;
begin
Result := Union( Minkowski(path1, path2, false, true), frNonZero);
end;
//------------------------------------------------------------------------------
function MinkowskiDiff(const Pattern, Path: TPathD;
PathIsClosed: Boolean; decimalPlaces: integer): TPathsD;
var
tmp: TPaths64;
scale: double;
begin
scale := Power(10, decimalPlaces);
tmp := Union( Minkowski(ScalePath(Pattern, scale),
ScalePath(Path, scale), false, PathIsClosed), frNonZero);
Result := ScalePathsD(tmp, 1/scale);
end;
//------------------------------------------------------------------------------
end.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
///////////////////////////////////////////////////////////////////////////////
//USER DEFINED PREPROCESSOR DIRECTIVES
///////////////////////////////////////////////////////////////////////////////
//For user defined Z-coordinates, defined in Clipper's 'SetZ' callback event
{.$DEFINE USINGZ}
///////////////////////////////////////////////////////////////////////////////
//COMPILER DIFINED PREPROCESSOR DIRECTIVES (ie. do not touch ;))
///////////////////////////////////////////////////////////////////////////////
{$IFDEF FPC}
{$DEFINE INLINING}
{$MODE DELPHI}
{$ELSE}
{$IF COMPILERVERSION < 14}
Requires Delphi version 6 or above.
{$IFEND}
{$IF COMPILERVERSION >= 18} //Delphi 2007
{$DEFINE RECORD_METHODS}
{$DEFINE STRICT}
{$IF COMPILERVERSION >= 19} //Delphi 2009
//While "inlining" is supported from D2005, it's buggy (see QC41166) until D2009
{$DEFINE INLINING}
{$IF COMPILERVERSION >= 23} //Delphi XE2+
{$DEFINE XPLAT_GENERICS}
{$DEFINE ROUNDINGMODE}
{$IF COMPILERVERSION >= 24} //Delphi XE3+
{$LEGACYIFEND ON}
{$IFEND}
{$IFEND}
{$IFEND}
{$IFEND}
{$ENDIF}
{$IFDEF DEBUG}
{$UNDEF INLINING}
{$ENDIF}

View file

@ -0,0 +1,972 @@
unit Clipper;
(*******************************************************************************
* Author : Angus Johnson *
* Date : 7 May 2024 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2010-2024 *
* Purpose : This module provides a simple interface to the Clipper Library *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
interface
{$I Clipper.inc}
uses
Math, SysUtils, Classes,
Clipper.Core, Clipper.Engine, Clipper.Offset, Clipper.RectClip;
// A number of structures defined in other units are redeclared here
// so those units won't also need to be declared in your own units clauses.
type
TClipper = Clipper.Engine.TClipper64;
TClipper64 = Clipper.Engine.TClipper64;
TPoint64 = Clipper.Core.TPoint64;
TRect64 = Clipper.Core.TRect64;
TPath64 = Clipper.Core.TPath64;
TPaths64 = Clipper.Core.TPaths64;
TPointD = Clipper.Core.TPointD;
TRectD = Clipper.Core.TRectD;
TPathD = Clipper.Core.TPathD;
TPathsD = Clipper.Core.TPathsD;
TFillRule = Clipper.Core.TFillRule;
TPolyTree64 = Clipper.Engine.TPolyTree64;
TPolyTreeD = Clipper.Engine.TPolyTreeD;
TJoinType = Clipper.Offset.TJoinType;
TEndType = Clipper.Offset.TEndType;
TArrayOfInt64 = array of Int64;
const
frEvenOdd = Clipper.Core.frEvenOdd;
frNonZero = Clipper.Core.frNonZero;
frPositive = Clipper.Core.frPositive;
frNegative = Clipper.Core.frNegative;
jtBevel = Clipper.Offset.jtBevel;
jtSquare = Clipper.Offset.jtSquare;
jtRound = Clipper.Offset.jtRound;
jtMiter = Clipper.Offset.jtMiter;
etPolygon = Clipper.Offset.etPolygon;
etJoined = Clipper.Offset.etJoined;
etButt = Clipper.Offset.etButt;
etSquare = Clipper.Offset.etSquare;
etRound = Clipper.Offset.etRound;
ctNone = Clipper.Core.ctNoClip;
ctIntersection = Clipper.Core.ctIntersection;
ctUnion = Clipper.Core.ctUnion;
ctDifference = Clipper.Core.ctDifference;
ctXor = Clipper.Core.ctXor;
function BooleanOp(clipType: TClipType;
const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64; overload;
function BooleanOp(clipType: TClipType; const subjects, clips:
TPathsD; fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
procedure BooleanOp(clipType: TClipType; const subjects, clips: TPaths64;
fillRule: TFillRule; polytree: TPolyTree64); overload;
function Intersect(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Union(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Union(const subjects: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Difference(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function XOR_(const subjects, clips: TPaths64;
fillRule: TFillRule): TPaths64; overload;
function Intersect(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function Union(const subjects: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function Union(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function Difference(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function XOR_(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD; overload;
function InflatePaths(const paths: TPaths64; delta: Double;
jt: TJoinType = jtRound; et: TEndType = etPolygon;
MiterLimit: double = 2.0; ArcTolerance: double = 0.0): TPaths64; overload;
function InflatePaths(const paths: TPathsD; delta: Double;
jt: TJoinType = jtRound; et: TEndType = etPolygon;
miterLimit: double = 2.0; precision: integer = 2;
ArcTolerance: double = 0.0): TPathsD; overload;
// RectClip: for closed paths only (otherwise use RectClipLines)
function RectClip(const rect: TRect64; const path: TPath64): TPath64; overload;
function RectClip(const rect: TRect64; const paths: TPaths64): TPaths64; overload;
function RectClip(const rect: TRectD; const path: TPathD; precision: integer = 2): TPathD; overload;
function RectClip(const rect: TRectD; const paths: TPathsD; precision: integer = 2): TPathsD; overload;
function RectClipLines(const rect: TRect64;
const path: TPath64): TPaths64; overload;
function RectClipLines(const rect: TRect64;
const paths: TPaths64): TPaths64; overload;
function RectClipLines(const rect: TRectD; const path: TPathD;
precision: integer = 2): TPathsD; overload;
function RectClipLines(const rect: TRectD; const paths: TPathsD;
precision: integer = 2): TPathsD; overload;
function TranslatePath(const path: TPath64; dx, dy: Int64): TPath64; overload;
function TranslatePath(const path: TPathD; dx, dy: double): TPathD; overload;
function TranslatePaths(const paths: TPaths64; dx, dy: Int64): TPaths64; overload;
function TranslatePaths(const paths: TPathsD; dx, dy: double): TPathsD; overload;
function MinkowskiSum(const pattern, path: TPath64;
pathIsClosed: Boolean): TPaths64; overload;
function MinkowskiSum(const pattern, path: TPathD;
pathIsClosed: Boolean): TPathsD; overload;
function PolyTreeToPaths64(PolyTree: TPolyTree64): TPaths64;
function PolyTreeToPathsD(PolyTree: TPolyTreeD): TPathsD;
function PathToString(const p: TPath64;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
function PathToString(const p: TPathD; decimals: integer;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
function PathsToString(const p: TPaths64;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
function PathsToString(const p: TPathsD; decimals: integer;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string; overload;
//ShowPolyTreeStructure: only useful when debugging
procedure ShowPolyTreeStructure(polytree: TPolyTree64; strings: TStrings); overload;
procedure ShowPolyTreeStructure(polytree: TPolyTreeD; strings: TStrings); overload;
function MakePath(const ints: array of Int64): TPath64; overload;
function MakePathD(const dbls: array of double): TPathD; overload;
function TrimCollinear(const p: TPath64;
isOpenPath: Boolean = false): TPath64; overload;
function TrimCollinear(const path: TPathD;
precision: integer; isOpenPath: Boolean = false): TPathD; overload;
function PointInPolygon(const pt: TPoint64; const polygon: TPath64):
TPointInPolygonResult;
function SimplifyPath(const path: TPath64;
shapeTolerance: double; isClosedPath: Boolean = true): TPath64; overload;
function SimplifyPaths(const paths: TPaths64;
shapeTolerance: double; isClosedPath: Boolean = true): TPaths64; overload;
function SimplifyPath(const path: TPathD; shapeTolerance: double;
isClosedPath: Boolean = true; decimalPrecision: integer = 2): TPathD; overload;
function SimplifyPaths(const paths: TPathsD; shapeTolerance: double;
isClosedPath: Boolean = true; decimalPrecision: integer = 2): TPathsD; overload;
implementation
uses
Clipper.Minkowski;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
{$IFDEF USINGZ}
function MakePath(const ints: array of Int64): TPath64;
var
i, len: integer;
begin
len := length(ints) div 3;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := ints[i*3];
Result[i].Y := ints[i*3 +1];
Result[i].z := ints[i*3 +2];
end;
end;
//------------------------------------------------------------------------------
function MakePathD(const dbls: array of double): TPathD; overload;
var
i, len: integer;
begin
len := length(dbls) div 3;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := dbls[i*3];
Result[i].Y := dbls[i*3 +1];
Result[i].Z := Round(dbls[i*3 +2]);
end;
end;
//------------------------------------------------------------------------------
{$ELSE}
function MakePath(const ints: array of Int64): TPath64;
var
i, len: integer;
begin
len := length(ints) div 2;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := ints[i*2];
Result[i].Y := ints[i*2 +1];
end;
end;
//------------------------------------------------------------------------------
function MakePathD(const dbls: array of double): TPathD; overload;
var
i, len: integer;
begin
len := length(dbls) div 2;
SetLength(Result, len);
for i := 0 to len -1 do
begin
Result[i].X := dbls[i*2];
Result[i].Y := dbls[i*2 +1];
end;
end;
//------------------------------------------------------------------------------
{$ENDIF}
procedure AddPolyNodeToPaths(Poly: TPolyPath64; var Paths: TPaths64);
var
i: Integer;
begin
if (Length(Poly.Polygon) > 0) then
begin
i := Length(Paths);
SetLength(Paths, i +1);
Paths[i] := Poly.Polygon;
end;
for i := 0 to Poly.Count - 1 do
AddPolyNodeToPaths(Poly[i], Paths);
end;
//------------------------------------------------------------------------------
function PolyTreeToPaths64(PolyTree: TPolyTree64): TPaths64;
begin
Result := nil;
AddPolyNodeToPaths(PolyTree, Result);
end;
//------------------------------------------------------------------------------
procedure AddPolyNodeToPathsD(Poly: TPolyPathD; var Paths: TPathsD);
var
i: Integer;
begin
if (Length(Poly.Polygon) > 0) then
begin
i := Length(Paths);
SetLength(Paths, i +1);
Paths[i] := Poly.Polygon;
end;
for i := 0 to Poly.Count - 1 do
AddPolyNodeToPathsD(Poly[i], Paths);
end;
//------------------------------------------------------------------------------
function PolyTreeToPathsD(PolyTree: TPolyTreeD): TPathsD;
begin
Result := nil;
AddPolyNodeToPathsD(PolyTree, Result);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function BooleanOp(clipType: TClipType;
const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
with TClipper64.Create do
try
AddSubject(subjects);
AddClip(clips);
Execute(clipType, fillRule, Result);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function BooleanOp(clipType: TClipType; const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
with TClipperD.Create(decimalPrec) do
try
AddSubject(subjects);
AddClip(clips);
Execute(clipType, fillRule, Result);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
procedure BooleanOp(clipType: TClipType; const subjects, clips: TPaths64;
fillRule: TFillRule; polytree: TPolyTree64);
var
dummy: TPaths64;
begin
with TClipper64.Create do
try
AddSubject(subjects);
AddClip(clips);
Execute(clipType, fillRule, polytree, dummy);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function Intersect(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctIntersection, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function Union(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctUnion, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function Union(const subjects: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctUnion, subjects, nil, fillRule);
end;
//------------------------------------------------------------------------------
function Difference(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctDifference, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function XOR_(const subjects, clips: TPaths64; fillRule: TFillRule): TPaths64;
begin
Result := BooleanOp(ctXor, subjects, clips, fillRule);
end;
//------------------------------------------------------------------------------
function Intersect(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctIntersection, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function Union(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctUnion, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function Union(const subjects: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctUnion, subjects, nil, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function Difference(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctDifference, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
function XOR_(const subjects, clips: TPathsD;
fillRule: TFillRule; decimalPrec: integer = 2): TPathsD;
begin
Result := BooleanOp(ctXor, subjects, clips, fillRule, decimalPrec);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function InflatePaths(const paths: TPaths64; delta: Double;
jt: TJoinType; et: TEndType; MiterLimit: double;
ArcTolerance: double): TPaths64;
var
co: TClipperOffset;
begin
co := TClipperOffset.Create(MiterLimit, ArcTolerance);
try
co.AddPaths(paths, jt, et);
co.Execute(delta, Result);
finally
co.free;
end;
end;
//------------------------------------------------------------------------------
function InflatePaths(const paths: TPathsD; delta: Double;
jt: TJoinType; et: TEndType; miterLimit: double;
precision: integer; ArcTolerance: double): TPathsD;
var
pp: TPaths64;
scale, invScale: double;
begin
CheckPrecisionRange(precision);
scale := Power(10, precision);
invScale := 1/scale;
pp := ScalePaths(paths, scale, scale);
with TClipperOffset.Create(miterLimit, ArcTolerance) do
try
AddPaths(pp, jt, et);
Execute(delta * scale, pp); // reuse pp to receive the solution.
finally
free;
end;
Result := ScalePathsD(pp, invScale, invScale);
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRect64;
const path: TPath64): TPath64;
var
paths: TPaths64;
begin
SetLength(paths, 1);
paths[0] := path;
paths := RectClip(rect, paths);
if Assigned(paths) then
Result := paths[0] else
Result := nil;
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRect64; const paths: TPaths64): TPaths64;
begin
Result := nil;
if rect.IsEmpty then Exit;
with TRectClip64.Create(rect) do
try
Result := Execute(paths);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRectD; const path: TPathD; precision: integer): TPathD;
var
scale: double;
tmpPath: TPath64;
rec: TRect64;
begin
Result := nil;
if not rect.Intersects(GetBounds(path)) then Exit;
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPath := ScalePath(path, scale);
tmpPath := RectClip(rec, tmpPath);
Result := ScalePathD(tmpPath, 1/scale);
end;
//------------------------------------------------------------------------------
function RectClip(const rect: TRectD; const paths: TPathsD; precision: integer): TPathsD;
var
scale: double;
tmpPaths: TPaths64;
rec: TRect64;
begin
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPaths := ScalePaths(paths, scale);
with TRectClip64.Create(rec) do
try
tmpPaths := Execute(tmpPaths);
finally
Free;
end;
Result := ScalePathsD(tmpPaths, 1/scale);
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRect64; const path: TPath64): TPaths64;
var
tmp: TPaths64;
begin
Result := nil;
SetLength(tmp, 1);
tmp[0] := path;
with TRectClipLines64.Create(rect) do
try
Result := Execute(tmp);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRect64; const paths: TPaths64): TPaths64;
begin
Result := nil;
if rect.IsEmpty then Exit;
with TRectClipLines64.Create(rect) do
try
Result := Execute(paths);
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRectD;
const path: TPathD; precision: integer): TPathsD;
var
scale: double;
tmpPath: TPath64;
tmpPaths: TPaths64;
rec: TRect64;
begin
Result := nil;
if not rect.Intersects(GetBounds(path)) then Exit;
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPath := ScalePath(path, scale);
tmpPaths := RectClipLines(rec, tmpPath);
Result := ScalePathsD(tmpPaths, 1/scale);
end;
//------------------------------------------------------------------------------
function RectClipLines(const rect: TRectD; const paths: TPathsD;
precision: integer = 2): TPathsD;
var
scale: double;
tmpPaths: TPaths64;
rec: TRect64;
begin
Result := nil;
if rect.IsEmpty then Exit;
CheckPrecisionRange(precision);
scale := Math.Power(10, precision);
rec := Rect64(ScaleRect(rect, scale));
tmpPaths := ScalePaths(paths, scale);
with TRectClipLines64.Create(rec) do
try
tmpPaths := Execute(tmpPaths);
finally
Free;
end;
Result := ScalePathsD(tmpPaths, 1/scale);
end;
//------------------------------------------------------------------------------
function TranslatePath(const path: TPath64; dx, dy: Int64): TPath64;
var
i, len: integer;
begin
len := length(path);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i].x := path[i].x + dx;
result[i].y := path[i].y + dy;
end;
end;
//------------------------------------------------------------------------------
function TranslatePath(const path: TPathD; dx, dy: double): TPathD;
var
i, len: integer;
begin
len := length(path);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i].x := path[i].x + dx;
result[i].y := path[i].y + dy;
end;
end;
//------------------------------------------------------------------------------
function TranslatePaths(const paths: TPaths64; dx, dy: Int64): TPaths64;
var
i, len: integer;
begin
len := length(paths);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i] := TranslatePath(paths[i], dx, dy);
end;
end;
//------------------------------------------------------------------------------
function TranslatePaths(const paths: TPathsD; dx, dy: double): TPathsD;
var
i, len: integer;
begin
len := length(paths);
setLength(result, len);
for i := 0 to len -1 do
begin
result[i] := TranslatePath(paths[i], dx, dy);
end;
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const pattern, path: TPath64;
pathIsClosed: Boolean): TPaths64;
begin
Result := Clipper.Minkowski.MinkowskiSum(pattern, path, pathIsClosed);
end;
//------------------------------------------------------------------------------
function MinkowskiSum(const pattern, path: TPathD;
pathIsClosed: Boolean): TPathsD;
begin
Result := Clipper.Minkowski.MinkowskiSum(pattern, path, pathIsClosed);
end;
//------------------------------------------------------------------------------
function PathToString(const p: TPath64;
indentSpaces: integer; pointsPerRow: integer): string;
var
i, highI: Integer;
spaces: string;
begin
spaces := StringOfChar(' ', indentSpaces);
Result := spaces;
highI := high(p);
if highI < 0 then Exit;
for i := 0 to highI -1 do
begin
Result := Result + format('%d,%d, ',[p[i].X,p[i].Y]);
if (pointsPerRow > 0) and ((i + 1) mod pointsPerRow = 0) then
Result := Result + #10 + spaces;
end;
Result := Result + format('%d,%d',[p[highI].X,p[highI].Y]);
end;
//------------------------------------------------------------------------------
function PathToString(const p: TPathD; decimals: integer;
indentSpaces: integer; pointsPerRow: integer): string;
var
i, highI: Integer;
spaces: string;
begin
spaces := StringOfChar(' ', indentSpaces);
Result := '';
highI := high(p);
if highI < 0 then Exit;
for i := 0 to highI -1 do
Result := Result + format('%1.*n,%1.*n, ',
[decimals, p[i].X, decimals, p[i].Y]);
Result := Result + format('%1.*n,%1.*n',[
decimals, p[highI].X, decimals, p[highI].Y]);
end;
//------------------------------------------------------------------------------
function PathsToString(const p: TPaths64;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string;
var
i: integer;
begin
Result := '';
for i := 0 to High(p) do
Result := Result + PathToString(p[i], indentSpaces, pointsPerRow) + #10#10;
end;
//------------------------------------------------------------------------------
function PathsToString(const p: TPathsD; decimals: integer;
indentSpaces: integer = 0; pointsPerRow: integer = 0): string;
var
i: integer;
begin
Result := '';
for i := 0 to High(p) do
Result := Result + PathToString(p[i], indentSpaces, pointsPerRow) + #10#10;
end;
//------------------------------------------------------------------------------
procedure ShowPolyPathStructure64(pp: TPolyPath64; level: integer;
strings: TStrings);
var
i: integer;
spaces, plural: string;
begin
spaces := StringOfChar(' ', level * 2);
if pp.Count = 1 then plural := '' else plural := 's';
if pp.IsHole then
strings.Add(Format('%sA hole containing %d polygon%s', [spaces, pp.Count, plural]))
else
strings.Add(Format('%sA polygon containing %d hole%s', [spaces, pp.Count, plural]));
for i := 0 to pp.Count -1 do
if pp.child[i].Count> 0 then
ShowPolyPathStructure64(pp.child[i], level + 1, strings);
end;
//------------------------------------------------------------------------------
procedure ShowPolyTreeStructure(polytree: TPolyTree64; strings: TStrings);
var
i: integer;
begin
if polytree.Count = 1 then
strings.Add('Polytree with just 1 polygon.') else
strings.Add(Format('Polytree with just %d polygons.', [polytree.Count]));
for i := 0 to polytree.Count -1 do
if polytree[i].Count > 0 then
ShowPolyPathStructure64(polytree[i], 1, strings);
end;
//------------------------------------------------------------------------------
procedure ShowPolyPathStructureD(pp: TPolyPathD; level: integer; strings: TStrings);
var
i: integer;
spaces, plural: string;
begin
spaces := StringOfChar(' ', level * 2);
if pp.Count = 1 then plural := '' else plural := 's';
if pp.IsHole then
strings.Add(Format('%sA hole containing %d polygon%s', [spaces, pp.Count, plural]))
else
strings.Add(Format('%sA polygon containing %d hole%s', [spaces, pp.Count, plural]));
for i := 0 to pp.Count -1 do
if pp.child[i].Count> 0 then
ShowPolyPathStructureD(pp.child[i], level + 1, strings);
end;
//------------------------------------------------------------------------------
procedure ShowPolyTreeStructure(polytree: TPolyTreeD; strings: TStrings);
var
i: integer;
begin
if polytree.Count = 1 then
strings.Add('Polytree with just 1 polygon.') else
strings.Add(Format('Polytree with just %d polygons.', [polytree.Count]));
for i := 0 to polytree.Count -1 do
if polytree[i].Count > 0 then
ShowPolyPathStructureD(polytree[i], 1, strings);
end;
//------------------------------------------------------------------------------
function TrimCollinear(const p: TPath64; isOpenPath: Boolean = false): TPath64;
var
i,j, len: integer;
begin
len := Length(p);
i := 0;
if not isOpenPath then
begin
while (i < len -1) and
IsCollinear(p[len -1], p[i], p[i+1]) do inc(i);
while (i < len -1) and
IsCollinear(p[len -2], p[len -1], p[i]) do dec(len);
end;
if (len - i < 3) then
begin
if not isOpenPath or (len < 2) or PointsEqual(p[0], p[1]) then
Result := nil else
Result := p;
Exit;
end;
SetLength(Result, len -i);
Result[0] := p[i];
j := 0;
for i := i+1 to len -2 do
if not IsCollinear(result[j], p[i], p[i+1]) then
begin
inc(j);
result[j] := p[i];
end;
if isOpenPath then
begin
inc(j);
result[j] := p[len-1];
end
else if not IsCollinear(result[j], p[len-1], result[0]) then
begin
inc(j);
result[j] := p[len-1];
end else
begin
while (j > 1) and
IsCollinear(result[j-1], result[j], result[0]) do dec(j);
if j < 2 then j := -1;
end;
SetLength(Result, j +1);
end;
//------------------------------------------------------------------------------
function TrimCollinear(const path: TPathD;
precision: integer; isOpenPath: Boolean = false): TPathD;
var
p: TPath64;
scale: double;
begin
scale := power(10, precision);
p := ScalePath(path, scale);
p := TrimCollinear(p, isOpenPath);
Result := ScalePathD(p, 1/scale);
end;
//------------------------------------------------------------------------------
function PointInPolygon(const pt: TPoint64;
const polygon: TPath64): TPointInPolygonResult;
begin
Result := Clipper.Core.PointInPolygon(pt, polygon);
end;
//------------------------------------------------------------------------------
function DistanceSqrd(const pt1, pt2: TPoint64): double;
{$IFDEF INLINE} inline; {$ENDIF}
var
x1,y1,x2,y2: double;
begin
// nb: older versions of Delphi don't allow explicit typcasting
x1 := pt1.X; y1 := pt1.Y;
x2 := pt2.X; y2 := pt2.Y;
result := Sqr(x1 - x2) + Sqr(y1 - y2);
end;
//------------------------------------------------------------------------------
function PerpendicDistSqrd(const pt, line1, line2: TPoint64): double;
{$IFDEF INLINE} inline; {$ENDIF}
var
a,b,c,d: double;
begin
a := pt.X - line1.X;
b := pt.Y - line1.Y;
c := line2.X - line1.X;
d := line2.Y - line1.Y;
result := Iif((c = 0) and (d = 0),
0, Sqr(a * d - c * b) / (c * c + d * d));
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
type
PSimplifyRec = ^TSimplifyRec;
TSimplifyRec = record
pt : TPoint64;
pdSqrd : double;
prev : PSimplifyRec;
next : PSimplifyRec;
//isEnd : Boolean;
end;
function SimplifyPath(const path: TPath64;
shapeTolerance: double; isClosedPath: Boolean): TPath64;
var
i, highI, minHigh: integer;
tolSqrd: double;
srArray: array of TSimplifyRec;
first, last: PSimplifyRec;
begin
Result := nil;
highI := High(path);
minHigh := Iif(isClosedPath, 2, 1);
if highI < minHigh then Exit;
SetLength(srArray, highI +1);
with srArray[0] do
begin
pt := path[0];
prev := @srArray[highI];
next := @srArray[1];
pdSqrd := Iif(isClosedPath,
PerpendicDistSqrd(path[0], path[highI], path[1]), invalidD);
end;
with srArray[highI] do
begin
pt := path[highI];
prev := @srArray[highI-1];
next := @srArray[0];
pdSqrd := Iif(isClosedPath,
PerpendicDistSqrd(path[highI], path[highI-1], path[0]), invalidD);
end;
for i := 1 to highI -1 do
with srArray[i] do
begin
pt := path[i];
prev := @srArray[i-1];
next := @srArray[i+1];
pdSqrd := PerpendicDistSqrd(path[i], path[i-1], path[i+1]);
end;
first := @srArray[0];
last := first.prev;
tolSqrd := Sqr(shapeTolerance);
while first <> last do
begin
if (first.pdSqrd > tolSqrd) or
(first.next.pdSqrd < first.pdSqrd) then
begin
first := first.next;
Continue;
end;
dec(highI);
first.prev.next := first.next;
first.next.prev := first.prev;
last := first.prev;
first := last.next;
if first.next = first.prev then break;
last.pdSqrd := PerpendicDistSqrd(last.pt, last.prev.pt, first.pt);
first.pdSqrd := PerpendicDistSqrd(first.pt, last.pt, first.next.pt);
end;
if highI < minHigh then Exit;
if not isClosedPath then first := @srArray[0];
SetLength(Result, highI +1);
for i := 0 to HighI do
begin
Result[i] := first.pt;
first := first.next;
end;
end;
//------------------------------------------------------------------------------
function SimplifyPaths(const paths: TPaths64;
shapeTolerance: double; isClosedPath: Boolean): TPaths64;
var
i, len: integer;
begin
len := Length(paths);
SetLength(Result, len);
for i := 0 to len -1 do
result[i] := SimplifyPath(paths[i], shapeTolerance, isClosedPath);
end;
//------------------------------------------------------------------------------
function SimplifyPath(const path: TPathD; shapeTolerance: double;
isClosedPath: Boolean; decimalPrecision: integer): TPathD;
var
p: TPath64;
scale: double;
begin
scale := power(10, decimalPrecision);
p := ScalePath(path, scale);
p := SimplifyPath(p, shapeTolerance, isClosedPath);
Result := ScalePathD(p, 1/scale);
end;
//------------------------------------------------------------------------------
function SimplifyPaths(const paths: TPathsD; shapeTolerance: double;
isClosedPath: Boolean; decimalPrecision: integer): TPathsD;
var
pp: TPaths64;
scale: double;
begin
scale := power(10, decimalPrecision);
pp := ScalePaths(paths, scale);
pp := SimplifyPaths(pp, shapeTolerance, isClosedPath);
Result := ScalePathsD(pp, 1/scale);
end;
//------------------------------------------------------------------------------
end.

View file

@ -0,0 +1,197 @@
unit Img32.Clipper2;
(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.7 *
* Date : 6 January 2025 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2025 *
* Purpose : Wrapper module for the Clipper library *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
interface
uses
Img32, Img32.Draw, Img32.Vector, Clipper.Offset;
//nb: InflatePath assumes that there's consistent winding where
//outer paths wind in one direction and inner paths in the other
type
TClipperEndType = Clipper.Offset.TEndType;
function ClipperEndType(endStyle: TEndStyle): TClipperEndType;
function InflatePath(const path: TPathD; delta: Double;
joinStyle: TJoinStyle = jsAuto; endType: TClipperEndType = etPolygon;
miterLimit: double = 2.0; arcTolerance: double = 0.0;
minEdgeLength: double = 0.25): TPathsD;
function InflatePaths(const paths: TPathsD; delta: Double;
joinStyle: TJoinStyle = jsAuto; endType: TClipperEndType = etPolygon;
miterLimit: double = 2.0; arcTolerance: double = 0.0;
minEdgeLength: double = 0): TPathsD;
//UnionPolygon: removes self-intersections
function UnionPolygon(const polygon: TPathD;
fillRule: TFillRule): TPathsD;
function UnionPolygons(const polygons: TPathsD;
fillRule: TFillRule): TPathsD; overload;
function UnionPolygons(const polygon1, polygon2: TPathD;
fillRule: TFillRule): TPathsD; overload;
function UnionPolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD; overload;
function IntersectPolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD;
function DifferencePolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD;
const
etPolygon = Clipper.Offset.etPolygon;
etJoined = Clipper.Offset.etJoined;
etButt = Clipper.Offset.etButt;
etSquare = Clipper.Offset.etSquare;
etRound = Clipper.Offset.etRound;
implementation
uses Clipper, Clipper.Core, Clipper.Engine;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function ClipperEndType(endStyle: TEndStyle): TClipperEndType;
begin
case endStyle of
esPolygon: Result := etJoined;
esButt: Result := etButt;
esSquare: Result := etSquare;
else Result := etRound;
end;
end;
//------------------------------------------------------------------------------
function InflatePath(const path: Img32.TPathD;
delta: Double; joinStyle: TJoinStyle; endType: TClipperEndType;
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
var
paths: Img32.TPathsD;
begin
setLength(paths, 1);
paths[0] := path;
Result := InflatePaths(paths, delta, joinStyle, endType,
miterLimit, arcTolerance, minEdgeLength);
end;
//------------------------------------------------------------------------------
function InflatePaths(const paths: Img32.TPathsD;
delta: Double; joinStyle: TJoinStyle; endType: TClipperEndType;
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
var
jt: Clipper.Offset.TJoinType;
begin
case joinStyle of
jsSquare : jt := jtSquare;
jsButt : jt := jtBevel;
jsMiter : jt := jtMiter;
jsRound : jt := jtRound;
else if endType = etRound then jt := jtRound
else jt := jtSquare;
end;
Result := Img32.TPathsD(Clipper.InflatePaths(
Clipper.Core.TPathsD(paths), delta, jt, endType));
end;
//------------------------------------------------------------------------------
function UnionPolygon(const polygon: Img32.TPathD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathD(polygon));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function UnionPolygons(const polygons: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function UnionPolygons(const polygon1, polygon2: Img32.TPathD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathD(polygon1));
AddClip(Clipper.Core.TPathD(polygon2));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function UnionPolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons1));
AddClip(Clipper.Core.TPathsD(polygons2));
Execute(ctUnion,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function IntersectPolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons1));
AddClip(Clipper.Core.TPathsD(polygons2));
Execute(ctIntersection,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
function DifferencePolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
AddSubject(Clipper.Core.TPathsD(polygons1));
AddClip(Clipper.Core.TPathsD(polygons2));
Execute(ctDifference,
Clipper.Core.TFillRule(fillRule), Clipper.Core.TPathsD(result));
finally
Free;
end;
end;
//------------------------------------------------------------------------------
end.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -2,10 +2,10 @@ unit Img32.Fmt.SVG;
(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.3.1 *
* Date : 5 October 2022 *
* Version : 4.7 *
* Date : 6 January 2025 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2022 *
* Copyright : Angus Johnson 2019-2025 *
* Purpose : SVG file format extension for TImage32 *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
@ -15,16 +15,24 @@ interface
{$I Img32.inc}
uses
{$IFDEF MSWINDOWS} Windows, {$ENDIF} SysUtils, Classes, Math,
{$IFDEF MSWINDOWS} Windows, {$ENDIF}
{$IF NOT DEFINED(NEWPOSFUNC) OR DEFINED(FPC)} StrUtils, {$IFEND}
{$IFDEF UNICODE} AnsiStrings, {$ENDIF}
SysUtils, Classes, Math,
{$IFDEF XPLAT_GENERICS} Generics.Collections, Generics.Defaults, {$ENDIF}
Img32, Img32.Vector, Img32.SVG.Reader;
Img32, Img32.Vector, Img32.SVG.Core, Img32.SVG.Reader
{$IF DEFINED(USING_LCL)}, Types{$IFEND}
;
type
TImageFormat_SVG = class(TImageFormat)
public
class function IsValidImageStream(stream: TStream): Boolean; override;
function LoadFromStream(stream: TStream; img32: TImage32): Boolean; override;
procedure SaveToStream(stream: TStream; img32: TImage32); override;
function LoadFromStream(stream: TStream;
img32: TImage32; imgIndex: integer = 0): Boolean; override;
// SaveToStream: not implemented for SVG streams
procedure SaveToStream(stream: TStream;
img32: TImage32; quality: integer = 0); override;
class function CanCopyToClipboard: Boolean; override;
class function CopyToClipboard(img32: TImage32): Boolean; override;
class function CanPasteFromClipboard: Boolean; override;
@ -83,10 +91,6 @@ type
{$ENDIF}
end;
var
defaultSvgWidth: integer = 800;
defaultSvgHeight: integer = 600;
implementation
//------------------------------------------------------------------------------
@ -362,38 +366,38 @@ end;
// Loading (reading) SVG images from file ...
//------------------------------------------------------------------------------
function TImageFormat_SVG.LoadFromStream(stream: TStream; img32: TImage32): Boolean;
function TImageFormat_SVG.LoadFromStream(stream: TStream;
img32: TImage32; imgIndex: integer = 0): Boolean;
var
r: TRectWH;
w,h, sx,sy: double;
sx: double;
begin
with TSvgReader.Create do
try
Result := LoadFromStream(stream);
if not Result then Exit;
r := GetViewbox(img32.Width, img32.Height);
r := RootElement.viewboxWH;
img32.BeginUpdate;
try
if img32.IsEmpty and not r.IsEmpty then
img32.SetSize(Round(r.Width), Round(r.Height))
if img32.IsEmpty then
begin
with RootElement do
if Width.IsValid and Height.IsValid then
img32.SetSize(
Round(Width.GetValue(defaultSvgWidth, 0)),
Round(Height.GetValue(defaultSvgHeight, 0)))
else if not r.IsEmpty then
img32.SetSize(Round(r.Width), Round(r.Height))
else
img32.SetSize(defaultSvgWidth, defaultSvgHeight);
end
else if not r.IsEmpty then
begin
//then scale the SVG to fit image
w := r.Width;
h := r.Height;
sx := img32.Width / w;
sy := img32.Height / h;
if sy < sx then sx := sy;
if not(SameValue(sx, 1, 0.00001)) then
begin
w := w * sx;
h := h * sx;
end;
img32.SetSize(Round(w), Round(h));
end
else
img32.SetSize(defaultSvgWidth, defaultSvgHeight);
// scale the SVG to best fit the image dimensions
sx := GetScaleForBestFit(r.Width, r.Height, img32.Width, img32.Height);
img32.SetSize(Round(r.Width * sx), Round(r.Height * sx));
end;
//draw the SVG image to fit inside the canvas
DrawImage(img32, True);
@ -434,7 +438,8 @@ begin
end;
//------------------------------------------------------------------------------
procedure TImageFormat_SVG.SaveToStream(stream: TStream; img32: TImage32);
procedure TImageFormat_SVG.SaveToStream(stream: TStream;
img32: TImage32; quality: integer);
begin
//not enabled
end;

View file

@ -2,10 +2,10 @@ unit Img32.Resamplers;
(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.3 *
* Date : 27 September 2022 *
* Version : 4.8 *
* Date : 10 January 2025 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2021 *
* Copyright : Angus Johnson 2019-2025 *
* Purpose : For image transformations (scaling, rotating etc.) *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)
@ -15,111 +15,265 @@ interface
{$I Img32.inc}
uses
SysUtils, Classes, Img32;
SysUtils, Classes, Math, Img32;
//BoxDownSampling: As the name implies, this routine is only intended for
//image down-sampling (ie when shrinking images) where it generally performs
//better than other resamplers which tend to lose too much detail. However,
//because this routine is inferior to other resamplers when performing other
//transformations (ie when enlarging, rotating, and skewing images), it's not
//intended as a general purpose resampler.
procedure BoxDownSampling(Image: TImage32; newWidth, newHeight: Integer);
// Premultiplies the alpha channel into the color channels from pSrc and stores
// it into pDst. pSrc and pDst can be the same pointer.
procedure PremultiplyAlpha(pSrc, pDst: PARGB; count: nativeint); overload;
(* The following functions are registered in the initialization section below
function NearestResampler(img: TImage32; x256, y256: Integer): TColor32;
function BilinearResample(img: TImage32; x256, y256: Integer): TColor32;
function BicubicResample(img: TImage32; x256, y256: Integer): TColor32;
*)
// BoxDownSampling: As the name implies, is only intended for image
// down-sampling (ie shrinking images) where it performs a little better
// than other resamplers which tend toward pixelation. Nevertheless, this
// routine is inferior to other resamplers when performing other
// types of transformations (ie when enlarging, rotating, and skewing images),
// so BoxDownSampling should not be used as a general purpose resampler.
procedure BoxDownSampling(Image: TImage32; scale: double); overload;
procedure BoxDownSampling(Image: TImage32; scaleX, scaleY: double); overload;
procedure BoxDownSampling(Image: TImage32; newWidth, newHeight: Integer); overload;
procedure BoxDownSampling(Image, TargetImage: TImage32; scale: double); overload;
procedure BoxDownSampling(Image, TargetImage: TImage32; scaleX, scaleY: double); overload;
procedure BoxDownSampling(Image, TargetImage: TImage32; newWidth, newHeight: Integer); overload;
procedure NearestNeighborResize(Image: TImage32; newWidth, newHeight: Integer); overload;
procedure NearestNeighborResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer); overload;
procedure ResamplerResize(Image: TImage32; newWidth, newHeight: Integer); overload;
procedure ResamplerResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer); overload;
// The following general purpose resamplers are registered below:
// function NearestResampler(img: TImage32; x, y: double): TColor32;
// function BilinearResample(img: TImage32; x, y: double): TColor32;
// function BicubicResample (img: TImage32; x, y: double): TColor32;
// function WeightedBilinear(img: TImage32; x, y: double): TColor32;
implementation
uses
Img32.Transform;
var
sinWeighted: array [0..255] of Cardinal;
//------------------------------------------------------------------------------
// NearestNeighbor resampler
//------------------------------------------------------------------------------
function NearestResampler(img: TImage32; x256, y256: Integer): TColor32;
function NearestResampler(img: TImage32; x, y: double): TColor32;
var
xi, yi: integer;
begin
if (x256 < -$7f) then
begin
Result := clNone32;
Exit;
end;
if (y256 < -$7f) then
begin
Result := clNone32;
Exit;
end;
if (x256 and $FF > $7F) then inc(x256, $100);
x256 := x256 shr 8;
if y256 and $FF > $7F then inc(y256, $100);
y256 := y256 shr 8;
if (x256 < 0) or (x256 >= img.Width) or
(y256 < 0) or (y256 >= img.Height) then
Result := clNone32 else
Result := img.Pixels[y256 * img.Width + x256];
xi := Round(x); yi := Round(y);
if (xi < 0) or (yi < 0) or (xi >= img.Width) or (yi >= img.Height) then
Result := clNone32 else
Result := img.Pixels[xi + yi * img.Width];
end;
//------------------------------------------------------------------------------
// BiLinear resampler
//------------------------------------------------------------------------------
function BilinearResample(img: TImage32; x256, y256: Integer): TColor32;
function BilinearResample(img: TImage32; x, y: double): TColor32;
var
xi,yi, weight: Integer;
iw, ih: integer;
xx, yy, xR, yB: integer;
weight: integer;
pixels: TArrayOfColor32;
color: TWeightedColor;
xf, yf: cardinal;
weightedColor: TWeightedColor;
xf, yf: double;
begin
iw := img.Width;
ih := img.Height;
pixels := img.Pixels;
if (x256 <= -$100) or (x256 >= iw *$100) or
(y256 <= -$100) or (y256 >= ih *$100) then
if (x < 0) then
begin
result := clNone32;
Exit;
if (x < -0.5) then
begin
xf := -x;
end else
begin
x := 0;
xf := 0;
end;
xx := 0;
xR := 0;
end else
begin
xf := 1-frac(x);
if x >= iw -1 then
begin
xx := iw -1;
xR := xx;
end else
begin
xx := Trunc(x);
xR := xx +1;
end;
end;
if x256 < 0 then xi := -1
else xi := x256 shr 8;
if (y < 0) then
begin
if (y < -0.5) then
begin
yf := -y;
end else
begin
y := 0;
yf := 0;
end;
yy := 0;
yB := 0;
end else
begin
yf := 1-frac(y);
if y >= ih -1 then
begin
yy := ih -1;
yB := yy;
end else
begin
yy := Trunc(y);
yB := yy +1;
end;
end;
if y256 < 0 then yi := -1
else yi := y256 shr 8;
weightedColor.Reset;
xf := x256 and $FF;
yf := y256 and $FF;
weight := Round(xf * yf * 255); //top-left
if weight > 0 then
begin
if (x < 0) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yy * iw], weight);
end;
color.Reset;
weight := Round((1-xf) * yf * 255); //top-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yy * iw], weight);
end;
weight := (($100 - xf) * ($100 - yf)) shr 8; //top-left
if (xi < 0) or (yi < 0) then
color.AddWeight(weight) else
color.Add(pixels[xi + yi * iw], weight);
weight := Round(xf * (1-yf) * 255); //bottom-left
if weight > 0 then
begin
if (x < 0) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yB * iw], weight);
end;
weight := (xf * ($100 - yf)) shr 8; //top-right
if ((xi+1) >= iw) or (yi < 0) then
color.AddWeight(weight) else
color.Add(pixels[(xi+1) + yi * iw], weight);
weight := Round((1-xf) * (1-yf) * 255); //bottom-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yB * iw], weight);
end;
Result := weightedColor.Color;
end;
//------------------------------------------------------------------------------
weight := (($100 - xf) * yf) shr 8; //bottom-left
if (xi < 0) or ((yi+1) >= ih) then
color.AddWeight(weight) else
color.Add(pixels[(xi) + (yi+1) * iw], weight);
// WeightedBilinearResample: A modified bilinear resampler that's
// less blurry but also a little more pixelated.
function WeightedBilinearResample(img: TImage32; x, y: double): TColor32;
var
iw, ih: integer;
xx, yy, xR, yB: integer;
weight: integer;
pixels: TArrayOfColor32;
weightedColor: TWeightedColor;
xf, yf: double;
begin
iw := img.Width;
ih := img.Height;
pixels := img.Pixels;
weight := (xf * yf) shr 8; //bottom-right
if (xi + 1 >= iw) or (yi + 1 >= ih) then
color.AddWeight(weight) else
color.Add(pixels[(xi+1) + (yi+1) * iw], weight);
if (x < 0) then
begin
if (x < -0.5) then
begin
xf := -x;
end else
begin
x := 0;
xf := 0;
end;
xx := 0;
xR := 0;
end else
begin
xf := 1-frac(x);
if x >= iw -1 then
begin
xx := iw -1;
xR := xx;
end else
begin
xx := Trunc(x);
xR := xx +1;
end;
end;
Result := color.Color;
if (y < 0) then
begin
if (y < -0.5) then
begin
yf := -y;
end else
begin
y := 0;
yf := 0;
end;
yy := 0;
yB := 0;
end else
begin
yf := 1-frac(y);
if y >= ih -1 then
begin
yy := ih -1;
yB := yy;
end else
begin
yy := Trunc(y);
yB := yy +1;
end;
end;
weightedColor.Reset;
weight := sinWeighted[Round(xf * yf * 255)]; //top-left
if weight > 0 then
begin
if (x < 0) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yy * iw], weight);
end;
weight := sinWeighted[Round((1-xf) * yf * 255)]; //top-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y < 0) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yy * iw], weight);
end;
weight := sinWeighted[Round(xf * (1-yf) * 255)]; //bottom-left
if weight > 0 then
begin
if (x < 0) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xx + yB * iw], weight);
end;
weight := sinWeighted[Round((1-xf) * (1-yf) * 255)]; //bottom-right
if weight > 0 then
begin
if (x > iw - 0.5) or (y > ih - 0.5) then
weightedColor.AddWeight(weight) else
weightedColor.Add(pixels[xR + yB * iw], weight);
end;
Result := weightedColor.Color;
end;
//------------------------------------------------------------------------------
@ -127,7 +281,8 @@ end;
//------------------------------------------------------------------------------
type
TBiCubicEdgeAdjust = (eaNone, eaOne, eaTwo, eaThree, eaFour);
TBiCubicEdgeAdjust = (eaCenterFill,
eaPreStart, eaStart, eaPostStart, eaEnd, eaPostEnd);
var
byteFrac: array [0..255] of double;
@ -136,48 +291,49 @@ var
//------------------------------------------------------------------------------
function CubicHermite(aclr: PColor32; t: Byte; bce: TBiCubicEdgeAdjust): TColor32;
function CubicInterpolate(aclr: PColor32;
t: Byte; bce: TBiCubicEdgeAdjust): TColor32;
var
a,b,c,d: PARGB;
q: TARGB;
aa, bb, cc: integer;
aa, bb, m0, m1: double;
t1, t2, t3: double;
res: TARGB absolute Result;
const
clTrans: TColor32 = clNone32;
begin
case bce of
eaOne:
eaPreStart:
begin
a := @clTrans;
b := @clTrans;
c := PARGB(aclr);
Inc(aclr);
d := PARGB(aclr);
d := c;
end;
eaTwo:
eaStart:
begin
Result := aclr^;
Exit;
end;
eaPostStart:
begin
a := PARGB(aclr);
b := a;
Inc(aclr);
c := PARGB(aclr);
Inc(aclr);
d := PARGB(aclr);
end;
eaThree:
begin
a := PARGB(aclr);
Inc(aclr);
b := PARGB(aclr);
Inc(aclr);
c := PARGB(aclr);
d := c;
end;
eaFour:
eaEnd:
begin
a := PARGB(aclr);
Inc(aclr);
b := PARGB(aclr);
Result := aclr^;
Exit;
end;
eaPostEnd:
begin
Inc(aclr);
a := PARGB(aclr);
b := a;
c := @clTrans;
d := @clTrans;
end;
@ -198,14 +354,21 @@ begin
result := clNone32;
Exit;
end
else if (b = c) then
begin
result := b.Color;
Exit;
end
else if b.A = 0 then
begin
// ignore differences between b & c's color channels
q := c^;
q.A := 0;
b := @q;
end;
if c.A = 0 then
begin
// ignore differences between b & c's color channels
q := b^;
q.A := 0;
c := @q;
@ -215,78 +378,252 @@ begin
t2 := byteFracSq[t];
t3 := byteFracCubed[t];
aa := Integer(-a.A + 3*b.A - 3*c.A + d.A) div 2;
bb := Integer(2*a.A - 5*b.A + 4*c.A - d.A) div 2;
cc := Integer(-a.A + c.A) div 2;
Res.A := ClampByte(aa*t3 + bb*t2 + cc*t1 + b.A);
// find piecewise bicubic interpolation between pixel_b and pixel_c
// at point 't' (as byte div 255) ...
// given parametric equation aa(t^3) + bb(t^2) + cc(t)+ dd = 0
// where t(0) = pixel_b and t(1) = pixel_c
// let m1 = slope at pixel_b (using slope of pixel_c - pixel_a)
// let m2 = slope at pixel_c (using slope of pixel_d - pixel_b)
// then t(0) = aa(0^3) + bb(0^2) + cc(0) + dd = dd
// then t(1) = aa(1^3) + bb(1^2) + cc(1) + dd = aa + bb + cc + dd
// differentiating parametic equation at t'(0) and t'(1) ...
// t'(0) = m0 = 3*aa(0^2) + 2*bb(0) + cc = cc
// t'(1) = m1 = 3*aa(1^2) + 2*bb(1) + cc = 3*aa + 2*bb + cc
// t(0) = dd ::EQ1
// t(1) = aa+bb+cc+dd ::EQ2
// t'(0) = cc ::EQ3
// t'(1) = 3*aa + 2*bb + cc ::EQ4
// solving simultaneous equations
// aa = 2*t(0) -2*t(1) +t'(0) +t'(1)
// bb = 3*t(1) -3*t(0) -2*t'(0) -t'(1)
// cc = m0
// dd = t(0)
aa := Integer(-a.R + 3*b.R - 3*c.R + d.R) div 2;
bb := Integer(2*a.R - 5*b.R + 4*c.R - d.R) div 2;
cc := Integer(-a.R + c.R) div 2;
Res.R := ClampByte(aa*t3 + bb*t2 + cc*t1 + b.R);
m0 {aka t'(0)} := (c.A - a.A) /2;
m1 {aka t'(1)} := (d.A - b.A) /2;
aa := 2*b.A - 2*c.A + m0 + m1;
bb := 3*c.A -3*b.A -2*m0 - m1;
Res.A := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.A);
aa := Integer(-a.G + 3*b.G - 3*c.G + d.G) div 2;
bb := Integer(2*a.G - 5*b.G + 4*c.G - d.G) div 2;
cc := Integer(-a.G + c.G) div 2;
Res.G := ClampByte(aa*t3 + bb*t2 + cc*t1 + b.G);
m0 := (c.R - a.R) /2;
m1 := (d.R - b.R) /2;
aa := 2*b.R - 2*c.R + m0 + m1;
bb := 3*c.R -3*b.R -2*m0 - m1;
Res.R := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.R);
aa := Integer(-a.B + 3*b.B - 3*c.B + d.B) div 2;
bb := Integer(2*a.B - 5*b.B + 4*c.B - d.B) div 2;
cc := Integer(-a.B + c.B) div 2;
Res.B := ClampByte(aa*t3 + bb*t2 + cc*t1 + b.B);
m0 := (c.G - a.G) /2;
m1 := (d.G - b.G) /2;
aa := 2*b.G - 2*c.G + m0 + m1;
bb := 3*c.G -3*b.G -2*m0 - m1;
Res.G := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.G);
m0 := (c.B - a.B) /2;
m1 := (d.B - b.B) /2;
aa := 2*b.B - 2*c.B + m0 + m1;
bb := 3*c.B -3*b.B -2*m0 - m1;
Res.B := ClampByte(aa*t3 + bb*t2 + m0*t1 + b.B);
end;
//------------------------------------------------------------------------------
function BicubicResample(img: TImage32; x256, y256: Integer): TColor32;
function BicubicResample(img: TImage32; x, y: double): TColor32;
var
i, dx,dy, pi, iw, w,h: Integer;
i, pi, iw, ih, last: Integer;
c: array[0..3] of TColor32;
x, y: Integer;
xFrac, yFrac: byte;
bceX, bceY: TBiCubicEdgeAdjust;
begin
Result := clNone32;
iw := img.Width;
w := iw -1;
h := img.Height -1;
ih := img.Height;
last := iw * ih -1;
x := Abs(x256) shr 8;
y := Abs(y256) shr 8;
if (x256 < -$FF) or (x > w) or (y256 < -$FF) or (y > h) then Exit;
if (x256 < 0) then bceX := eaOne
else if (x = 0) then bceX := eaTwo
else if (x256 > w shl 8) then bceX := eaFour
else if (x256 > (w -1) shl 8) then bceX := eaThree
else bceX := eaNone;
if (bceX = eaOne) or (bceX = eaTwo) then dx := 1
else dx := 0;
if (y256 < 0) then bceY := eaOne
else if y = 0 then bceY := eaTwo
else if y = h -1 then bceY := eaThree
else if y = h then bceY := eaFour
else bceY := eaNone;
if (bceY = eaOne) or (bceY = eaTwo) then dy := 1
else dy := 0;
pi := (y -1 +dy) * iw + (x -1 + dx);
if bceY = eaFour then dx := 2
else if bceY = eaThree then dx := 1
else dx := 0;
for i := dy to 3 -dx do
if x < 1 then
begin
c[i] := CubicHermite(@img.Pixels[pi], x256 and $FF, bceX);
inc(pi, iw);
if x < -0.5 then
begin
xFrac := Round((1+x) *255);
bceX := eaPreStart;
end
else if (x < 0) or
((iw = 1) and (x < 0.5)) then
begin
x := 0;
xFrac := 0;
bceX := eaStart;
end
else if (iw = 1) and (x > 0.5) then
begin
// the following is a workaround to avoid the increment in eaPostEnd
bceX := eaPreStart; // ie anti-aliase but without increment
xFrac := Round((1-x) *127); // reversed because 'end' not 'start'
end else
begin
xFrac := Round(frac(x) *255);
bceX := eaPostStart;
end;
end else
begin
xFrac := Round(frac(x) *255);
if x > iw - 1 then
begin
if x > iw - 0.5 then bceX := eaPostEnd
else bceX := eaEnd
end
else
bceX := eaCenterFill;
end;
Result := CubicHermite(@c[dy], y256 and $FF, bceY);
if y < 1 then
begin
if y < -0.5 then
begin
yFrac := Round((1+y) *255);
bceY := eaPreStart;
end
else if (y < 0) or
((ih = 1) and (y < 0.5)) then
begin
y := 0;
yFrac := 0;
bceY := eaStart;
end
else if (ih = 1) and (y > 0.5) then
begin
// the following is a workaround to avoid the increment in eaPostEnd
bceY := eaPreStart; // ie anti-aliase but without increment
yFrac := Round((1-y) *127); // reversed because 'end' not 'start'
end else
begin
yFrac := Round(frac(y) *255);
bceY := eaPostStart;
end;
end else
begin
yFrac := Round(frac(y) *255);
if y > ih - 1 then
begin
if y > ih - 0.5 then bceY := eaPostEnd
else bceY := eaEnd
end
else
bceY := eaCenterFill;
end;
x := Max(0, Min(iw -1, x -1));
y := Max(0, Min(ih -1, y -1));
pi := Trunc(y) * iw + Trunc(x);
for i := 0 to 3 do
begin
c[i] := CubicInterpolate(@img.Pixels[pi], xFrac, bceX);
inc(pi, iw);
if pi > last then break;
end;
Result := CubicInterpolate(@c[0], yFrac, bceY);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
{$RANGECHECKS OFF} // negative index usage for Delphi 7-2007
procedure PremultiplyAlpha(pSrc, pDst: PARGB; count: nativeint);
var
a: byte;
tab: PByteArray;
c: TColor32;
s, d: PColor32Array;
begin
if count = 0 then exit;
// Use negative index trick
inc(pSrc, count);
inc(pDst, count);
count := -count;
// This function is optmized with the assumption that if a pixel has a certain
// alpha channel, then the propability that the following pixels have the same
// alpha channel, is very high.
c := PColor32Array(pSrc)[count];
a := c shr 24;
while True do
begin
case a of
0: // Special handling for 0 => color becomes black
begin
// Win32: Load stack variable into CPU register
s := PColor32Array(pSrc);
d := PColor32Array(pDst);
while True do
begin
d[count] := 0;
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if a <> 0 then break;
end;
end;
255: // Special handling for 255 => no color change
begin
// Win32: Load stack variable into CPU register
s := PColor32Array(pSrc);
d := PColor32Array(pDst);
if s = d then // if source=dest, we can skip writing to d
begin
while True do
begin
//d[count] := c; // skip the write
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if a <> 255 then break;
end;
end
else
begin
while True do
begin
d[count] := c;
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if a <> 255 then break;
end;
end;
end;
else
// Premultiply the alpha channel
// Win32: Load stack variable into CPU register
s := PColor32Array(pSrc);
// Win32: This line "breaks" Delphi's register allocator
//d := PColor32Array(pDst);
while True do
begin
tab := @MulTable[a];
c := (c and $FF000000) or
(tab[Byte(c shr 16)] shl 16) or
(tab[Byte(c shr 8)] shl 8) or
(tab[Byte(c )] );
//d[count] := c;
PColor32Array(pDst)[count] := c;
inc(count);
if count = 0 then exit;
c := s[count];
a := c shr 24;
if (a = 0) or (a = 255) then break;
end;
end;
end;
end;
{$IFDEF RANGECHECKS_ENABLED}
{$RANGECHECKS ON}
{$ENDIF RANGECHECKS_ENABLED}
//------------------------------------------------------------------------------
// BoxDownSampling and related functions
//------------------------------------------------------------------------------
@ -355,19 +692,53 @@ begin
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image: TImage32; scaleX, scaleY: double);
begin
BoxDownSampling(Image, Image, scaleX, scaleY);
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image: TImage32; scale: double);
begin
BoxDownSampling(Image, Image, scale);
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image: TImage32; newWidth, newHeight: Integer);
begin
BoxDownSampling(Image, Image, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image, TargetImage: TImage32; scaleX, scaleY: double);
begin
BoxDownSampling(Image, TargetImage,
Max(1, Integer(Round(Image.Width * scaleX))),
Max(1, Integer(Round(Image.Height * scaleY))));
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image, TargetImage: TImage32; scale: double);
begin
BoxDownSampling(Image, TargetImage,
Max(1, Integer(Round(Image.Width * scale))),
Max(1, Integer(Round(Image.Height * scale))));
end;
//------------------------------------------------------------------------------
procedure BoxDownSampling(Image, TargetImage: TImage32; newWidth, newHeight: Integer);
var
x,y, x256,y256,xx256,yy256: Integer;
sx,sy: double;
tmp: TArrayOfColor32;
pc: PColor32;
scaledX: array of Integer;
scaledX: TArrayOfInteger;
begin
sx := Image.Width/newWidth * 256;
sy := Image.Height/newHeight * 256;
SetLength(tmp, newWidth * newHeight);
NewColor32Array(tmp, newWidth * newHeight, True);
SetLength(scaledX, newWidth +1); //+1 for fractional overrun
NewIntegerArray(scaledX, newWidth, True);
for x := 0 to newWidth -1 do
scaledX[x] := Round((x+1) * sx);
@ -388,11 +759,75 @@ begin
y256 := yy256;
end;
Image.BeginUpdate;
Image.SetSize(newWidth, newHeight);
Move(tmp[0], Image.Pixels[0], newWidth * newHeight * SizeOf(TColor32));
Image.EndUpdate;
TargetImage.AssignPixelArray(tmp, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure NearestNeighborResize(Image: TImage32; newWidth, newHeight: Integer);
begin
NearestNeighborResize(Image, Image, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure NearestNeighborResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer);
var
x, y, offset: Integer;
scaledXi, scaledYiOffset: TArrayOfInteger;
tmp: TArrayOfColor32;
pc: PColor32;
pixels: TArrayOfColor32;
begin
//this NearestNeighbor code is slightly more efficient than
//the more general purpose one in Img32.Resamplers
if (newWidth = Image.Width) and (newHeight = Image.Height) then
begin
if TargetImage <> Image then TargetImage.Assign(Image);
Exit;
end;
NewColor32Array(tmp, newWidth * newHeight, True);
//get scaled X & Y values once only (storing them in lookup arrays) ...
NewIntegerArray(scaledXi, newWidth, True);
for x := 0 to newWidth -1 do
scaledXi[x] := (x * Image.Width) div newWidth;
NewIntegerArray(scaledYiOffset, newHeight, True);
SetLength(scaledYiOffset, newHeight);
for y := 0 to newHeight -1 do
//scaledYiOffset[y] := Round(y * Image.Height / newHeight) * Image.Width;
scaledYiOffset[y] := ((y * Image.Height) div newHeight) * Image.Width;
pc := @tmp[0];
pixels := Image.Pixels;
for y := 0 to newHeight - 1 do
begin
offset := scaledYiOffset[y];
for x := 0 to newWidth - 1 do
begin
pc^ := pixels[scaledXi[x] + offset];
inc(pc);
end;
end;
TargetImage.AssignPixelArray(tmp, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure ResamplerResize(Image: TImage32; newWidth, newHeight: Integer);
begin
ResamplerResize(Image, Image, newWidth, newHeight);
end;
//------------------------------------------------------------------------------
procedure ResamplerResize(Image, TargetImage: TImage32; newWidth, newHeight: Integer);
var
mat: TMatrixD;
begin
mat := IdentityMatrix;
MatrixScale(mat, newWidth/Image.Width, newHeight/Image.Height);
AffineTransformImage(Image, TargetImage, mat);
end;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
@ -403,12 +838,15 @@ const
inv255 : double = 1/255;
inv255sqrd : double = 1/(255*255);
inv255cubed: double = 1/(255*255*255);
piDiv256 : double = Pi / 256;
begin
for i := 0 to 255 do
begin
byteFrac[i] := i *inv255;
byteFracSq[i] := i*i *inv255sqrd;
byteFracCubed[i] := i*i*i *inv255cubed;
sinWeighted[i] := Round((Sin(i * piDiv256 - Pi/2) +1) /2 * 255);
end;
end;
//------------------------------------------------------------------------------
@ -419,6 +857,7 @@ initialization
rNearestResampler := RegisterResampler(NearestResampler, 'NearestNeighbor');
rBilinearResampler := RegisterResampler(BilinearResample, 'Bilinear');
rBicubicResampler := RegisterResampler(BicubicResample, 'HermiteBicubic');
rWeightedBilinear := RegisterResampler(WeightedBilinearResample, 'WeightedBilinear');
DefaultResampler := rBilinearResampler;
end.

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,7 @@ const
hClass = $E45C07DD; // Class
hClip_045_path = $B6C7D97A; // Clip-path
hClippath = $241B0E0D; // Clippath
hcollapse = $22A7B0EC; // collapse
hColor = $E953FD29; // Color
hCurrentColor = $5B8F31B0; // CurrentColor
hCx = $B5177A89; // Cx
@ -45,6 +46,7 @@ const
hfeFuncG = $E45FE81A; // feFuncG
hfeFuncR = $F8BB10C8; // feFuncR
hfeGaussianBlur = $B2225552; // feGaussianBlur
hfeImage = $905096A0; // feImage
hfeMerge = $A2C358C0; // feMerge
hfeMergeNode = $F5F1E90F; // feMergeNode
hfeOffset = $04493A72; // feOffset
@ -70,12 +72,15 @@ const
hGradientUnits = $07DD34B6; // GradientUnits
hGramma = $302368DC; // Gramma
hHeight = $52FDF336; // Height
hhidden = $4C4D777D; // hidden
hHref = $8E926F4B; // Href
hId = $1B60404D; // Id
hImage = $D58C8637; // Image
hIn = $4D5FA44B; // In
hIn2 = $FBFE02B1; // In2
hIntercept = $7CBB607F; // Intercept
hItalic = $F07E7786; // Italic
hJustify = $13E85AB8; // Justify
hK1 = $33176D43; // K1
hK2 = $DD11C139; // K2
hK3 = $CF4B25AC; // K3
@ -111,6 +116,7 @@ const
hOrient = $EFF6C65A; // Orient
hOut = $12067E90; // Out
hOver = $C9B82D21; // Over
hOverflow_045_Wrap = $C0B6980D; // Overflow-Wrap
hOverlay = $383BEA5E; // Overlay
hPad = $4A0CAD48; // Pad
hPath = $AD8A7AB5; // Path
@ -129,6 +135,7 @@ const
hRefY = $480CECDB; // RefY
hRepeat = $FF80069D; // Repeat
hResult = $47CD519F; // Result
hRotate = $E8A48E19; // Rotate
hRound = $323B0E24; // Round
hRx = $3ABF70F3; // Rx
hRy = $0C7D9470; // Ry
@ -139,10 +146,12 @@ const
hSlope = $4774735C; // Slope
hSourceAlpha = $F891B958; // SourceAlpha
hSourceGraphic = $A4DB1DC2; // SourceGraphic
hspace = $488AD9F6; // space
hspecularExponent = $93D520E8; // specularExponent
hSpreadMethod = $A08CEB57; // SpreadMethod
hSquare = $20E48144; // Square
hStart = $84DC271F; // Start
hStartOffset = $688E51A0; // StartOffset
hstdDeviation = $00D13F6A; // stdDeviation
hStop = $930CA7F2; // Stop
hStop_045_Color = $9FD6E0BE; // Stop-Color
@ -167,6 +176,7 @@ const
hText = $7F3B51AB; // Text
hText_045_Anchor = $D0D82FE8; // Text-Anchor
hText_045_Decoration = $3BC20862; // Text-Decoration
hTextArea = $0A75EDBF; // TextArea
hTextLength = $DA75EDC0; // TextLength
hTextPath = $18F2748E; // TextPath
hTimes = $FF0E1FBE; // Times
@ -179,7 +189,11 @@ const
hUserSpaceOnUse = $3D19F8A4; // UserSpaceOnUse
hValues = $33429E55; // Values
hViewbox = $AEF665C8; // Viewbox
hVisibility = $9F832B01; // Visibility
hvisible = $96C79D31; // visible
hWhite_045_Space = $0A1C0679; // White-Space
hWidth = $96BEECA0; // Width
hWord_045_Break = $A99E7C27; // Word-Break
hX = $9303A5E5; // X
hX1 = $74A7DE27; // X1
hX2 = $168E21F1; // X2

View file

@ -2,10 +2,10 @@ unit Img32.SVG.Path;
(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.0 *
* Date : 28 December 2021 *
* Version : 4.7 *
* Date : 6 January 2025 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2021 *
* Copyright : Angus Johnson 2019-2025 *
* *
* Purpose : Essential structures and functions to read SVG Path elements *
* *
@ -56,7 +56,10 @@ type
fCtrlPts : TPathD;
fExtend : integer;
protected
function GetFlattened: TPathD; virtual;
procedure Changed; {$IFDEF INLINE} inline; {$ENDIF}
procedure RequireFlattened; virtual;
function GetFlattened: TPathD; overload;
procedure GetFlattened2(var Result: TPathD); overload;
procedure GetFlattenedInternal; virtual; abstract;
procedure Scale(value: double); virtual;
function DescaleAndOffset(const pt: TPointD): TPointD; overload;
@ -88,7 +91,7 @@ type
TSvgCurvedSeg = class(TSvgPathSeg)
protected
pendingScale: double;
function GetFlattened: TPathD; override;
procedure RequireFlattened; override;
function GetPreviousCtrlPt: TPointD;
public
function GetLastCtrlPt: TPointD; virtual;
@ -198,10 +201,15 @@ type
fSegs : array of TSvgPathSeg;
fPendingScale : double;
fPathOffset : TPointD;
fSegsCount : integer;
function GetCount: integer;
function GetSeg(index: integer): TSvgPathSeg;
function AddSeg(segType: TSvgPathSegType;
const startPt: TPointD; const pts: TPathD): TSvgPathSeg;
protected
procedure GrowSegs;
procedure SegsLoaded;
procedure InitSegs(Capacity: Integer);
public
isClosed : Boolean;
constructor Create(parent: TSvgPath);
@ -256,7 +264,7 @@ type
procedure ScaleAndOffset(scale: double; dx, dy: integer);
function GetStringDef(relative: Boolean; decimalPrec: integer): string;
function AddPath: TSvgSubPath;
function AddPath(SegsCapacity: Integer = 0): TSvgSubPath;
procedure DeleteSubPath(subPath: TSvgSubPath);
property Bounds: TRectD read GetBounds;
property CtrlBounds: TRectD read GetControlBounds;
@ -268,15 +276,14 @@ type
UTF8Strings = array of UTF8String;
function GetSvgArcInfoRect(const p1, p2: TPointD; radii: TPointD; phi_rads: double;
fA, fS: boolean): TRectD;
function GetSvgArcInfoRect(const p1, p2: TPointD;
radii: TPointD; phi_rads: double; fA, fS: boolean): TRectD;
implementation
resourcestring
rsSvgPathRangeError = 'TSvgPath.GetPath range error';
rsSvgSubPathRangeError = 'TSvgSubPath.GetSeg range error';
//rsSvgSegmentRangeError = 'TSvgSegment.GetVal range error';
//------------------------------------------------------------------------------
// Miscellaneous functions ...
@ -338,36 +345,68 @@ end;
function GetSingleDigit(var c, endC: PUTF8Char;
out digit: integer): Boolean;
var
cc: PUTF8Char;
ch: UTF8Char;
begin
Result := SkipBlanksAndComma(c, endC) and (c^ >= '0') and (c^ <= '9');
cc := SkipBlanksAndComma(c, endC);
Result := cc < endC;
if not Result then
begin
c := cc;
Exit;
end;
ch := cc^;
Result := (ch >= '0') and (ch <= '9');
if not Result then Exit;
digit := Ord(c^) - Ord('0');
inc(c);
digit := Ord(ch) - Ord('0');
c := cc + 1;
end;
//------------------------------------------------------------------------------
const
SegTypeMap: array['A'..'Z'] of TSvgPathSegType = (
stArc, // A
stUnknown, // B
stCBezier, // C
stUnknown, // D
stUnknown, // E
stUnknown, // F
stUnknown, // G
stHorz, // H
stUnknown, // I
stUnknown, // J
stUnknown, // K
stLine, // L
stMove, // M
stUnknown, // N
stUnknown, // O
stUnknown, // P
stQBezier, // Q
stUnknown, // R
stCSpline, // S
stQSpline, // T
stUnknown, // U
stVert, // V
stUnknown, // W
stUnknown, // X
stUnknown, // Y
stClose // Z
);
function GetSegType(var c, endC: PUTF8Char; out isRelative: Boolean): TSvgPathSegType;
var
ch: UTF8Char;
begin
Result := stUnknown;
if not SkipBlanks(c, endC) then Exit;
ch := upcase(c^);
if not CharInSet(ch,
['A','C','H','M','L','Q','S','T','V','Z']) then Exit;
ch := c^;
case ch of
'M': Result := stMove;
'L': Result := stLine;
'H': Result := stHorz;
'V': Result := stVert;
'A': Result := stArc;
'Q': Result := stQBezier;
'C': Result := stCBezier;
'T': Result := stQSpline;
'S': Result := stCSpline;
'Z': Result := stClose;
'a'..'z': Result := SegTypeMap[UTF8Char(Byte(ch) and not $20)];
'A'..'Z': Result := SegTypeMap[ch];
end;
isRelative := c^ >= 'a';
if Result = stUnknown then Exit;
isRelative := ch >= 'a';
inc(c);
end;
//------------------------------------------------------------------------------
@ -411,35 +450,37 @@ begin
begin
fCtrlPts := ScalePath(fCtrlPts, value);
fFirstPt := ScalePoint(fFirstPt, value);
Changed;
end;
end;
//------------------------------------------------------------------------------
function TSvgPathSeg.DescaleAndOffset(const pt: TPointD): TPointD;
begin
Result := pt;
OffsetPoint(Result, -parent.PathOffset.X, -parent.PathOffset.Y);
Result := TranslatePoint(pt, -parent.PathOffset.X, -parent.PathOffset.Y);
Result := ScalePoint(Result, 1/Owner.Scale);
end;
//------------------------------------------------------------------------------
function TSvgPathSeg.DescaleAndOffset(const p: TPathD): TPathD;
begin
Result := OffsetPath(p, -parent.PathOffset.X, -parent.PathOffset.Y);
Result := TranslatePath(p, -parent.PathOffset.X, -parent.PathOffset.Y);
Result := ScalePath(Result, 1/Owner.Scale);
end;
//------------------------------------------------------------------------------
procedure TSvgPathSeg.Offset(dx, dy: double);
begin
fFirstPt := OffsetPoint(fFirstPt, dx, dy);
fCtrlPts := OffsetPath(fCtrlPts, dx, dy);
fFirstPt := TranslatePoint(fFirstPt, dx, dy);
fCtrlPts := TranslatePath(fCtrlPts, dx, dy);
Changed;
end;
//------------------------------------------------------------------------------
procedure TSvgPathSeg.SetCtrlPts(const pts: TPathD);
begin
fCtrlPts := pts;
Changed;
end;
//------------------------------------------------------------------------------
@ -449,7 +490,7 @@ var
begin
len := Length(pts);
Result := (len <> 0) and (fExtend <> 0) and (len mod fExtend = 0);
if Result then Img32.Vector.AppendPath(fCtrlPts, pts);
if Result then ConcatPaths(fCtrlPts, pts);
end;
//------------------------------------------------------------------------------
@ -459,9 +500,29 @@ begin
end;
//------------------------------------------------------------------------------
procedure TSvgPathSeg.Changed;
begin
if fFlatPath <> nil then
fFlatPath := nil; // DynArrayClear
end;
//------------------------------------------------------------------------------
procedure TSvgPathSeg.RequireFlattened;
begin
if fFlatPath = nil then
GetFlattenedInternal;
end;
//------------------------------------------------------------------------------
function TSvgPathSeg.GetFlattened: TPathD;
begin
GetFlattenedInternal;
RequireFlattened;
Result := fFlatPath;
end;
//------------------------------------------------------------------------------
procedure TSvgPathSeg.GetFlattened2(var Result: TPathD);
begin // uses less DynArrayAsg and DynArrayClear calls
RequireFlattened;
Result := fFlatPath;
end;
//------------------------------------------------------------------------------
@ -483,7 +544,7 @@ end;
procedure TSvgStraightSeg.GetFlattenedInternal;
begin
fFlatPath := PrePendPoint(fFirstPt, fCtrlPts);
PrePendPoint(fFirstPt, fCtrlPts, fFlatPath);
end;
//------------------------------------------------------------------------------
@ -498,15 +559,16 @@ begin
end;
//------------------------------------------------------------------------------
function TSvgCurvedSeg.GetFlattened: TPathD;
procedure TSvgCurvedSeg.RequireFlattened;
begin
//if the image has been rendered previously at a lower resolution, then
//redo the flattening otherwise curves my look very rough.
if (pendingScale < Parent.fPendingScale) then
begin
pendingScale := Parent.fPendingScale;
GetFlattenedInternal;
Result := fFlatPath;
Changed;
end;
inherited RequireFlattened;
end;
//------------------------------------------------------------------------------
@ -517,18 +579,27 @@ end;
//------------------------------------------------------------------------------
function TSvgCurvedSeg.GetPreviousCtrlPt: TPointD;
var
UseParentLastCtrlPt: Boolean;
begin
if (fIdx > 0) and (fSegType in [stQSpline, stCSpline]) then
UseParentLastCtrlPt := False;
if fIdx > 0 then
begin
if (fSegType = stQSpline) and
(fParent[fIdx -1].fSegType in [stQBezier, stQSpline]) then
Result := TSvgCurvedSeg(fParent[fIdx -1]).GetLastCtrlPt
else if (fSegType = stCSpline) and
(fParent[fIdx -1].fSegType in [stCBezier, stCSpline]) then
Result := TSvgCurvedSeg(fParent[fIdx -1]).GetLastCtrlPt
else
Result := fFirstPt;
end else
case fSegType of
stQSpline:
case fParent[fIdx -1].fSegType of
stQBezier, stQSpline: UseParentLastCtrlPt := True;
end;
stCSpline:
case fParent[fIdx -1].fSegType of
stCBezier, stCSpline: UseParentLastCtrlPt := True;
end;
end;
end;
if UseParentLastCtrlPt then
Result := TSvgCurvedSeg(fParent[fIdx -1]).GetLastCtrlPt
else
Result := fFirstPt;
end;
@ -562,12 +633,13 @@ begin
begin
dx := ai.startPos.X - startPos.X;
dy := ai.startPos.Y - startPos.Y;
OffsetRect(rec, dx, dy);
TranslateRect(rec, dx, dy);
startPos := ai.startPos;
endPos := OffsetPoint(endPos, dx, dy);
endPos := TranslatePoint(endPos, dx, dy);
end;
end;
SetCtrlPtsFromArcInfo;
Changed;
end;
//------------------------------------------------------------------------------
@ -611,13 +683,14 @@ end;
procedure TSvgASegment.SetCtrlPtsFromArcInfo;
begin
SetLength(fCtrlPts, 5);
NewPointDArray(fCtrlPts, 5, True);
with fArcInfo do
begin
fCtrlPts[0] := startPos;
GetRectBtnPoints(fCtrlPts[1], fCtrlPts[2], fCtrlPts[3]);
fCtrlPts[4] := endPos;
end;
Changed;
end;
//------------------------------------------------------------------------------
@ -639,7 +712,7 @@ begin
p := Arc(rec, a1, a2, pendingScale);
if rectAngle <> 0 then
p := RotatePath(p, rec.MidPoint, rectAngle);
AppendPath(fFlatPath, p);
ConcatPaths(fFlatPath, p);
end;
end;
//------------------------------------------------------------------------------
@ -661,17 +734,18 @@ end;
procedure TSvgASegment.ReverseArc;
begin
fArcInfo.sweepClockW := not fArcInfo.sweepClockW;
Changed;
end;
//------------------------------------------------------------------------------
procedure TSvgASegment.Offset(dx, dy: double);
begin
inherited;
inherited; // calls Changed
with fArcInfo do
begin
OffsetRect(rec, dx, dy);
startPos := OffsetPoint(startPos, dx, dy);
endPos := OffsetPoint(endPos, dx, dy);
TranslateRect(rec, dx, dy);
startPos := TranslatePoint(startPos, dx, dy);
endPos := TranslatePoint(endPos, dx, dy);
end;
end;
//------------------------------------------------------------------------------
@ -679,7 +753,7 @@ end;
procedure TSvgASegment.Scale(value: Double);
begin
if (value = 0) or (value = 1) then Exit;
inherited;
inherited; // calls Changed
with fArcInfo do
begin
rec := ScaleRect(rec, value);
@ -691,7 +765,7 @@ end;
procedure TSvgASegment.SetCtrlPts(const ctrlPts: TPathD);
begin
//SetCtrlPtsFromArcInfo;
//SetCtrlPtsFromArcInfo; // calls Changed
end;
//------------------------------------------------------------------------------
@ -754,7 +828,7 @@ var
i, len: integer;
begin
len := Length(fCtrlPts) div 3;
SetLength(Result, len);
NewPointDArray(Result, len, True);
for i := 0 to High(Result) do
Result[i] := fCtrlPts[i*3 +2];
end;
@ -873,7 +947,7 @@ var
i, len: integer;
begin
len := Length(fCtrlPts) div 2;
SetLength(Result, len);
NewPointDArray(Result, len, True);
for i := 0 to High(Result) do
Result[i] := fCtrlPts[i*2+1];
end;
@ -938,7 +1012,7 @@ var
i, len: integer;
begin
len := Length(fCtrlPts) div 2;
SetLength(Result, len);
NewPointDArray(Result, len, True);
for i := 0 to High(Result) do
Result[i] := fCtrlPts[i*2+1];
end;
@ -1074,13 +1148,17 @@ end;
function TSvgSubPath.GetFlattenedPath(pendingScale: double): TPathD;
var
i: integer;
flattenedPaths: TPathsD;
begin
if pendingScale <= 0 then pendingScale := 1.0;
if (pendingScale > fPendingScale) then
fPendingScale := pendingScale;
Result := nil;
for i := 0 to High(fSegs) do
AppendPath(Result, fSegs[i].GetFlattened);
SetLength(flattenedPaths, fSegsCount);
for i := 0 to fSegsCount - 1 do
fSegs[i].GetFlattened2(flattenedPaths[i]);
ConcatPaths(Result, flattenedPaths);
end;
//------------------------------------------------------------------------------
@ -1089,8 +1167,11 @@ function TSvgSubPath.AddSeg(segType: TSvgPathSegType;
var
i: integer;
begin
i := Length(fSegs);
SetLength(fSegs, i+1);
i := fSegsCount;
if i = Length(fSegs) then
GrowSegs;
inc(fSegsCount);
case segType of
stCBezier : Result := TSvgCSegment.Create(self, i, startPt);
stHorz : Result := TSvgHSegment.Create(self, i, startPt);
@ -1103,6 +1184,7 @@ begin
end;
fSegs[i] := Result;
Result.fCtrlPts := pts;
Result.fFlatPath := nil;
if Result is TSvgCurvedSeg then
TSvgCurvedSeg(Result).pendingScale := fPendingScale;
end;
@ -1113,8 +1195,11 @@ function TSvgSubPath.AddASeg(const startPt, endPt: TPointD; const rect: TRectD;
var
i: integer;
begin
i := Length(fSegs);
SetLength(fSegs, i+1);
i := fSegsCount;
if i = Length(fSegs) then
GrowSegs;
inc(fSegsCount);
Result := TSvgASegment.Create(self, i, startPt);
fSegs[i] := Result;
Result.pendingScale := self.fPendingScale;
@ -1126,7 +1211,7 @@ begin
rectAngle := angle;
sweepClockW := isClockwise;
end;
Result.SetCtrlPtsFromArcInfo;
Result.SetCtrlPtsFromArcInfo; // calls Changed
end;
//------------------------------------------------------------------------------
@ -1176,11 +1261,14 @@ function TSvgSubPath.AddZSeg(const endPt, firstPt: TPointD): TSvgZSegment;
var
i: integer;
begin
i := Length(fSegs);
SetLength(fSegs, i+1);
i := fSegsCount;
if i = Length(fSegs) then
GrowSegs;
inc(fSegsCount);
Result := TSvgZSegment.Create(self, i, endPt);
fSegs[i] := Result;
SetLength(Result.fCtrlPts, 1);
NewPointDArray(Result.fCtrlPts, 1, True);
Result.fCtrlPts[0] := firstPt;
isClosed := true;
end;
@ -1206,6 +1294,7 @@ begin
if not Result then Exit;
seg[cnt -1].Free;
SetLength(fSegs, cnt -1);
fSegsCount := cnt - 1;
if isClosed then isClosed := false;
end;
//------------------------------------------------------------------------------
@ -1213,10 +1302,22 @@ end;
function TSvgSubPath.GetSimplePath: TPathD;
var
i: integer;
paths: TPathsD;
begin
Result := Img32.Vector.MakePath([GetFirstPt.X, GetFirstPt.Y]);
for i := 0 to High(fSegs) do
AppendPath(Result, fSegs[i].GetOnPathCtrlPts);
if fSegsCount <= 1 then
begin
Result := Img32.Vector.MakePath(GetFirstPt);
for i := 0 to fSegsCount - 1 do
ConcatPaths(Result, fSegs[i].GetOnPathCtrlPts);
end
else
begin
SetLength(paths, 1 + fSegsCount);
paths[0] := Img32.Vector.MakePath(GetFirstPt);
for i := 0 to fSegsCount - 1 do
paths[1 + i] := fSegs[i].GetOnPathCtrlPts;
ConcatPaths(Result, paths);
end;
end;
//------------------------------------------------------------------------------
@ -1225,7 +1326,7 @@ var
pt: TPointD;
begin
Result := '';
if Length(fSegs) = 0 then Exit;
if fSegsCount = 0 then Exit;
if decimalPrec < -3 then decimalPrec := -3
else if decimalPrec > 4 then decimalPrec := 4;
@ -1273,13 +1374,35 @@ begin
for i := 0 to Count -1 do
fSegs[i].Free;
fSegs := nil;
fSegsCount := 0;
fPathOffset := NullPointD;
end;
//------------------------------------------------------------------------------
procedure TSvgSubPath.GrowSegs;
begin
SetLength(fSegs, (fSegsCount * 2) + 1);
end;
//------------------------------------------------------------------------------
procedure TSvgSubPath.SegsLoaded;
begin
// Trim the array to the actual used size
if Length(fSegs) <> fSegsCount then
SetLength(fSegs, fSegsCount);
end;
//------------------------------------------------------------------------------
procedure TSvgSubPath.InitSegs(Capacity: Integer);
begin
if Capacity > fSegsCount then
SetLength(fSegs, Capacity);
end;
//------------------------------------------------------------------------------
function TSvgSubPath.GetCount: integer;
begin
Result := Length(fSegs);
Result := fSegsCount;
end;
//------------------------------------------------------------------------------
@ -1287,8 +1410,7 @@ procedure TSvgSubPath.Offset(dx, dy: double);
var
i: integer;
begin
//fPathOffset := OffsetPoint(pathOffset, dx,dy); //DON'T DO THIS!
for i := 0 to High(fSegs) do fSegs[i].Offset(dx, dy);
for i := 0 to fSegsCount - 1 do fSegs[i].Offset(dx, dy);
end;
//------------------------------------------------------------------------------
@ -1323,7 +1445,7 @@ var
begin
p := nil;
for i := 0 to Count -1 do
AppendPath(p, fSegs[i].fFlatPath);
ConcatPaths(p, fSegs[i].fFlatPath);
Result := Img32.Vector.GetBoundsD(p);
end;
@ -1351,7 +1473,7 @@ begin
with fSubPaths[i] do
begin
if scale <> 1 then
for j := 0 to High(fSegs) do
for j := 0 to fSegsCount - 1 do
fSegs[j].Scale(scale);
Offset(dx,dy);
end;
@ -1392,15 +1514,78 @@ var
if ptCnt = ptCap then
begin
inc(ptCap, 8);
setLength(pts, ptCap);
SetLengthUninit(pts, ptCap);
end;
pts[ptCnt] := pt;
inc(ptCnt);
end;
procedure AllocEstimatedPtsCount(c, endC: PUTF8Char);
begin
// Count the numbers before the next segment type char
ptCap := 0;
while c < endC do
begin
// skip whitespaces
while (c < endC) and (c^ <= space) do
inc(c);
if c >= endC then
break;
case c^ of
'0'..'9', '-', '.', 'E', 'e':
begin
while (c < endC) and (c^ > space) do
inc(c);
Inc(ptCap);
end;
else
Break;
end;
end;
ptCap := ptCap div 2; // two numbers are one point
SetLength(pts, ptCap);
end;
function EstimateSegs(c, endC: PUTF8Char): Integer;
var
ch: UTF8Char;
begin
Result := 0;
while True do
begin
if c >= endC then
Break;
ch := c^;
inc(c);
case ch of
'A'..'Z', 'a'..'z':
begin
case ch of
'M', 'm': // move / close
Break;
'Z', 'z':
begin
Inc(Result);
Break;
end;
'E', 'e': ; // Exponent of a number
else
Inc(Result);
end;
end;
end;
end;
end;
var
ExpectedSegCount: Integer;
begin
Clear;
currSubPath := nil;
ExpectedSegCount := 1;
c := PUTF8Char(value);
endC := c + Length(value);
@ -1414,8 +1599,12 @@ begin
if currSegType = stMove then
begin
if currSubPath <> nil then
currSubPath.SegsLoaded; // Trim the segs array to the actual count
currSubPath := nil;
ExpectedSegCount := EstimateSegs(c, endc);
if isRelative then
lastPt := currPt else
lastPt := InvalidPointD;
@ -1426,21 +1615,31 @@ begin
if IsNumPending(c, endC, true) then
currSegType := stLine else
Continue;
Inc(ExpectedSegCount);
end
else if (currSegType = stClose) then
begin
if currPt.X = InvalidD then Continue;
if Assigned(currSubPath) and (currSubPath.Count > 0) then
begin
lastPt := currPt;
currPt := currSubPath.GetFirstPt;
currSubPath.AddZSeg(lastPt, currPt);
end else
begin
if not Assigned(currSubPath) then
currSubPath := AddPath(1);
currSubPath.AddZSeg(currPt, currPt);
end;
currSubPath.SegsLoaded; // Trim the segs array to the actual count
currSubPath := nil;
ExpectedSegCount := 1;
Continue;
end;
if not Assigned(currSubPath) then
currSubPath := AddPath;
currSubPath := AddPath(ExpectedSegCount);
pts := nil;
ptCnt := 0; ptCap := 0;
@ -1475,6 +1674,7 @@ begin
end;
stCBezier:
begin
AllocEstimatedPtsCount(c, endC);
while IsNumPending(c, endC, true) and
Parse2Num(c, endC, pt2, lastPt) and
Parse2Num(c, endC, pt3, lastPt) and
@ -1485,22 +1685,26 @@ begin
AddPt(currPt);
if isRelative then lastPt := currPt;
end;
SetLength(pts, ptCnt);
if Length(pts) <> ptCnt then
SetLength(pts, ptCnt);
currSubPath.AddSeg(stCBezier, firstPt, pts);
end;
stHorz:
begin
AllocEstimatedPtsCount(c, endC);
while IsNumPending(c, endC, true) and
Parse1Num(c, endC, currPt.X, lastPt.X) do
begin
AddPt(currPt);
if isRelative then lastPt.X := currPt.X;
end;
SetLength(pts, ptCnt);
if Length(pts) <> ptCnt then
SetLength(pts, ptCnt);
currSubPath.AddHSeg(firstPt, pts);
end;
stQBezier, stCSpline:
begin
AllocEstimatedPtsCount(c, endC);
while IsNumPending(c, endC, true) and
Parse2Num(c, endC, pt2, lastPt) and
Parse2Num(c, endC, currPt, lastPt) do
@ -1509,33 +1713,40 @@ begin
AddPt(currPt);
if isRelative then lastPt := currPt;
end;
SetLength(pts, ptCnt);
if Length(pts) <> ptCnt then
SetLength(pts, ptCnt);
currSubPath.AddSeg(currSegType, firstPt, pts);
end;
stLine, stQSpline:
begin
AllocEstimatedPtsCount(c, endC);
while IsNumPending(c, endC, true) and
Parse2Num(c, endC, currPt, lastPt) do
begin
AddPt(currPt);
if isRelative then lastPt := currPt;
end;
SetLength(pts, ptCnt);
if Length(pts) <> ptCnt then
SetLength(pts, ptCnt);
currSubPath.AddSeg(currSegType, firstPt, pts);
end;
stVert:
begin
AllocEstimatedPtsCount(c, endC);
while IsNumPending(c, endC, true) and
Parse1Num(c, endC, currPt.Y, lastPt.Y) do
begin
AddPt(currPt);
if isRelative then lastPt.Y := currPt.Y;
end;
SetLength(pts, ptCnt);
if Length(pts) <> ptCnt then
SetLength(pts, ptCnt);
currSubPath.AddVSeg(firstPt, pts);
end;
end;
end;
if currSubPath <> nil then
currSubPath.SegsLoaded; // Trim the segs array to the actual count
end;
//------------------------------------------------------------------------------
@ -1571,7 +1782,7 @@ var
begin
p := nil;
for i := 0 to Count -1 do
AppendPath(p, fSubPaths[i].GetFlattenedPath);
ConcatPaths(p, fSubPaths[i].GetFlattenedPath);
Result := Img32.Vector.GetBoundsD(p);
end;
//------------------------------------------------------------------------------
@ -1585,25 +1796,36 @@ begin
for i := 0 to Count -1 do
with fSubPaths[i] do
begin
AppendPath(p, GetFirstPt);
for j := 0 to High(fSegs) do
AppendPath(p, fSegs[j].fCtrlPts);
AppendPoint(p, GetFirstPt);
for j := 0 to fSegsCount - 1 do
ConcatPaths(p, fSegs[j].fCtrlPts);
end;
Result := GetBoundsD(p);
//watch out for straight horizontal or vertical lines
if not IsEmptyRect(Result) then Exit;
p := Grow(p, nil, 1, jsSquare, 0);
Result := GetBoundsD(p);
if IsEmptyRect(Result) then
begin
if Result.Width = 0 then
begin
Result.Left := Result.Left - 0.5;
Result.Right := Result.Left + 1.0;
end
else if Result.Height = 0 then
begin
Result.Top := Result.Top - 0.5;
Result.Bottom := Result.Top + 1.0;
end;
end;
end;
//------------------------------------------------------------------------------
function TSvgPath.AddPath: TSvgSubPath;
function TSvgPath.AddPath(SegsCapacity: Integer): TSvgSubPath;
var
i: integer;
begin
i := Count;
Result := TSvgSubPath.Create(self);
Result.InitSegs(SegsCapacity);
SetLength(fSubPaths, i + 1);
fSubPaths[i] := Result;
end;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,22 +1,55 @@
//NO_STORAGE is experimental
//Allows file system storage of layered objects etc
//Must be disabled to compile the experimental 'CtrlDemo' in Examples
// While "storage" is still technically experimental,
// it does allow file system storage of layered objects etc
// Comment out the following preprocessor define if you do wish to
// use storage (eg to compile the experimental 'CtrlDemo' in Examples).
{$DEFINE NO_STORAGE}
//USING_VCL_LCL - using either Delphi or Lazarus Component Libraries
//Adds a few extra library features (eg copying to and from TBitmap objects)
//Enabled is recommended unless you're compiling console applications.
{$DEFINE USING_VCL_LCL}
// default rotation direction is clockwise with positive angles
{.$DEFINE CLOCKWISE_ROTATION_WITH_NEGATIVE_ANGLES}
// Image downsampling occurs when images are reduced in size, and the default downsampling
// function is 'BoxDownSampling'. When downsampling, this function generally produces much
// clearer images than general purpose resamplers (which are much better at upsampling,
// and doing other affine transformations). However, if for some reason you do wish to use
// a general purpose resampler while downsampling, then comment out (ie disable) this define.
{$DEFINE USE_DOWNSAMPLER_AUTOMATICALLY}
// The SimplifyPath and SimplifyPaths functions have changed. Specifically the last
// parameter has changed from IsOpenPath to IsClosedPath, though the default has also
// changed from false to true which should minimise any inconvenience. This change was
// made to remove an inconsistency with other functions that all contain an IsClosedPath
// parameter. However, if this change is going to create havoc for some reason, then
// the following (somewhat temporary) define can be enabled.
{.$DEFINE USE_OLD_SIMPLIFYPATHS}
//USING_VCL_LCL - using either Delphi Visual Component Library or Lazarus Component Library
//is required if using the TImage32Panel component
//and adds a few extra library features (eg copying to and from TBitmap objects)
{$IF DEFINED(FPC)}
{$MACRO ON}
{$DEFINE USING_LCL}
{.$DEFINE USING_VCL_LCL}
{$DEFINE COMPILERVERSION:= 17}
{$ELSEIF declared(FireMonkeyVersion) OR DEFINED(FRAMEWORK_FMX)}
{$DEFINE USING_FMX}
{$ELSE}
{$DEFINE USING_VCL}
{$DEFINE USING_VCL_LCL}
{$IFEND}
{$IFDEF FPC}
{$MODE DELPHI}
{$DEFINE ABSTRACT_CLASSES}
{$DEFINE RECORD_METHODS}
{$DEFINE PBYTE}
{$DEFINE UITYPES}
{$DEFINE NEWPOSFUNC}
{$DEFINE SUPPORTS_POINTERMATH}
{$DEFINE CLASS_STATIC}
{.$DEFINE UITYPES}
{$DEFINE NESTED_TYPES}
{$IFNDEF DEBUG}
{$DEFINE INLINE}
{$DEFINE INLINE_COMPATIBLE}
{$ENDIF}
{$DEFINE DELPHI_PNG}
{$IFDEF WINDOWS}
@ -25,10 +58,10 @@
{$ELSE}
{$IF COMPILERVERSION < 15}
Your version of Delphi is not supported (Image32 requires Delphi version 7 or above)
{$IFEND}
{$IFDEF CPUX86}
{$DEFINE ASM_X86} //caution: do not define in FPC
{$ENDIF}
{$IFEND}
{$IF COMPILERVERSION < 23}
{$DEFINE CPUX86} // CPUX86 was added in Delphi XE2 (added Win64 compiler)
{$IFEND}
{$IF COMPILERVERSION >= 17} //Delphi 2005
{$IFNDEF DEBUG}
{$DEFINE INLINE} //added inlining
@ -49,20 +82,23 @@
{$DEFINE CHARINSET} //added CharInSet function
{$DEFINE EXIT_PARAM} //added Exit(value)
{$DEFINE ALPHAFORMAT} //added TBitmap.AlphaFormat property
{$DEFINE SUPPORTS_POINTERMATH} //added {$POINTERMATH ON/OFF}
{$DEFINE CLASS_STATIC} //added class static methods
{$IF COMPILERVERSION >= 21} //Delphi 2010
{$IFNDEF DEBUG}
{$DEFINE INLINE_COMPATIBLE} //avoid compiler bug with INLINE in Delphi 2005-2009 ("incompatible type")
{$ENDIF}
{$DEFINE GESTURES} //added screen gesture support
{$IF COMPILERVERSION >= 23} //DelphiXE2
{$IF declared(FireMonkeyVersion)} //defined in FMX.Types
{$DEFINE FMX}
{$IFEND}
{$DEFINE USES_NAMESPACES}
{$DEFINE FORMATSETTINGS}
{$DEFINE TROUNDINGMODE}
{$DEFINE UITYPES} //added UITypes unit
{$DEFINE XPLAT_GENERICS} //reasonable cross-platform & generics support
{$DEFINE XPLAT_GENERICS} //cross-platform generics support
{$DEFINE STYLESERVICES} //added StyleServices unit
{$IF COMPILERVERSION >= 24} //DelphiXE3
{$LEGACYIFEND ON}
{$DEFINE NEWPOSFUNC}
{$DEFINE ZEROBASEDSTR}
{$IF COMPILERVERSION >= 25} //DelphiXE4
{$LEGACYIFEND ON} //avoids compiler warning
@ -75,3 +111,11 @@
{$IFEND}
{$IFEND}
{$ENDIF}
{$IFOPT Q+}
{$DEFINE OVERFLOWCHECKS_ENABLED}
{$ENDIF}
{$IFOPT R+}
{$DEFINE RANGECHECKS_ENABLED}
{$ENDIF}

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Control like TButton which does not steal focus on click
Copyright (C) 2021-2023 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2021-2026 Alexander Koblov (alexx2000@mail.ru)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -27,7 +27,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, Themes, Types;
Buttons, Themes, Types, ImgList, LMessages;
type
@ -37,11 +37,20 @@ type
private
FState: TButtonState;
FShowCaption: Boolean;
FMouseInControl: Boolean;
FButtonGlyph: TButtonGlyph;
FImageChangeLink: TChangeLink;
private
function GetGlyph: TBitmap;
function GetImageWidth: Integer;
function IsGlyphStored: Boolean;
procedure SetGlyph(AValue: TBitmap);
function GetImageIndex: TImageIndex;
function GetImages: TCustomImageList;
procedure SetImageWidth(AValue: Integer);
procedure SetShowCaption(AValue: Boolean);
procedure SetImageIndex(AValue: TImageIndex);
procedure SetImages(AValue: TCustomImageList);
function GetDrawDetails: TThemedElementDetails;
protected
procedure Paint; override;
@ -54,15 +63,21 @@ type
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
protected
function GetGlyphSize: TSize;
procedure GlyphChanged(Sender: TObject);
procedure ImageListChange(Sender: TObject);
class function GetControlClassDefaultSize: TSize; override;
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
procedure CMEnabledChanged(var Message: TLMessage); message CM_ENABLEDCHANGED;
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: Integer; WithThemeSpace: Boolean); override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
published
property Action;
property Images: TCustomImageList read GetImages write SetImages;
property ImageIndex: TImageIndex read GetImageIndex write SetImageIndex default -1;
property ImageWidth: Integer read GetImageWidth write SetImageWidth default 0;
property Glyph: TBitmap read GetGlyph write SetGlyph stored IsGlyphStored;
property ShowCaption: Boolean read FShowCaption write SetShowCaption default True;
end;
@ -72,13 +87,16 @@ procedure Register;
implementation
uses
LCLType, LCLProc, LCLIntf, ActnList;
LCLType, LCLProc, LCLIntf, ActnList, GraphType;
procedure Register;
begin
RegisterComponents('KASComponents',[TKASButton]);
end;
const
UpState: array[Boolean] of TButtonState = (bsUp, bsHot);
{ TKASButton }
procedure TKASButton.DoEnter;
@ -125,6 +143,21 @@ begin
Result:= FButtonGlyph.Glyph;
end;
function TKASButton.GetImageIndex: TImageIndex;
begin
Result:= FButtonGlyph.ExternalImageIndex;
end;
function TKASButton.GetImages: TCustomImageList;
begin
Result:= FButtonGlyph.ExternalImages;
end;
function TKASButton.GetImageWidth: Integer;
begin
Result:= FButtonGlyph.ExternalImageWidth;
end;
function TKASButton.IsGlyphStored: Boolean;
var
Act: TCustomAction;
@ -148,11 +181,41 @@ begin
AdjustSize;
end;
procedure TKASButton.SetImageIndex(AValue: TImageIndex);
begin
FButtonGlyph.ExternalImageIndex:= AValue;
end;
procedure TKASButton.SetImages(AValue: TCustomImageList);
begin
if FButtonGlyph.ExternalImages <> nil then
begin
FButtonGlyph.ExternalImages.UnRegisterChanges(FImageChangeLink);
FButtonGlyph.ExternalImages.RemoveFreeNotification(Self);
end;
FButtonGlyph.ExternalImages := AValue;
if FButtonGlyph.ExternalImages <> nil then
begin
FButtonGlyph.ExternalImages.FreeNotification(Self);
FButtonGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
end;
InvalidatePreferredSize;
AdjustSize;
end;
procedure TKASButton.SetImageWidth(AValue: Integer);
begin
FButtonGlyph.ExternalImageWidth:= AValue;
InvalidatePreferredSize;
AdjustSize;
end;
procedure TKASButton.Paint;
var
APoint: TPoint;
SysFont: TFont;
PaintRect: TRect;
AGlyphSize: TSize;
TextFlags: Integer;
Details: TThemedElementDetails;
begin
@ -181,17 +244,22 @@ begin
DrawText(Canvas.Handle, PChar(Caption), Length(Caption), PaintRect, TextFlags);
end;
end
else if not FButtonGlyph.Glyph.Empty then
begin
APoint.X:= (PaintRect.Width - FButtonGlyph.Width) div 2;
APoint.Y:= (PaintRect.Height - FButtonGlyph.Height) div 2;
FButtonGlyph.Draw(Canvas, PaintRect, APoint, FState, True, 0);
else begin
AGlyphSize:= GetGlyphSize;
if (AGlyphSize.CX > 0) and (AGlyphSize.CY > 0) then
begin
APoint.X:= (PaintRect.Width - AGlyphSize.CX) div 2;
APoint.Y:= (PaintRect.Height - AGlyphSize.CY) div 2;
FButtonGlyph.Draw(Canvas, PaintRect, APoint, FState, True, 0, Font.PixelsPerInch, GetCanvasScaleFactor);
end;
end;
end;
procedure TKASButton.MouseEnter;
begin
inherited MouseEnter;
FMouseInControl:= True;
FState:= bsHot;
Invalidate;
end;
@ -199,6 +267,7 @@ end;
procedure TKASButton.MouseLeave;
begin
inherited MouseLeave;
FMouseInControl:= False;
FState:= bsUp;
Invalidate;
end;
@ -240,12 +309,37 @@ begin
Invalidate;
end;
function TKASButton.GetGlyphSize: TSize;
var
AIndex: Integer;
AEffect: TGraphicsDrawEffect;
AImageRes: TScaledImageListResolution;
begin
if (FButtonGlyph.Glyph.Empty) and ((Images = nil) or (ImageIndex = -1)) then
begin
Result.CX:= 0;
Result.CY:= 0;
Exit;
end;
FButtonGlyph.GetImageIndexAndEffect(Low(TButtonState), Font.PixelsPerInch,
GetCanvasScaleFactor, AImageRes, AIndex, AEffect);
Result.CX:= AImageRes.Width;
Result.CY:= AImageRes.Height;
end;
procedure TKASButton.GlyphChanged(Sender: TObject);
begin
InvalidatePreferredSize;
AdjustSize;
end;
procedure TKASButton.ImageListChange(Sender: TObject);
begin
if Sender = Images then Invalidate;
end;
class function TKASButton.GetControlClassDefaultSize: TSize;
begin
Result.CX := 23;
@ -267,23 +361,36 @@ begin
end;
end;
procedure TKASButton.CMEnabledChanged(var Message: TLMessage);
begin
if Enabled then
FState:= UpState[FMouseInControl]
else begin
FState:= bsDisabled;
end;
inherited CMEnabledChanged(Message);
end;
procedure TKASButton.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer; WithThemeSpace: Boolean);
var
PaintRect: TRect;
ClientRect: TRect;
AGlyphSize: TSize;
Details: TThemedElementDetails;
begin
inherited CalculatePreferredSize(PreferredWidth, PreferredHeight, WithThemeSpace);
if (not FButtonGlyph.Glyph.Empty) then
AGlyphSize:= GetGlyphSize;
if (AGlyphSize.CX > 0) and (AGlyphSize.CY > 0) then
begin
Details:= GetDrawDetails;
PaintRect:= TRect.Create(0, 0, 32, 32);
ClientRect:= ThemeServices.ContentRect(Canvas.Handle, Details, PaintRect);
PreferredWidth:= Abs(PaintRect.Width - ClientRect.Width) + FButtonGlyph.Width;
PreferredHeight:= Abs(PaintRect.Height - ClientRect.Height) + FButtonGlyph.Height;
PreferredWidth:= Abs(PaintRect.Width - ClientRect.Width) + AGlyphSize.CX;
PreferredHeight:= Abs(PaintRect.Height - ClientRect.Height) + AGlyphSize.CY;
end;
end;
@ -296,6 +403,9 @@ begin
FButtonGlyph.OnChange := GlyphChanged;
FButtonGlyph.IsDesigning := csDesigning in ComponentState;
FImageChangeLink := TChangeLink.Create;
FImageChangeLink.OnChange := ImageListChange;
FShowCaption:= True;
TabStop:= True;
end;
@ -303,6 +413,7 @@ end;
destructor TKASButton.Destroy;
begin
FreeAndNil(FButtonGlyph);
FreeAndNil(FImageChangeLink);
inherited Destroy;
end;

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Custom edit control with the look and feel like TLabel
Copyright (C) 2017-2018 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2017-2024 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -26,7 +26,7 @@ unit KASCDEdit;
interface
uses
Classes, SysUtils, LResources, Controls, Graphics, Dialogs, Types,
Classes, SysUtils, LazVersion, LResources, Controls, Graphics, Dialogs, Types,
Menus, CustomDrawnControls, CustomDrawnDrawers, CustomDrawn_Common;
type
@ -58,6 +58,9 @@ type
procedure SelectAll;
procedure CopyToClipboard;
published
property Color default clDefault;
property Cursor default crIBeam;
property ReadOnly default True;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
@ -104,12 +107,7 @@ end;
procedure TKASCDDrawer.DrawEditBackground(ADest: TCanvas; ADestPos: TPoint;
ASize: TSize; AState: TCDControlState; AStateEx: TCDEditStateEx);
begin
// The background
ADest.Pen.Style := psSolid;
ADest.Pen.Color := AStateEx.RGBColor;
ADest.Brush.Style := bsSolid;
ADest.Brush.Color := AStateEx.RGBColor;
ADest.Rectangle(0, 0, ASize.cx, ASize.cy);
// None
end;
procedure TKASCDDrawer.DrawEdit(ADest: TCanvas; ASize: TSize;
@ -122,10 +120,8 @@ var
lTextLeftSpacing, lTextTopSpacing, lTextBottomSpacing: Integer;
lTextColor: TColor;
i, lVisibleLinesCount: Integer;
AClipRect: TRect;
begin
// Background
DrawEditBackground(ADest, Point(0, 0), ASize, AState, AStateEx);
// General text configurations which apply to all lines
// Configure the text color
if csfEnabled in AState then
@ -168,10 +164,10 @@ begin
// The text
ADest.Pen.Style := psClear;
ADest.Brush.Style := bsClear;
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lControlTextLen);
// ToDo: Implement multi-line selection
if (AStateEx.SelLength = 0) or (AStateEx.SelStart.Y <> AStateEx.VisibleTextStart.Y+i) then
begin
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lControlTextLen);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
end
// Text and Selection
@ -186,22 +182,18 @@ begin
lSelLength := AStateEx.SelLength;
if lSelLength < 0 then lSelLength := lSelLength * -1;
// Text right of the selection
// Draw a normal text
ADest.Font.Color := lTextColor;
ADest.Brush.Color := AStateEx.RGBColor;
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lControlTextLen);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
// The selection text
// Draw a selected text
ADest.Brush.Color := clHighlight;
ADest.Font.Color := clHighlightText;
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lSelLeftPos + lSelLength);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
// Text left of the selection
ADest.Font.Color := lTextColor;
ADest.Brush.Color := AStateEx.RGBColor;
lVisibleText := UTF8Copy(lControlText, AStateEx.VisibleTextStart.X, lSelLeftPos-AStateEx.VisibleTextStart.X + 1);
// Calculate a clip rect
AClipRect := ADest.ClipRect;
AClipRect.Left := ADest.TextWidth(UTF8Copy(lVisibleText, 1, lSelLeftPos));
AClipRect.Right := ADest.TextWidth(UTF8Copy(lVisibleText, 1, lSelLeftPos + lSelLength));
IntersectClipRect(ADest.Handle, AClipRect.Left, AClipRect.Top, AClipRect.Right, AClipRect.Bottom);
ADest.TextOut(lTextLeftSpacing, lLineTop, lVisibleText);
end;
end;
@ -382,6 +374,10 @@ begin
end;
end;
end;
if ReadOnly and (Key in [VK_BACK, VK_DELETE]) then
begin
Key:= 0;
end;
inherited KeyDown(Key, Shift);
end;
@ -389,10 +385,11 @@ constructor TKASCDEdit.Create(AOwner: TComponent);
begin
CreatePopupMenu;
inherited Create(AOwner);
Color:= clForm;
ReadOnly:= True;
Cursor:= crIBeam;
Color:= clDefault;
DrawStyle:= dsExtra1;
ControlStyle:= ControlStyle + [csParentBackground] - [csOpaque];
end;
procedure TKASCDEdit.MouseMove(Shift: TShiftState; X, Y: integer);
@ -415,6 +412,12 @@ begin
begin
inherited MouseDown(Button, Shift, X, Y);
{$IF Laz_FullVersion >= 4990000}
// see also LCL 4b41b7a:
// customdrawn: remove redundant SetFocus from TCDControl.MouseDown
SetFocus();
{$ENDIF}
FDragDropStarted := True;
// Caret positioning

View file

@ -180,6 +180,35 @@ begin
end;
end;
function CalculateHeight(ComboBox: TCustomComboBox): Integer;
var
DC: HDC;
R: TRect;
Flags: Cardinal;
OldFont: HGDIOBJ;
LabelText: String;
MaxHeight: Integer;
begin
with ComboBox do
begin
MaxHeight:= Constraints.MinMaxHeight(10000);
DC := GetDC(Parent.Handle);
try
LabelText:= Items.Text;
R := Rect(0, 0, 10000, MaxHeight);
OldFont := SelectObject(DC, HGDIOBJ(Font.Reference.Handle));
Flags := DT_CALCRECT or DT_EXPANDTABS or DT_SINGLELINE;
DrawText(DC, PChar(LabelText), Length(LabelText), R, Flags);
SelectObject(DC, OldFont);
Result := (R.Bottom - R.Top);
finally
ReleaseDC(Parent.Handle, DC);
end;
end;
end;
{ TComboBoxWithDelItems }
procedure TComboBoxWithDelItems.KeyDown(var Key: Word; Shift: TShiftState);
@ -257,6 +286,7 @@ begin
if (csSubComponent in ComponentStyle) then
begin
ItemHeight:= CalculateHeight(Self);
if (Parent.Anchors * [akLeft, akRight] = [akLeft, akRight]) then
Exit;
end;
@ -270,7 +300,8 @@ procedure TKASColorBox.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
begin
if AMode in [lapAutoAdjustWithoutHorizontalScrolling, lapAutoAdjustForDPI] then
begin
ColorRectWidth:= Round(ColorRectWidth * AXProportion);
if ColorRectWidthStored then
ColorRectWidth:= Round(ColorRectWidth * AXProportion);
end;
// Don't auto adjust horizontal layout
inherited DoAutoAdjustLayout(AMode, 1.0, AYProportion);

View file

@ -0,0 +1,312 @@
unit KASComCtrls;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Controls, ComCtrls, Graphics, Dialogs;
type
{ TToolButtonClr }
TToolButtonClr = class(TToolButton)
private
FButtonColor: TColor;
FColorDialog: TColorDialog;
procedure SetButtonColor(AValue: TColor);
protected
procedure Paint; override;
procedure ShowColorDialog;
public
constructor Create(TheOwner: TComponent); override;
procedure Click; override;
property ButtonColor: TColor read FButtonColor write SetButtonColor;
end;
{ TToolBarAdv }
TToolBarAdv = class(TToolBar)
private
FToolBarFlags: TToolBarFlags;
protected
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer;
{%H-}WithThemeSpace: Boolean); override;
procedure AlignControls({%H-}AControl: TControl;
var RemainingClientRect: TRect); override;
function WrapButtons(UseSize: Integer; out NewWidth,
NewHeight: Integer; Simulate: Boolean): Boolean;
end;
procedure Register;
implementation
uses
Math;
{ TToolButtonClr }
procedure TToolButtonClr.SetButtonColor(AValue: TColor);
begin
if FButtonColor <> AValue then
begin
FButtonColor:= AValue;
Invalidate;
end;
end;
procedure TToolButtonClr.Paint;
var
ARect, IconRect: TRect;
begin
inherited Paint;
if (FToolBar <> nil) and (ClientWidth > 0) and (ClientHeight > 0) then
begin
ARect:= ClientRect;
IconRect.Left:= (ARect.Width - FToolBar.ImagesWidth) div 2;
IconRect.Top:= (ARect.Height - FToolBar.ImagesWidth) div 2;
IconRect.Right:= IconRect.Left + FToolBar.ImagesWidth;
IconRect.Bottom:= IconRect.Top + FToolBar.ImagesWidth;
if Enabled then
begin
Canvas.Brush.Style:= bsSolid;
Canvas.Brush.Color:= FButtonColor
end
else begin
Canvas.Brush.Color:= clGrayText;
Canvas.Brush.Style:= bsDiagCross;
end;
Canvas.Pen.Color:= clBtnText;
Canvas.Rectangle(IconRect);
end;
end;
procedure TToolButtonClr.ShowColorDialog;
begin
if not Enabled then Exit;
if (FColorDialog = nil) then
begin
FColorDialog := TColorDialog.Create(Self);
end;
FColorDialog.Color := ButtonColor;
if FColorDialog.Execute then
begin
ButtonColor := FColorDialog.Color;
end;
end;
constructor TToolButtonClr.Create(TheOwner: TComponent);
begin
FButtonColor:= clRed;
inherited Create(TheOwner);
end;
procedure TToolButtonClr.Click;
begin
inherited Click;
ShowColorDialog;
end;
{ TToolBarAdv }
procedure TToolBarAdv.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: Integer; WithThemeSpace: Boolean);
begin
if IsVertical then
WrapButtons(Height, PreferredWidth, PreferredHeight, True)
else
WrapButtons(Width, PreferredWidth, PreferredHeight, True);
end;
procedure TToolBarAdv.AlignControls(AControl: TControl;
var RemainingClientRect: TRect);
var
NewWidth, NewHeight: integer;
begin
if tbfPlacingControls in FToolBarFlags then exit;
Include(FToolBarFlags, tbfPlacingControls);
DisableAlign;
try
AdjustClientRect(RemainingClientRect);
if IsVertical then
WrapButtons(Height, NewWidth, NewHeight, False)
else
WrapButtons(Width, NewWidth, NewHeight, False);
finally
Exclude(FToolBarFlags, tbfPlacingControls);
EnableAlign;
end;
end;
function TToolBarAdv.WrapButtons(UseSize: Integer; out NewWidth,
NewHeight: Integer; Simulate: Boolean): Boolean;
var
ARect: TRect;
X, Y: Integer;
Vertical: Boolean;
LeftToRight: Boolean;
CurControl: TControl;
StartX, StartY: Integer;
FRowWidth, FRowHeight: Integer;
procedure CalculatePosition;
var
NewBounds: TRect;
StartedAtRowStart: Boolean;
begin
if IsVertical then
begin
NewBounds := Bounds(X, Y, FRowWidth, CurControl.Height);
repeat
if (not Wrapable) or
(NewBounds.Top = StartY) or
(NewBounds.Bottom <= ARect.Bottom) then
begin
// control fits into the column
X := NewBounds.Left;
Y := NewBounds.Top;
Break;
end;
// try next column
NewBounds.Top := StartY;
NewBounds.Bottom := NewBounds.Top + CurControl.Height;
Inc(NewBounds.Left, FRowWidth);
Inc(NewBounds.Right, FRowWidth);
until False;
end
else begin
StartedAtRowStart := (X = StartX);
if LeftToRight then
NewBounds := Bounds(X, Y, CurControl.Width, FRowHeight)
else begin
NewBounds := Bounds(X - CurControl.Width, Y, CurControl.Width, FRowHeight);
end;
repeat
if (not Wrapable) or
(StartedAtRowStart) or
(LeftToRight and ((NewBounds.Left = StartX) or (NewBounds.Right <= ARect.Right))) or
((not LeftToRight) and ((NewBounds.Right = StartX) or (NewBounds.Left >= ARect.Left))) then
begin
// control fits into the row
X := NewBounds.Left;
Y := NewBounds.Top;
Break;
end;
StartedAtRowStart := True;
// try next row
if LeftToRight then
begin
NewBounds.Left := StartX;
NewBounds.Right := NewBounds.Left + CurControl.Width;
end else begin
NewBounds.Right := StartX;
NewBounds.Left := NewBounds.Right - CurControl.Width;
end;
Inc(NewBounds.Top, FRowHeight);
Inc(NewBounds.Bottom, FRowHeight);
until False;
end;
end;
var
I: Integer;
W, H: Integer;
CurClientRect: TRect;
AdjustClientFrame: TRect;
begin
NewWidth := 0;
NewHeight := 0;
Result := True;
Vertical := IsVertical;
FRowWidth:= ButtonWidth;
FRowHeight:= ButtonHeight;
if Vertical then
begin
LeftToRight := True;
end
else begin
LeftToRight := not UseRightToLeftAlignment;
end;
DisableAlign;
BeginUpdate;
try
CurClientRect := ClientRect;
if Vertical then
Inc(CurClientRect.Bottom, UseSize - Height)
else begin
Inc(CurClientRect.Right, UseSize - Width);
end;
ARect := CurClientRect;
AdjustClientRect(ARect);
AdjustClientFrame.Left := ARect.Left - CurClientRect.Left;
AdjustClientFrame.Top := ARect.Top - CurClientRect.Top;
AdjustClientFrame.Right := CurClientRect.Right - ARect.Right;
AdjustClientFrame.Bottom := CurClientRect.Bottom - ARect.Bottom;
//DebugLn(['TToolBar.WrapButtons ',DbgSName(Self),' ARect=',dbgs(ARect)]);
// important: top, left button must start in the AdjustClientRect top, left
// otherwise Toolbar.AutoSize=true will create an endless loop
if Vertical or LeftToRight then
StartX := ARect.Left
else begin
StartX := ARect.Right;
end;
StartY := ARect.Top;
X := StartX;
Y := StartY;
for I := 0 to ButtonList.Count - 1 do
begin
CurControl := TControl(ButtonList[I]);
if not CurControl.IsControlVisible then
Continue;
CalculatePosition;
W := CurControl.Width;
H := CurControl.Height;
if (not Simulate) and ((CurControl.Left <> X) or (CurControl.Top <> Y)) then
begin
CurControl.SetBounds(X, Y, W, H); // Note: do not use SetBoundsKeepBase
end;
// adjust NewWidth, NewHeight
if LeftToRight then
NewWidth := Max(NewWidth, X + W + AdjustClientFrame.Right)
else begin
NewWidth := Max(NewWidth, ARect.Right - X + ARect.Left + AdjustClientFrame.Right);
end;
NewHeight := Max(NewHeight, Y + H + AdjustClientFrame.Bottom);
// step to next position
if IsVertical then
Inc(Y, H)
else if LeftToRight then
Inc(X, W);
end;
finally
EndUpdate;
EnableAlign;
end;
end;
procedure Register;
begin
RegisterComponents('KASComponents', [TToolBarAdv]);
RegisterNoIcon([TToolButtonClr]);
end;
end.

View file

@ -26,8 +26,8 @@
"/>
<License Value="GNU GPL 2
"/>
<Version Major="1" Minor="9" Release="4"/>
<Files Count="10">
<Version Major="1" Minor="10"/>
<Files Count="12">
<Item1>
<Filename Value="kastoolbar.pas"/>
<HasRegisterProc Value="True"/>
@ -77,6 +77,16 @@
<HasRegisterProc Value="True"/>
<UnitName Value="KASButtonPanel"/>
</Item10>
<Item11>
<Filename Value="kascomctrls.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="KASComCtrls"/>
</Item11>
<Item12>
<Filename Value="kascontrols.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="kascontrols"/>
</Item12>
</Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="3">

View file

@ -10,7 +10,7 @@ interface
uses
KASToolBar, KASProgressBar, KASPathEdit, KASToolItems, KASComboBox,
KASCDEdit, KASStatusBar, KASToolPanel, KASButton, KASButtonPanel,
LazarusPackageIntf;
KASComCtrls, KASControls, LazarusPackageIntf;
implementation
@ -25,6 +25,8 @@ begin
RegisterUnit('KASToolPanel', @KASToolPanel.Register);
RegisterUnit('KASButton', @KASButton.Register);
RegisterUnit('KASButtonPanel', @KASButtonPanel.Register);
RegisterUnit('KASComCtrls', @KASComCtrls.Register);
RegisterUnit('KASControls', @KASControls.Register);
end;
initialization

View file

@ -0,0 +1,89 @@
unit KASControls;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Controls, StdCtrls, ExtCtrls;
type
{ TKASPanel }
TKASPanel = class(TPanel)
private
FOnAutoSize: TNotifyEvent;
protected
procedure DoAutoSize; override;
published
property OnAutoSize: TNotifyEvent read FOnAutoSize write FOnAutoSize;
end;
{ TKASGroupBox }
TKASGroupBox = class(TGroupBox)
private
FOnAutoSize: TNotifyEvent;
protected
procedure DoAutoSize; override;
published
property OnAutoSize: TNotifyEvent read FOnAutoSize write FOnAutoSize;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('KASComponents', [TKASPanel, TKASGroupBox]);
end;
procedure LabelsAutoSize(Self: TWinControl);
var
Index: Integer;
AControl: TControl;
begin
with Self do
begin
DisableAutoSizing;
for Index:= 0 to ControlCount - 1 do
begin
AControl:= Controls[Index];
if (not (AControl is TLabel)) and Assigned(AControl.AnchorSide[akTop].Control) then
begin
if AControl.AnchorSide[akTop].Control is TLabel then
AControl.AnchorSide[akTop].Control.Constraints.MinHeight:= AControl.Height;
end;
end;
EnableAutoSizing;
end;
end;
{ TKASPanel }
procedure TKASPanel.DoAutoSize;
begin
inherited DoAutoSize;
if not (csDesigning in ComponentState) then
begin
LabelsAutoSize(Self);
if Assigned(FOnAutoSize) then FOnAutoSize(Self);
end;
end;
{ TKASGroupBox }
procedure TKASGroupBox.DoAutoSize;
begin
inherited DoAutoSize;
if not (csDesigning in ComponentState) then
begin
LabelsAutoSize(Self);
if Assigned(FOnAutoSize) then FOnAutoSize(Self);
end;
end;
end.

View file

@ -22,6 +22,7 @@
unit KASPathEdit;
{$mode delphi}
{$interfaces corba}
{$IF DEFINED(LCLCOCOA)}
{$modeswitch objectivec1}
{$ENDIF}
@ -38,15 +39,34 @@ uses
type
{ TKASPathEditGetFilesFunc }
TKASPathEditGetFilesFunc = Procedure (
const path: String;
const types: TObjectTypes;
const sort: TFileSortType;
files: TStringList );
{ IKASPathEditMate }
IKASPathEditMate = interface
function getFilesAtPath(
const path: String;
const types: TObjectTypes;
const sort: TFileSortType ): TStringList;
end;
{ TKASPathEdit }
TKASPathEdit = class(TEdit)
private
FMate: IKASPathEditMate;
FKeyDown: Word;
FBasePath: String;
FListBox: TListBox;
FPanel: THintWindow;
FAutoComplete: Boolean;
FGetFilesFunc: TKASPathEditGetFilesFunc;
FStringList: TStringList;
FObjectTypes: TObjectTypes;
FFileSortType: TFileSortType;
@ -80,6 +100,8 @@ type
onKeyRETURN: TNotifyEvent;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property GetFilesFunc: TKASPathEditGetFilesFunc read FGetFilesFunc write FGetFilesFunc;
property Mate: IKASPathEditMate read FMate write FMate;
published
property ObjectTypes: TObjectTypes read FObjectTypes write SetObjectTypes;
property FileSortType: TFileSortType read FFileSortType write FFileSortType;
@ -129,77 +151,6 @@ begin
RegisterComponents('KASComponents', [TKASPathEdit]);
end;
function FilesSortAlphabet(List: TStringList; Index1, Index2: Integer): Integer;
begin
Result:= CompareFilenames(List[Index1], List[Index2]);
end;
function FilesSortFoldersFirst(List: TStringList; Index1, Index2: Integer): Integer;
var
Attr1, Attr2: IntPtr;
begin
Attr1:= IntPtr(List.Objects[Index1]);
Attr2:= IntPtr(List.Objects[Index2]);
if (Attr1 and faDirectory <> 0) and (Attr2 and faDirectory <> 0) then
Result:= CompareFilenames(List[Index1], List[Index2])
else begin
if (Attr1 and faDirectory <> 0) then
Result:= -1
else begin
Result:= 1;
end;
end;
end;
procedure GetFilesInDir(const ABaseDir: String; AMask: String; AObjectTypes: TObjectTypes;
AResult: TStringList; AFileSortType: TFileSortType);
var
ExcludeAttr: Integer;
SearchRec: TSearchRec;
{$IF DEFINED(MSWINDOWS)}
ErrMode : LongWord;
{$ENDIF}
begin
{$IF DEFINED(MSWINDOWS)}
ErrMode:= SetErrorMode(SEM_FAILCRITICALERRORS or SEM_NOALIGNMENTFAULTEXCEPT or SEM_NOGPFAULTERRORBOX or SEM_NOOPENFILEERRORBOX);
try
{$ENDIF}
if FindFirst(ABaseDir + AMask, faAnyFile, SearchRec) = 0 then
begin
ExcludeAttr:= 0;
if not (otHidden in AObjectTypes) then
ExcludeAttr:= ExcludeAttr or faHidden;
if not (otFolders in AObjectTypes) then
ExcludeAttr:= ExcludeAttr or faDirectory;
repeat
if (SearchRec.Attr and ExcludeAttr <> 0) then
Continue;
if (SearchRec.Name = '.') or (SearchRec.Name = '..')then
Continue;
if (SearchRec.Attr and faDirectory = 0) and not (otNonFolders in AObjectTypes) then
Continue;
AResult.AddObject(SearchRec.Name, TObject(IntPtr(SearchRec.Attr)));
until FindNext(SearchRec) <> 0;
if AResult.Count > 0 then
begin
case AFileSortType of
fstAlphabet: AResult.CustomSort(@FilesSortAlphabet);
fstFoldersFirst: AResult.CustomSort(@FilesSortFoldersFirst);
end;
end;
end;
SysUtils.FindClose(SearchRec);
{$IF DEFINED(MSWINDOWS)}
finally
SetErrorMode(ErrMode);
end;
{$ENDIF}
end;
{ TKASPathEdit }
function TKASPathEdit.isShowingListBox(): Boolean;
@ -208,7 +159,7 @@ begin
end;
procedure TKASPathEdit.AutoComplete(const Path: String);
{$IF LCL_FULLVERSION >= 2020000}
{$IF LCL_FULLVERSION < 4990000}
const
AFlags: array[Boolean] of TMaskOptions = (
[moDisableSets], [moDisableSets, moCaseSensitive]
@ -226,49 +177,49 @@ begin
BasePath:= ExtractFilePath(Path);
if CompareFilenames(FBasePath, BasePath) <> 0 then
begin
FStringList.Clear;
FreeAndNil(FStringList);
FBasePath:= BasePath;
GetFilesInDir(BasePath, AllFilesMask, FObjectTypes, FStringList, FFileSortType);
if Assigned(FMate) then
FStringList:= FMate.getFilesAtPath(BasePath, FObjectTypes, FFileSortType);
end;
if (FStringList.Count > 0) then
begin
FListBox.Items.BeginUpdate;
try
// Check mask and make absolute file name
AMask:= TMask.Create(ExtractFileName(Path) + '*',
{$IF LCL_FULLVERSION >= 2020000}
AFlags[FileNameCaseSensitive]
if (FStringList=nil) or (FStringList.Count<=0) then
Exit;
FListBox.Items.BeginUpdate;
try
// Check mask and make absolute file name
AMask:= TMask.Create(ExtractFileName(Path) + '*',
{$IF LCL_FULLVERSION < 4990000}
AFlags[FileNameCaseSensitive]
{$ELSE}
FileNameCaseSensitive
FileNameCaseSensitive
{$ENDIF}
);
for I:= 0 to FStringList.Count - 1 do
begin
if AMask.Matches(FStringList[I]) then
FListBox.Items.Add(BasePath + FStringList[I]);
end;
AMask.Free;
finally
FListBox.Items.EndUpdate;
end;
if FListBox.Items.Count = 0 then HideListBox;
if FListBox.Items.Count > 0 then
);
for I:= 0 to FStringList.Count - 1 do
begin
if AMask.Matches(FStringList[I]) then
FListBox.Items.Add(BasePath + FStringList[I]);
end;
AMask.Free;
finally
FListBox.Items.EndUpdate;
end;
if FListBox.Items.Count = 0 then HideListBox;
if FListBox.Items.Count > 0 then
begin
ShowListBox;
// Calculate ListBox height
with FListBox.ItemRect(0) do
I:= Bottom - Top; // TListBox.ItemHeight sometimes don't work under GTK2
with FListBox do
begin
ShowListBox;
// Calculate ListBox height
with FListBox.ItemRect(0) do
I:= Bottom - Top; // TListBox.ItemHeight sometimes don't work under GTK2
with FListBox do
begin
{$IF NOT DEFINED(LCLCOCOA)}
if Items.Count = 1 then
FPanel.ClientHeight:= Self.Height
else
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1);
if Items.Count = 1 then
FPanel.ClientHeight:= Self.Height
else
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1);
{$ELSE}
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1) + trunc(i/2);
FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1) + trunc(i/2);
{$ENDIF}
end;
end;
end;
end;
@ -367,8 +318,10 @@ end;
procedure TKASPathEdit.TextChanged;
begin
Inherited;
// TextChanged is called by user input, "if Modified" is not need
if FAutoComplete then AutoComplete(Text);
if not Modified then
Exit;
if FAutoComplete then
AutoComplete(Text);
end;
{$ENDIF}
@ -501,8 +454,6 @@ constructor TKASPathEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FStringList:= TStringList.Create;
FListBox:= TListBox.Create(Self);
FListBox.TabStop:= False;
FListBox.Align:= alClient;

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Toolbar panel class
Copyright (C) 2006-2019 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2006-2023 Alexander Koblov (alexx2000@mail.ru)
contributors:
2012 Przemyslaw Nagay (cobines@gmail.com)
@ -33,7 +33,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, ComCtrls,
Graphics, Dialogs, ExtCtrls, Buttons, FileUtil, Menus,
DCXmlConfig, KASToolItems, LCLVersion;
DCXmlConfig, KASToolItems, LCLVersion, LMessages;
type
TOnToolButtonClick = procedure (Sender: TObject) of object;
@ -58,19 +58,23 @@ type
FOverlay: TBitmap;
FToolItem: TKASToolItem;
function GetToolBar: TKASToolBar;
function GetGlyphBitmap: TBitmap;
procedure SetGlyphBitmap(bitmap: TBitmap);
protected
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean); override;
function DrawGlyph(ACanvas: TCanvas; const AClient: TRect; const AOffset: TPoint;
AState: TButtonState; ATransparent: Boolean; BiDiFlags: Longint): TRect; override;
procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
procedure CMHintShow(var Message: TLMessage); message CM_HINTSHOW;
public
constructor Create(AOwner: TComponent; Item: TKASToolItem); reintroduce;
constructor Create(AOwner: TComponent; Item: TKASToolItem); reintroduce; virtual;
destructor Destroy; override;
procedure Click; override;
public
property ToolBar: TKASToolBar read GetToolBar;
property ToolItem: TKASToolItem read FToolItem;
property Glyph: TBitmap read GetGlyphBitmap write SetGlyphBitmap;
end;
{ TKASToolDivider }
@ -80,6 +84,17 @@ type
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean); override;
procedure Paint; override;
public
constructor Create(AOwner: TComponent; Item: TKASToolItem); override;
end;
{ TKASToolLabel }
TKASToolLabel = class(TKASToolButton)
protected
procedure Paint; override;
public
constructor Create(AOwner: TComponent; Item: TKASToolItem); override;
end;
{ TKASToolBar }
@ -164,7 +179,9 @@ type
procedure RemoveButton(Button: TKASToolButton);
procedure RemoveToolItemExecutor(ExecuteFunction: TOnToolItemExecute);
procedure UncheckAllButtons;
function GlyphBitmapSize: Integer;
procedure UpdateIcon(ToolButton: TKASToolButton);
procedure UpdateIconWithBitmap(ToolButton: TKASToolButton; bitmap: TBitmap);
procedure UseItems(AItems: TKASToolBarItems);
procedure LoadConfiguration(Config: TXmlConfig; RootNode: TXmlNode;
@ -203,7 +220,7 @@ procedure Register;
implementation
uses
Themes, Types, Math, ActnList, DCOSUtils;
Themes, Types, Math, ActnList, LCLType, LCLIntf, DCOSUtils;
type
PToolItemExecutor = ^TToolItemExecutor;
@ -217,6 +234,29 @@ begin
RegisterComponents('KASComponents',[TKASToolBar]);
end;
function findScaleFactorByFirstForm: Double;
begin
Result:= 1;
if Screen.FormCount > 0 then
Result:= Screen.Forms[0].GetCanvasScaleFactor();
end;
function findScaleFactorByControl( control: TControl ): Double;
var
topParent: TControl;
begin
if Assigned(control) then begin
topParent:= control.GetTopParent;
if Assigned(topParent) then
control:= topParent;
if (control is TWinControl) and TWinControl(control).HandleAllocated then begin
Result:= control.GetCanvasScaleFactor;
Exit;
end;
end;
Result:= findScaleFactorByFirstForm();
end;
{ TKASToolBar }
procedure TKASToolBar.InsertButton(InsertAt: Integer; ToolButton: TKASToolButton);
@ -286,14 +326,19 @@ var
procedure CalculatePosition;
var
NewBounds: TRect;
ALineBreak: Boolean;
begin
ALineBreak:= (CurControl is TKASToolDivider) and (not FShowDividerAsButton) and
(TKASToolDivider(CurControl).FToolItem is TKASSeparatorItem) and
(TKASSeparatorItem(TKASToolDivider(CurControl).FToolItem).Style = kssLineBreak);
if IsVertical then
begin
NewBounds := Bounds(x, y, FRowWidth, CurControl.Height);
repeat
if (not Wrapable) or
(NewBounds.Bottom <= ARect.Bottom) or
(NewBounds.Top = StartY) then
(NewBounds.Top = StartY) or
((NewBounds.Bottom <= ARect.Bottom) and not ALineBreak) then
begin
// control fits into the column
x := NewBounds.Left;
@ -312,8 +357,8 @@ var
NewBounds := Bounds(x, y, CurControl.Width, FRowHeight);
repeat
if (not Wrapable) or
(NewBounds.Right <= ARect.Right) or
(NewBounds.Left = StartX) then
(NewBounds.Left = StartX) or
((NewBounds.Right <= ARect.Right) and not ALineBreak) then
begin
// control fits into the row
x := NewBounds.Left;
@ -546,10 +591,18 @@ begin
if FGlyphSize = AValue then Exit;
FGlyphSize:= AValue;
self.Images.Clear;
self.images.Width:= GlyphBitmapSize;
self.images.Height:= GlyphBitmapSize;
self.ImagesWidth:= FGlyphSize;
Self.Images.Scaled := (findScaleFactorByControl(Self) > 1.0);
BeginUpdate;
try
for I := 0 to ButtonList.Count - 1 do
for I := 0 to ButtonList.Count - 1 do begin
TKASToolButton(ButtonList[i]).ImageIndex:= -1;
UpdateIcon(TKASToolButton(ButtonList[i]));
end;
finally
EndUpdate;
end;
@ -728,7 +781,8 @@ begin
ToolButton.FOverlay := FOnLoadButtonOverlay(ToolButton.ToolItem, FGlyphSize div 2, clBtnFace);
end;
ToolButton.Glyph.Assign(Bitmap);
if Assigned(Bitmap) then
self.UpdateIconWithBitmap(ToolButton, Bitmap);
finally
Bitmap.Free;
end;
@ -737,6 +791,18 @@ begin
end;
end;
procedure TKASToolBar.UpdateIconWithBitmap(ToolButton: TKASToolButton;
bitmap: TBitmap);
begin
if ToolButton.ImageIndex < 0 then begin
ToolButton.Images:= self.Images;
ToolButton.ImageIndex:= self.Images.Add( bitmap, nil );
ToolButton.ImageWidth:= self.ImagesWidth;
end else begin
self.Images.Replace( ToolButton.ImageIndex, bitmap, nil );
end;
end;
procedure TKASToolBar.UseItems(AItems: TKASToolBarItems);
var
i: Integer;
@ -827,7 +893,8 @@ end;
constructor TKASToolBar.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
FGlyphSize:= 16; // by default
self.images:= TImageList.Create(self);
self.GlyphSize:= 16; // by default
FUpdateCount:= 0;
FButtonWidth := 23;
FButtonHeight := 22;
@ -848,6 +915,10 @@ begin
begin
Result := TKASToolDivider.Create(Self, Item);
end
else if Item is TKASLabelItem then
begin
Result := TKASToolLabel.Create(Self, Item);
end
else
begin
Result := TKASToolButton.Create(Self, Item);
@ -1025,12 +1096,18 @@ begin
Buttons[I].Down:= False;
end;
function TKASToolBar.GlyphBitmapSize: Integer;
begin
Result:= Round(FGlyphSize * findScaleFactorByControl(self));
end;
{ TKASToolButton }
procedure TKASToolButton.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean);
var
TextSize: TSize;
iconWidth: Integer;
begin
if (Parent = nil) then
inherited
@ -1048,7 +1125,10 @@ begin
begin
// Size to extent of the icon + caption.
TextSize := Canvas.TextExtent(Caption);
PreferredWidth := Max(TextSize.cx + Glyph.Width + 16, PreferredWidth);
iconWidth := self.ImageWidth;
if iconWidth = 0 then
iconWidth := Glyph.Width;
PreferredWidth := Max(TextSize.cx + iconWidth + 16, PreferredWidth);
PreferredHeight := Max(TextSize.cy + 4, PreferredHeight);
end;
end;
@ -1089,6 +1169,17 @@ begin
end;
end;
procedure TKASToolButton.CMHintShow(var Message: TLMessage);
begin
if (ActionLink <> nil) and FToolItem.ActionHint then
begin
inherited CMHintShow(Message);
end
else begin
DoOnShowHint(TCMHintShow(Message).HintInfo);
end;
end;
constructor TKASToolButton.Create(AOwner: TComponent; Item: TKASToolItem);
begin
inherited Create(AOwner);
@ -1111,22 +1202,44 @@ begin
Result := Parent as TKASToolBar;
end;
function TKASToolButton.GetGlyphBitmap: TBitmap;
begin
Result:= Inherited Glyph;
end;
procedure TKASToolButton.SetGlyphBitmap(bitmap: TBitmap);
begin
self.ToolBar.UpdateIconWithBitmap(self, bitmap);
end;
{ TKASToolDivider }
procedure TKASToolDivider.CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean);
var
ASize: Integer;
begin
if Assigned(Parent) and (Parent is TKASToolBar) and
(not TKASSeparatorItem(FToolItem).Style) and
(not TKASToolBar(Parent).FShowDividerAsButton) then
begin
if ToolBar.IsVertical then
if (TKASSeparatorItem(FToolItem).Style = kssSeparator) then
ASize:= 5
else if (TKASSeparatorItem(FToolItem).Style = kssLineBreak) then
ASize:= 0
else begin
ASize:= -1;
end;
if ASize < 0 then
begin
PreferredHeight := 5;
inherited;
end
else if ToolBar.IsVertical then
begin
PreferredHeight := ASize;
PreferredWidth := ToolBar.FRowWidth;
end
else begin
PreferredWidth := 5;
PreferredWidth := ASize;
PreferredHeight := ToolBar.FRowHeight;
end;
end
@ -1142,7 +1255,7 @@ begin
if Assigned(Parent) and (Parent is TKASToolBar) and
not TKASToolBar(Parent).FShowDividerAsButton then
begin
if TKASSeparatorItem(FToolItem).Style then Exit;
if TKASSeparatorItem(FToolItem).Style > kssSeparator then Exit;
DividerRect:= ClientRect;
@ -1185,5 +1298,46 @@ begin
inherited Paint;
end;
constructor TKASToolDivider.Create(AOwner: TComponent; Item: TKASToolItem);
begin
inherited Create(AOwner, Item);
ControlStyle:= ControlStyle + [csAutoSize0x0];
end;
{ TKASToolLabel }
procedure TKASToolLabel.Paint;
const
cAlignment: array[TAlignment] of Longint = (DT_LEFT, DT_RIGHT, DT_CENTER);
var
R: TRect;
Flags: Longint;
LabelText: String;
begin
R:= ClientRect;
Canvas.Font:= Font;
LabelText:= Caption;
InflateRect(R, -8, 0);
Canvas.Brush.Color:= Color;
Canvas.Brush.Style:= bsClear;
Flags:= DT_EXPANDTABS or DT_VCENTER;
Flags:= Flags or DT_SINGLELINE or DT_NOPREFIX;
if UseRightToLeftReading then
begin
Flags:= Flags or DT_RTLREADING;
end;
Flags:= Flags or cAlignment[BidiFlipAlignment(Self.Alignment, UseRightToLeftAlignment)];
DrawText(Canvas.Handle, PAnsiChar(LabelText), Length(LabelText), R, Flags or DT_NOCLIP);
end;
constructor TKASToolLabel.Create(AOwner: TComponent; Item: TKASToolItem);
begin
inherited Create(AOwner, Item);
AutoSize:= True;
end;
end.

View file

@ -35,6 +35,8 @@ type
TOnLoadToolItem = procedure (Item: TKASToolItem) of object;
TKASSeparatorStyle = (kssSeparator, kssDivider, kssLineBreak);
{$interfaces corba}
IToolOwner = interface
['{A7908D38-1E13-4E8D-8FA7-8830A2FF9290}']
@ -62,6 +64,7 @@ type
FAction: TBasicAction;
property ToolOwner: IToolOwner read FToolOwner;
public
function ActionHint: Boolean; virtual;
procedure Assign(OtherItem: TKASToolItem); virtual;
function CheckExecute(ToolItemID: String): Boolean; virtual;
function Clone: TKASToolItem; virtual; abstract;
@ -81,7 +84,7 @@ type
TKASSeparatorItem = class(TKASToolItem)
public
Style: Boolean;
Style: TKASSeparatorStyle;
procedure Assign(OtherItem: TKASToolItem); override;
function Clone: TKASToolItem; override;
function ConfigNodeName: String; override;
@ -94,6 +97,8 @@ type
{ TKASNormalItem }
TKASNormalItem = class(TKASToolItem)
private
FShortcutsHint: Boolean;
strict private
FID: String; // Unique identificator of the button
function GetID: String;
@ -105,6 +110,7 @@ type
Icon: String;
Text: String;
Hint: String;
function ActionHint: Boolean; override;
procedure Assign(OtherItem: TKASToolItem); override;
function CheckExecute(ToolItemID: String): Boolean; override;
function Clone: TKASToolItem; override;
@ -136,6 +142,10 @@ type
property SubItems: TKASToolBarItems read FItems;
end;
{ TKASLabelItem }
TKASLabelItem = class(TKASNormalItem);
{ TKASToolBarItems }
TKASToolBarItems = class
@ -183,6 +193,11 @@ uses
{ TKASToolItem }
function TKASToolItem.ActionHint: Boolean;
begin
Result := True;
end;
procedure TKASToolItem.Assign(OtherItem: TKASToolItem);
begin
FUserData := OtherItem.FUserData;
@ -404,13 +419,20 @@ begin
end;
procedure TKASSeparatorItem.Load(Config: TXmlConfig; Node: TXmlNode; Loader: TKASToolBarLoader);
var
OldStyle: Boolean;
AStyle: array[Boolean] of TKASSeparatorStyle = (kssSeparator, kssDivider);
begin
Style := Config.GetValue(Node, 'Style', False);
if Config.TryGetValue(Node, 'Style', OldStyle) then
Style := AStyle[OldStyle]
else begin
Style := TKASSeparatorStyle(Config.GetValue(Node, 'Style', Integer(kssSeparator)));
end;
end;
procedure TKASSeparatorItem.SaveContents(Config: TXmlConfig; Node: TXmlNode);
begin
Config.AddValue(Node, 'Style', Style);
Config.AddValue(Node, 'Style', Integer(Style));
end;
{ TKASNormalItem }
@ -481,8 +503,10 @@ function TKASNormalItem.GetShortcutsHint: String;
begin
if Assigned(FToolOwner) then
Result := FToolOwner.GetToolItemShortcutsHint(Self)
else
else begin
Result := '';
end;
FShortcutsHint := (Length(Result) > 0);
end;
procedure TKASNormalItem.Load(Config: TXmlConfig; Node: TXmlNode; Loader: TKASToolBarLoader);
@ -525,6 +549,11 @@ begin
Config.AddValueDef(Node, 'Text', Text, '');
end;
function TKASNormalItem.ActionHint: Boolean;
begin
Result := not FShortcutsHint;
end;
{ TKASToolBarItems }
constructor TKASToolBarItems.Create;

View file

@ -8,15 +8,22 @@ uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Toolwin;
type
{ TKASToolPanel }
TKASToolPanel = class(TToolWindow)
public
constructor Create(TheOwner: TComponent); override;
published
property Align default alNone;
property Anchors;
property AutoSize;
property BorderSpacing;
property ChildSizing;
property EdgeBorders default [ebTop];
property EdgeInner;
property EdgeOuter;
property OnResize;
property TabOrder;
property Visible;
end;
@ -30,4 +37,12 @@ begin
RegisterComponents('KASComponents',[TKASToolPanel]);
end;
{ TKASToolPanel }
constructor TKASToolPanel.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
EdgeBorders:= [ebTop];
end;
end.

View file

@ -8,12 +8,12 @@ rem This script is called from ..\build.bat.
pushd components
lazbuild chsdet\chsdet.lpk %DC_ARCH%
lazbuild multithreadprocs\multithreadprocslaz.lpk %DC_ARCH%
lazbuild dcpcrypt\dcpcrypt.lpk %DC_ARCH%
lazbuild kascrypt\kascrypt.lpk %DC_ARCH%
lazbuild doublecmd\doublecmd_common.lpk %DC_ARCH%
lazbuild Image32\Image32.lpk %DC_ARCH%
lazbuild KASToolBar\kascomp.lpk %DC_ARCH%
lazbuild viewer\viewerpackage.lpk %DC_ARCH%
lazbuild gifanim\pkg_gifanim.lpk %DC_ARCH%
lazbuild gifview\gifview.lpk %DC_ARCH%
lazbuild synunihighlighter\synuni.lpk %DC_ARCH%
lazbuild virtualterminal\virtualterminal.lpk %DC_ARCH%
popd

View file

@ -26,12 +26,12 @@ basedir=$(pwd)
cd components
$lazbuild chsdet/chsdet.lpk $DC_ARCH
$lazbuild multithreadprocs/multithreadprocslaz.lpk $DC_ARCH
$lazbuild dcpcrypt/dcpcrypt.lpk $DC_ARCH
$lazbuild kascrypt/kascrypt.lpk $DC_ARCH
$lazbuild doublecmd/doublecmd_common.lpk $DC_ARCH
$lazbuild Image32/Image32.lpk $DC_ARCH
$lazbuild KASToolBar/kascomp.lpk $DC_ARCH
$lazbuild viewer/viewerpackage.lpk $DC_ARCH
$lazbuild gifanim/pkg_gifanim.lpk $DC_ARCH
$lazbuild gifview/gifview.lpk $DC_ARCH
$lazbuild synunihighlighter/synuni.lpk $DC_ARCH
$lazbuild virtualterminal/virtualterminal.lpk $DC_ARCH
cd $basedir

View file

@ -1,32 +0,0 @@
Change in v2.0.4.1 by Graeme Geldenhuys (2010)
* Version number bumped to v2.0.4.1
* More fixes for 64-bit support
* Removed a lot of compiler warnings - tested with FPC 2.4.1
Change in v2.0.4 by Graeme Geldenhuys (2009)
* Version number bumped to v2.0.4
* Split the Lazarus package into two separate packages
- one is runtime only package and GUI toolkit independent.
- one is Lazarus design-time only package which installs
components in component palette.
* Updated code to be compilable with FPC 2.4.0-rc1
* Updated code to be compilable with 64-bit FPC 2.4.0-rc1.
- Tested under 32-bit & 64-bit Linux on x86 systems.
Changes since DCPCrypt v2 Beta 3:
* Ported DCPCrypt to Lazarus by Barko in 2006
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

View file

@ -1,203 +0,0 @@
temp:= (t2 and (t4 xor t3) xor t6 and t0 xor t5 and t1 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 0];
temp:= (t1 and (t3 xor t2) xor t5 and t7 xor t4 and t0 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 1];
temp:= (t0 and (t2 xor t1) xor t4 and t6 xor t3 and t7 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 2];
temp:= (t7 and (t1 xor t0) xor t3 and t5 xor t2 and t6 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 3];
temp:= (t6 and (t0 xor t7) xor t2 and t4 xor t1 and t5 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 4];
temp:= (t5 and (t7 xor t6) xor t1 and t3 xor t0 and t4 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 5];
temp:= (t4 and (t6 xor t5) xor t0 and t2 xor t7 and t3 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 6];
temp:= (t3 and (t5 xor t4) xor t7 and t1 xor t6 and t2 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 7];
temp:= (t2 and (t4 xor t3) xor t6 and t0 xor t5 and t1 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 8];
temp:= (t1 and (t3 xor t2) xor t5 and t7 xor t4 and t0 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 9];
temp:= (t0 and (t2 xor t1) xor t4 and t6 xor t3 and t7 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[10];
temp:= (t7 and (t1 xor t0) xor t3 and t5 xor t2 and t6 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[11];
temp:= (t6 and (t0 xor t7) xor t2 and t4 xor t1 and t5 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[12];
temp:= (t5 and (t7 xor t6) xor t1 and t3 xor t0 and t4 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[13];
temp:= (t4 and (t6 xor t5) xor t0 and t2 xor t7 and t3 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[14];
temp:= (t3 and (t5 xor t4) xor t7 and t1 xor t6 and t2 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[15];
temp:= (t2 and (t4 xor t3) xor t6 and t0 xor t5 and t1 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[16];
temp:= (t1 and (t3 xor t2) xor t5 and t7 xor t4 and t0 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[17];
temp:= (t0 and (t2 xor t1) xor t4 and t6 xor t3 and t7 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[18];
temp:= (t7 and (t1 xor t0) xor t3 and t5 xor t2 and t6 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[19];
temp:= (t6 and (t0 xor t7) xor t2 and t4 xor t1 and t5 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[20];
temp:= (t5 and (t7 xor t6) xor t1 and t3 xor t0 and t4 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[21];
temp:= (t4 and (t6 xor t5) xor t0 and t2 xor t7 and t3 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[22];
temp:= (t3 and (t5 xor t4) xor t7 and t1 xor t6 and t2 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[23];
temp:= (t2 and (t4 xor t3) xor t6 and t0 xor t5 and t1 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[24];
temp:= (t1 and (t3 xor t2) xor t5 and t7 xor t4 and t0 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[25];
temp:= (t0 and (t2 xor t1) xor t4 and t6 xor t3 and t7 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[26];
temp:= (t7 and (t1 xor t0) xor t3 and t5 xor t2 and t6 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[27];
temp:= (t6 and (t0 xor t7) xor t2 and t4 xor t1 and t5 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[28];
temp:= (t5 and (t7 xor t6) xor t1 and t3 xor t0 and t4 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[29];
temp:= (t4 and (t6 xor t5) xor t0 and t2 xor t7 and t3 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[30];
temp:= (t3 and (t5 xor t4) xor t7 and t1 xor t6 and t2 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[31];
temp:= (t5 and (t3 and not t0 xor t1 and t2 xor t4 xor t6) xor t1 and (t3 xor t2) xor t0 and t2 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 5] + $452821E6;
temp:= (t4 and (t2 and not t7 xor t0 and t1 xor t3 xor t5) xor t0 and (t2 xor t1) xor t7 and t1 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[14] + $38D01377;
temp:= (t3 and (t1 and not t6 xor t7 and t0 xor t2 xor t4) xor t7 and (t1 xor t0) xor t6 and t0 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[26] + $BE5466CF;
temp:= (t2 and (t0 and not t5 xor t6 and t7 xor t1 xor t3) xor t6 and (t0 xor t7) xor t5 and t7 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[18] + $34E90C6C;
temp:= (t1 and (t7 and not t4 xor t5 and t6 xor t0 xor t2) xor t5 and (t7 xor t6) xor t4 and t6 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[11] + $C0AC29B7;
temp:= (t0 and (t6 and not t3 xor t4 and t5 xor t7 xor t1) xor t4 and (t6 xor t5) xor t3 and t5 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[28] + $C97C50DD;
temp:= (t7 and (t5 and not t2 xor t3 and t4 xor t6 xor t0) xor t3 and (t5 xor t4) xor t2 and t4 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 7] + $3F84D5B5;
temp:= (t6 and (t4 and not t1 xor t2 and t3 xor t5 xor t7) xor t2 and (t4 xor t3) xor t1 and t3 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[16] + $B5470917;
temp:= (t5 and (t3 and not t0 xor t1 and t2 xor t4 xor t6) xor t1 and (t3 xor t2) xor t0 and t2 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 0] + $9216D5D9;
temp:= (t4 and (t2 and not t7 xor t0 and t1 xor t3 xor t5) xor t0 and (t2 xor t1) xor t7 and t1 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[23] + $8979FB1B;
temp:= (t3 and (t1 and not t6 xor t7 and t0 xor t2 xor t4) xor t7 and (t1 xor t0) xor t6 and t0 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[20] + $D1310BA6;
temp:= (t2 and (t0 and not t5 xor t6 and t7 xor t1 xor t3) xor t6 and (t0 xor t7) xor t5 and t7 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[22] + $98DFB5AC;
temp:= (t1 and (t7 and not t4 xor t5 and t6 xor t0 xor t2) xor t5 and (t7 xor t6) xor t4 and t6 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 1] + $2FFD72DB;
temp:= (t0 and (t6 and not t3 xor t4 and t5 xor t7 xor t1) xor t4 and (t6 xor t5) xor t3 and t5 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[10] + $D01ADFB7;
temp:= (t7 and (t5 and not t2 xor t3 and t4 xor t6 xor t0) xor t3 and (t5 xor t4) xor t2 and t4 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 4] + $B8E1AFED;
temp:= (t6 and (t4 and not t1 xor t2 and t3 xor t5 xor t7) xor t2 and (t4 xor t3) xor t1 and t3 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 8] + $6A267E96;
temp:= (t5 and (t3 and not t0 xor t1 and t2 xor t4 xor t6) xor t1 and (t3 xor t2) xor t0 and t2 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[30] + $BA7C9045;
temp:= (t4 and (t2 and not t7 xor t0 and t1 xor t3 xor t5) xor t0 and (t2 xor t1) xor t7 and t1 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 3] + $F12C7F99;
temp:= (t3 and (t1 and not t6 xor t7 and t0 xor t2 xor t4) xor t7 and (t1 xor t0) xor t6 and t0 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[21] + $24A19947;
temp:= (t2 and (t0 and not t5 xor t6 and t7 xor t1 xor t3) xor t6 and (t0 xor t7) xor t5 and t7 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 9] + $B3916CF7;
temp:= (t1 and (t7 and not t4 xor t5 and t6 xor t0 xor t2) xor t5 and (t7 xor t6) xor t4 and t6 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[17] + $0801F2E2;
temp:= (t0 and (t6 and not t3 xor t4 and t5 xor t7 xor t1) xor t4 and (t6 xor t5) xor t3 and t5 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[24] + $858EFC16;
temp:= (t7 and (t5 and not t2 xor t3 and t4 xor t6 xor t0) xor t3 and (t5 xor t4) xor t2 and t4 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[29] + $636920D8;
temp:= (t6 and (t4 and not t1 xor t2 and t3 xor t5 xor t7) xor t2 and (t4 xor t3) xor t1 and t3 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 6] + $71574E69;
temp:= (t5 and (t3 and not t0 xor t1 and t2 xor t4 xor t6) xor t1 and (t3 xor t2) xor t0 and t2 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[19] + $A458FEA3;
temp:= (t4 and (t2 and not t7 xor t0 and t1 xor t3 xor t5) xor t0 and (t2 xor t1) xor t7 and t1 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[12] + $F4933D7E;
temp:= (t3 and (t1 and not t6 xor t7 and t0 xor t2 xor t4) xor t7 and (t1 xor t0) xor t6 and t0 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[15] + $0D95748F;
temp:= (t2 and (t0 and not t5 xor t6 and t7 xor t1 xor t3) xor t6 and (t0 xor t7) xor t5 and t7 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[13] + $728EB658;
temp:= (t1 and (t7 and not t4 xor t5 and t6 xor t0 xor t2) xor t5 and (t7 xor t6) xor t4 and t6 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 2] + $718BCD58;
temp:= (t0 and (t6 and not t3 xor t4 and t5 xor t7 xor t1) xor t4 and (t6 xor t5) xor t3 and t5 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[25] + $82154AEE;
temp:= (t7 and (t5 and not t2 xor t3 and t4 xor t6 xor t0) xor t3 and (t5 xor t4) xor t2 and t4 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[31] + $7B54A41D;
temp:= (t6 and (t4 and not t1 xor t2 and t3 xor t5 xor t7) xor t2 and (t4 xor t3) xor t1 and t3 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[27] + $C25A59B5;
temp:= (t3 and (t5 and t4 xor t6 xor t0) xor t5 and t2 xor t4 and t1 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[19] + $9C30D539;
temp:= (t2 and (t4 and t3 xor t5 xor t7) xor t4 and t1 xor t3 and t0 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 9] + $2AF26013;
temp:= (t1 and (t3 and t2 xor t4 xor t6) xor t3 and t0 xor t2 and t7 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 4] + $C5D1B023;
temp:= (t0 and (t2 and t1 xor t3 xor t5) xor t2 and t7 xor t1 and t6 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[20] + $286085F0;
temp:= (t7 and (t1 and t0 xor t2 xor t4) xor t1 and t6 xor t0 and t5 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[28] + $CA417918;
temp:= (t6 and (t0 and t7 xor t1 xor t3) xor t0 and t5 xor t7 and t4 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[17] + $B8DB38EF;
temp:= (t5 and (t7 and t6 xor t0 xor t2) xor t7 and t4 xor t6 and t3 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 8] + $8E79DCB0;
temp:= (t4 and (t6 and t5 xor t7 xor t1) xor t6 and t3 xor t5 and t2 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[22] + $603A180E;
temp:= (t3 and (t5 and t4 xor t6 xor t0) xor t5 and t2 xor t4 and t1 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[29] + $6C9E0E8B;
temp:= (t2 and (t4 and t3 xor t5 xor t7) xor t4 and t1 xor t3 and t0 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[14] + $B01E8A3E;
temp:= (t1 and (t3 and t2 xor t4 xor t6) xor t3 and t0 xor t2 and t7 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[25] + $D71577C1;
temp:= (t0 and (t2 and t1 xor t3 xor t5) xor t2 and t7 xor t1 and t6 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[12] + $BD314B27;
temp:= (t7 and (t1 and t0 xor t2 xor t4) xor t1 and t6 xor t0 and t5 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[24] + $78AF2FDA;
temp:= (t6 and (t0 and t7 xor t1 xor t3) xor t0 and t5 xor t7 and t4 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[30] + $55605C60;
temp:= (t5 and (t7 and t6 xor t0 xor t2) xor t7 and t4 xor t6 and t3 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[16] + $E65525F3;
temp:= (t4 and (t6 and t5 xor t7 xor t1) xor t6 and t3 xor t5 and t2 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[26] + $AA55AB94;
temp:= (t3 and (t5 and t4 xor t6 xor t0) xor t5 and t2 xor t4 and t1 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[31] + $57489862;
temp:= (t2 and (t4 and t3 xor t5 xor t7) xor t4 and t1 xor t3 and t0 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[15] + $63E81440;
temp:= (t1 and (t3 and t2 xor t4 xor t6) xor t3 and t0 xor t2 and t7 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 7] + $55CA396A;
temp:= (t0 and (t2 and t1 xor t3 xor t5) xor t2 and t7 xor t1 and t6 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 3] + $2AAB10B6;
temp:= (t7 and (t1 and t0 xor t2 xor t4) xor t1 and t6 xor t0 and t5 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 1] + $B4CC5C34;
temp:= (t6 and (t0 and t7 xor t1 xor t3) xor t0 and t5 xor t7 and t4 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 0] + $1141E8CE;
temp:= (t5 and (t7 and t6 xor t0 xor t2) xor t7 and t4 xor t6 and t3 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[18] + $A15486AF;
temp:= (t4 and (t6 and t5 xor t7 xor t1) xor t6 and t3 xor t5 and t2 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[27] + $7C72E993;
temp:= (t3 and (t5 and t4 xor t6 xor t0) xor t5 and t2 xor t4 and t1 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[13] + $B3EE1411;
temp:= (t2 and (t4 and t3 xor t5 xor t7) xor t4 and t1 xor t3 and t0 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 6] + $636FBC2A;
temp:= (t1 and (t3 and t2 xor t4 xor t6) xor t3 and t0 xor t2 and t7 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[21] + $2BA9C55D;
temp:= (t0 and (t2 and t1 xor t3 xor t5) xor t2 and t7 xor t1 and t6 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[10] + $741831F6;
temp:= (t7 and (t1 and t0 xor t2 xor t4) xor t1 and t6 xor t0 and t5 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[23] + $CE5C3E16;
temp:= (t6 and (t0 and t7 xor t1 xor t3) xor t0 and t5 xor t7 and t4 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[11] + $9B87931E;
temp:= (t5 and (t7 and t6 xor t0 xor t2) xor t7 and t4 xor t6 and t3 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 5] + $AFD6BA33;
temp:= (t4 and (t6 and t5 xor t7 xor t1) xor t6 and t3 xor t5 and t2 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 2] + $6C24CF5C;

View file

@ -1,272 +0,0 @@
temp:= (t3 and (t0 xor t1) xor t5 and t6 xor t4 and t2 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 0];
temp:= (t2 and (t7 xor t0) xor t4 and t5 xor t3 and t1 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 1];
temp:= (t1 and (t6 xor t7) xor t3 and t4 xor t2 and t0 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 2];
temp:= (t0 and (t5 xor t6) xor t2 and t3 xor t1 and t7 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 3];
temp:= (t7 and (t4 xor t5) xor t1 and t2 xor t0 and t6 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 4];
temp:= (t6 and (t3 xor t4) xor t0 and t1 xor t7 and t5 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 5];
temp:= (t5 and (t2 xor t3) xor t7 and t0 xor t6 and t4 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 6];
temp:= (t4 and (t1 xor t2) xor t6 and t7 xor t5 and t3 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 7];
temp:= (t3 and (t0 xor t1) xor t5 and t6 xor t4 and t2 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 8];
temp:= (t2 and (t7 xor t0) xor t4 and t5 xor t3 and t1 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 9];
temp:= (t1 and (t6 xor t7) xor t3 and t4 xor t2 and t0 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[10];
temp:= (t0 and (t5 xor t6) xor t2 and t3 xor t1 and t7 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[11];
temp:= (t7 and (t4 xor t5) xor t1 and t2 xor t0 and t6 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[12];
temp:= (t6 and (t3 xor t4) xor t0 and t1 xor t7 and t5 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[13];
temp:= (t5 and (t2 xor t3) xor t7 and t0 xor t6 and t4 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[14];
temp:= (t4 and (t1 xor t2) xor t6 and t7 xor t5 and t3 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[15];
temp:= (t3 and (t0 xor t1) xor t5 and t6 xor t4 and t2 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[16];
temp:= (t2 and (t7 xor t0) xor t4 and t5 xor t3 and t1 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[17];
temp:= (t1 and (t6 xor t7) xor t3 and t4 xor t2 and t0 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[18];
temp:= (t0 and (t5 xor t6) xor t2 and t3 xor t1 and t7 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[19];
temp:= (t7 and (t4 xor t5) xor t1 and t2 xor t0 and t6 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[20];
temp:= (t6 and (t3 xor t4) xor t0 and t1 xor t7 and t5 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[21];
temp:= (t5 and (t2 xor t3) xor t7 and t0 xor t6 and t4 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[22];
temp:= (t4 and (t1 xor t2) xor t6 and t7 xor t5 and t3 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[23];
temp:= (t3 and (t0 xor t1) xor t5 and t6 xor t4 and t2 xor t0);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[24];
temp:= (t2 and (t7 xor t0) xor t4 and t5 xor t3 and t1 xor t7);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[25];
temp:= (t1 and (t6 xor t7) xor t3 and t4 xor t2 and t0 xor t6);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[26];
temp:= (t0 and (t5 xor t6) xor t2 and t3 xor t1 and t7 xor t5);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[27];
temp:= (t7 and (t4 xor t5) xor t1 and t2 xor t0 and t6 xor t4);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[28];
temp:= (t6 and (t3 xor t4) xor t0 and t1 xor t7 and t5 xor t3);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[29];
temp:= (t5 and (t2 xor t3) xor t7 and t0 xor t6 and t4 xor t2);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[30];
temp:= (t4 and (t1 xor t2) xor t6 and t7 xor t5 and t3 xor t1);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[31];
temp:= (t1 and (t6 and not t0 xor t2 and t5 xor t3 xor t4) xor t2 and (t6 xor t5) xor t0 and t5 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 5] + $452821E6;
temp:= (t0 and (t5 and not t7 xor t1 and t4 xor t2 xor t3) xor t1 and (t5 xor t4) xor t7 and t4 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[14] + $38D01377;
temp:= (t7 and (t4 and not t6 xor t0 and t3 xor t1 xor t2) xor t0 and (t4 xor t3) xor t6 and t3 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[26] + $BE5466CF;
temp:= (t6 and (t3 and not t5 xor t7 and t2 xor t0 xor t1) xor t7 and (t3 xor t2) xor t5 and t2 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[18] + $34E90C6C;
temp:= (t5 and (t2 and not t4 xor t6 and t1 xor t7 xor t0) xor t6 and (t2 xor t1) xor t4 and t1 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[11] + $C0AC29B7;
temp:= (t4 and (t1 and not t3 xor t5 and t0 xor t6 xor t7) xor t5 and (t1 xor t0) xor t3 and t0 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[28] + $C97C50DD;
temp:= (t3 and (t0 and not t2 xor t4 and t7 xor t5 xor t6) xor t4 and (t0 xor t7) xor t2 and t7 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 7] + $3F84D5B5;
temp:= (t2 and (t7 and not t1 xor t3 and t6 xor t4 xor t5) xor t3 and (t7 xor t6) xor t1 and t6 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[16] + $B5470917;
temp:= (t1 and (t6 and not t0 xor t2 and t5 xor t3 xor t4) xor t2 and (t6 xor t5) xor t0 and t5 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 0] + $9216D5D9;
temp:= (t0 and (t5 and not t7 xor t1 and t4 xor t2 xor t3) xor t1 and (t5 xor t4) xor t7 and t4 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[23] + $8979FB1B;
temp:= (t7 and (t4 and not t6 xor t0 and t3 xor t1 xor t2) xor t0 and (t4 xor t3) xor t6 and t3 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[20] + $D1310BA6;
temp:= (t6 and (t3 and not t5 xor t7 and t2 xor t0 xor t1) xor t7 and (t3 xor t2) xor t5 and t2 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[22] + $98DFB5AC;
temp:= (t5 and (t2 and not t4 xor t6 and t1 xor t7 xor t0) xor t6 and (t2 xor t1) xor t4 and t1 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 1] + $2FFD72DB;
temp:= (t4 and (t1 and not t3 xor t5 and t0 xor t6 xor t7) xor t5 and (t1 xor t0) xor t3 and t0 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[10] + $D01ADFB7;
temp:= (t3 and (t0 and not t2 xor t4 and t7 xor t5 xor t6) xor t4 and (t0 xor t7) xor t2 and t7 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 4] + $B8E1AFED;
temp:= (t2 and (t7 and not t1 xor t3 and t6 xor t4 xor t5) xor t3 and (t7 xor t6) xor t1 and t6 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 8] + $6A267E96;
temp:= (t1 and (t6 and not t0 xor t2 and t5 xor t3 xor t4) xor t2 and (t6 xor t5) xor t0 and t5 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[30] + $BA7C9045;
temp:= (t0 and (t5 and not t7 xor t1 and t4 xor t2 xor t3) xor t1 and (t5 xor t4) xor t7 and t4 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 3] + $F12C7F99;
temp:= (t7 and (t4 and not t6 xor t0 and t3 xor t1 xor t2) xor t0 and (t4 xor t3) xor t6 and t3 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[21] + $24A19947;
temp:= (t6 and (t3 and not t5 xor t7 and t2 xor t0 xor t1) xor t7 and (t3 xor t2) xor t5 and t2 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 9] + $B3916CF7;
temp:= (t5 and (t2 and not t4 xor t6 and t1 xor t7 xor t0) xor t6 and (t2 xor t1) xor t4 and t1 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[17] + $0801F2E2;
temp:= (t4 and (t1 and not t3 xor t5 and t0 xor t6 xor t7) xor t5 and (t1 xor t0) xor t3 and t0 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[24] + $858EFC16;
temp:= (t3 and (t0 and not t2 xor t4 and t7 xor t5 xor t6) xor t4 and (t0 xor t7) xor t2 and t7 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[29] + $636920D8;
temp:= (t2 and (t7 and not t1 xor t3 and t6 xor t4 xor t5) xor t3 and (t7 xor t6) xor t1 and t6 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 6] + $71574E69;
temp:= (t1 and (t6 and not t0 xor t2 and t5 xor t3 xor t4) xor t2 and (t6 xor t5) xor t0 and t5 xor t4);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[19] + $A458FEA3;
temp:= (t0 and (t5 and not t7 xor t1 and t4 xor t2 xor t3) xor t1 and (t5 xor t4) xor t7 and t4 xor t3);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[12] + $F4933D7E;
temp:= (t7 and (t4 and not t6 xor t0 and t3 xor t1 xor t2) xor t0 and (t4 xor t3) xor t6 and t3 xor t2);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[15] + $0D95748F;
temp:= (t6 and (t3 and not t5 xor t7 and t2 xor t0 xor t1) xor t7 and (t3 xor t2) xor t5 and t2 xor t1);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[13] + $728EB658;
temp:= (t5 and (t2 and not t4 xor t6 and t1 xor t7 xor t0) xor t6 and (t2 xor t1) xor t4 and t1 xor t0);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 2] + $718BCD58;
temp:= (t4 and (t1 and not t3 xor t5 and t0 xor t6 xor t7) xor t5 and (t1 xor t0) xor t3 and t0 xor t7);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[25] + $82154AEE;
temp:= (t3 and (t0 and not t2 xor t4 and t7 xor t5 xor t6) xor t4 and (t0 xor t7) xor t2 and t7 xor t6);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[31] + $7B54A41D;
temp:= (t2 and (t7 and not t1 xor t3 and t6 xor t4 xor t5) xor t3 and (t7 xor t6) xor t1 and t6 xor t5);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[27] + $C25A59B5;
temp:= (t6 and (t2 and t0 xor t1 xor t5) xor t2 and t3 xor t0 and t4 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[19] + $9C30D539;
temp:= (t5 and (t1 and t7 xor t0 xor t4) xor t1 and t2 xor t7 and t3 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 9] + $2AF26013;
temp:= (t4 and (t0 and t6 xor t7 xor t3) xor t0 and t1 xor t6 and t2 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 4] + $C5D1B023;
temp:= (t3 and (t7 and t5 xor t6 xor t2) xor t7 and t0 xor t5 and t1 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[20] + $286085F0;
temp:= (t2 and (t6 and t4 xor t5 xor t1) xor t6 and t7 xor t4 and t0 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[28] + $CA417918;
temp:= (t1 and (t5 and t3 xor t4 xor t0) xor t5 and t6 xor t3 and t7 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[17] + $B8DB38EF;
temp:= (t0 and (t4 and t2 xor t3 xor t7) xor t4 and t5 xor t2 and t6 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 8] + $8E79DCB0;
temp:= (t7 and (t3 and t1 xor t2 xor t6) xor t3 and t4 xor t1 and t5 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[22] + $603A180E;
temp:= (t6 and (t2 and t0 xor t1 xor t5) xor t2 and t3 xor t0 and t4 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[29] + $6C9E0E8B;
temp:= (t5 and (t1 and t7 xor t0 xor t4) xor t1 and t2 xor t7 and t3 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[14] + $B01E8A3E;
temp:= (t4 and (t0 and t6 xor t7 xor t3) xor t0 and t1 xor t6 and t2 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[25] + $D71577C1;
temp:= (t3 and (t7 and t5 xor t6 xor t2) xor t7 and t0 xor t5 and t1 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[12] + $BD314B27;
temp:= (t2 and (t6 and t4 xor t5 xor t1) xor t6 and t7 xor t4 and t0 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[24] + $78AF2FDA;
temp:= (t1 and (t5 and t3 xor t4 xor t0) xor t5 and t6 xor t3 and t7 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[30] + $55605C60;
temp:= (t0 and (t4 and t2 xor t3 xor t7) xor t4 and t5 xor t2 and t6 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[16] + $E65525F3;
temp:= (t7 and (t3 and t1 xor t2 xor t6) xor t3 and t4 xor t1 and t5 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[26] + $AA55AB94;
temp:= (t6 and (t2 and t0 xor t1 xor t5) xor t2 and t3 xor t0 and t4 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[31] + $57489862;
temp:= (t5 and (t1 and t7 xor t0 xor t4) xor t1 and t2 xor t7 and t3 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[15] + $63E81440;
temp:= (t4 and (t0 and t6 xor t7 xor t3) xor t0 and t1 xor t6 and t2 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 7] + $55CA396A;
temp:= (t3 and (t7 and t5 xor t6 xor t2) xor t7 and t0 xor t5 and t1 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 3] + $2AAB10B6;
temp:= (t2 and (t6 and t4 xor t5 xor t1) xor t6 and t7 xor t4 and t0 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 1] + $B4CC5C34;
temp:= (t1 and (t5 and t3 xor t4 xor t0) xor t5 and t6 xor t3 and t7 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 0] + $1141E8CE;
temp:= (t0 and (t4 and t2 xor t3 xor t7) xor t4 and t5 xor t2 and t6 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[18] + $A15486AF;
temp:= (t7 and (t3 and t1 xor t2 xor t6) xor t3 and t4 xor t1 and t5 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[27] + $7C72E993;
temp:= (t6 and (t2 and t0 xor t1 xor t5) xor t2 and t3 xor t0 and t4 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[13] + $B3EE1411;
temp:= (t5 and (t1 and t7 xor t0 xor t4) xor t1 and t2 xor t7 and t3 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 6] + $636FBC2A;
temp:= (t4 and (t0 and t6 xor t7 xor t3) xor t0 and t1 xor t6 and t2 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[21] + $2BA9C55D;
temp:= (t3 and (t7 and t5 xor t6 xor t2) xor t7 and t0 xor t5 and t1 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[10] + $741831F6;
temp:= (t2 and (t6 and t4 xor t5 xor t1) xor t6 and t7 xor t4 and t0 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[23] + $CE5C3E16;
temp:= (t1 and (t5 and t3 xor t4 xor t0) xor t5 and t6 xor t3 and t7 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[11] + $9B87931E;
temp:= (t0 and (t4 and t2 xor t3 xor t7) xor t4 and t5 xor t2 and t6 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 5] + $AFD6BA33;
temp:= (t7 and (t3 and t1 xor t2 xor t6) xor t3 and t4 xor t1 and t5 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 2] + $6C24CF5C;
temp:= (t0 and (t4 and not t2 xor t5 and not t6 xor t1 xor t6 xor t3) xor t5 and (t1 and t2 xor t4 xor t6) xor t2 and t6 xor t3);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[24] + $7A325381;
temp:= (t7 and (t3 and not t1 xor t4 and not t5 xor t0 xor t5 xor t2) xor t4 and (t0 and t1 xor t3 xor t5) xor t1 and t5 xor t2);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 4] + $28958677;
temp:= (t6 and (t2 and not t0 xor t3 and not t4 xor t7 xor t4 xor t1) xor t3 and (t7 and t0 xor t2 xor t4) xor t0 and t4 xor t1);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 0] + $3B8F4898;
temp:= (t5 and (t1 and not t7 xor t2 and not t3 xor t6 xor t3 xor t0) xor t2 and (t6 and t7 xor t1 xor t3) xor t7 and t3 xor t0);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[14] + $6B4BB9AF;
temp:= (t4 and (t0 and not t6 xor t1 and not t2 xor t5 xor t2 xor t7) xor t1 and (t5 and t6 xor t0 xor t2) xor t6 and t2 xor t7);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 2] + $C4BFE81B;
temp:= (t3 and (t7 and not t5 xor t0 and not t1 xor t4 xor t1 xor t6) xor t0 and (t4 and t5 xor t7 xor t1) xor t5 and t1 xor t6);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 7] + $66282193;
temp:= (t2 and (t6 and not t4 xor t7 and not t0 xor t3 xor t0 xor t5) xor t7 and (t3 and t4 xor t6 xor t0) xor t4 and t0 xor t5);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[28] + $61D809CC;
temp:= (t1 and (t5 and not t3 xor t6 and not t7 xor t2 xor t7 xor t4) xor t6 and (t2 and t3 xor t5 xor t7) xor t3 and t7 xor t4);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[23] + $FB21A991;
temp:= (t0 and (t4 and not t2 xor t5 and not t6 xor t1 xor t6 xor t3) xor t5 and (t1 and t2 xor t4 xor t6) xor t2 and t6 xor t3);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[26] + $487CAC60;
temp:= (t7 and (t3 and not t1 xor t4 and not t5 xor t0 xor t5 xor t2) xor t4 and (t0 and t1 xor t3 xor t5) xor t1 and t5 xor t2);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 6] + $5DEC8032;
temp:= (t6 and (t2 and not t0 xor t3 and not t4 xor t7 xor t4 xor t1) xor t3 and (t7 and t0 xor t2 xor t4) xor t0 and t4 xor t1);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[30] + $EF845D5D;
temp:= (t5 and (t1 and not t7 xor t2 and not t3 xor t6 xor t3 xor t0) xor t2 and (t6 and t7 xor t1 xor t3) xor t7 and t3 xor t0);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[20] + $E98575B1;
temp:= (t4 and (t0 and not t6 xor t1 and not t2 xor t5 xor t2 xor t7) xor t1 and (t5 and t6 xor t0 xor t2) xor t6 and t2 xor t7);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[18] + $DC262302;
temp:= (t3 and (t7 and not t5 xor t0 and not t1 xor t4 xor t1 xor t6) xor t0 and (t4 and t5 xor t7 xor t1) xor t5 and t1 xor t6);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[25] + $EB651B88;
temp:= (t2 and (t6 and not t4 xor t7 and not t0 xor t3 xor t0 xor t5) xor t7 and (t3 and t4 xor t6 xor t0) xor t4 and t0 xor t5);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[19] + $23893E81;
temp:= (t1 and (t5 and not t3 xor t6 and not t7 xor t2 xor t7 xor t4) xor t6 and (t2 and t3 xor t5 xor t7) xor t3 and t7 xor t4);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 3] + $D396ACC5;
temp:= (t0 and (t4 and not t2 xor t5 and not t6 xor t1 xor t6 xor t3) xor t5 and (t1 and t2 xor t4 xor t6) xor t2 and t6 xor t3);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[22] + $0F6D6FF3;
temp:= (t7 and (t3 and not t1 xor t4 and not t5 xor t0 xor t5 xor t2) xor t4 and (t0 and t1 xor t3 xor t5) xor t1 and t5 xor t2);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[11] + $83F44239;
temp:= (t6 and (t2 and not t0 xor t3 and not t4 xor t7 xor t4 xor t1) xor t3 and (t7 and t0 xor t2 xor t4) xor t0 and t4 xor t1);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[31] + $2E0B4482;
temp:= (t5 and (t1 and not t7 xor t2 and not t3 xor t6 xor t3 xor t0) xor t2 and (t6 and t7 xor t1 xor t3) xor t7 and t3 xor t0);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[21] + $A4842004;
temp:= (t4 and (t0 and not t6 xor t1 and not t2 xor t5 xor t2 xor t7) xor t1 and (t5 and t6 xor t0 xor t2) xor t6 and t2 xor t7);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 8] + $69C8F04A;
temp:= (t3 and (t7 and not t5 xor t0 and not t1 xor t4 xor t1 xor t6) xor t0 and (t4 and t5 xor t7 xor t1) xor t5 and t1 xor t6);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[27] + $9E1F9B5E;
temp:= (t2 and (t6 and not t4 xor t7 and not t0 xor t3 xor t0 xor t5) xor t7 and (t3 and t4 xor t6 xor t0) xor t4 and t0 xor t5);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[12] + $21C66842;
temp:= (t1 and (t5 and not t3 xor t6 and not t7 xor t2 xor t7 xor t4) xor t6 and (t2 and t3 xor t5 xor t7) xor t3 and t7 xor t4);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 9] + $F6E96C9A;
temp:= (t0 and (t4 and not t2 xor t5 and not t6 xor t1 xor t6 xor t3) xor t5 and (t1 and t2 xor t4 xor t6) xor t2 and t6 xor t3);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 1] + $670C9C61;
temp:= (t7 and (t3 and not t1 xor t4 and not t5 xor t0 xor t5 xor t2) xor t4 and (t0 and t1 xor t3 xor t5) xor t1 and t5 xor t2);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[29] + $ABD388F0;
temp:= (t6 and (t2 and not t0 xor t3 and not t4 xor t7 xor t4 xor t1) xor t3 and (t7 and t0 xor t2 xor t4) xor t0 and t4 xor t1);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 5] + $6A51A0D2;
temp:= (t5 and (t1 and not t7 xor t2 and not t3 xor t6 xor t3 xor t0) xor t2 and (t6 and t7 xor t1 xor t3) xor t7 and t3 xor t0);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[15] + $D8542F68;
temp:= (t4 and (t0 and not t6 xor t1 and not t2 xor t5 xor t2 xor t7) xor t1 and (t5 and t6 xor t0 xor t2) xor t6 and t2 xor t7);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[17] + $960FA728;
temp:= (t3 and (t7 and not t5 xor t0 and not t1 xor t4 xor t1 xor t6) xor t0 and (t4 and t5 xor t7 xor t1) xor t5 and t1 xor t6);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[10] + $AB5133A3;
temp:= (t2 and (t6 and not t4 xor t7 and not t0 xor t3 xor t0 xor t5) xor t7 and (t3 and t4 xor t6 xor t0) xor t4 and t0 xor t5);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[16] + $6EEF0B6C;
temp:= (t1 and (t5 and not t3 xor t6 and not t7 xor t2 xor t7 xor t4) xor t6 and (t2 and t3 xor t5 xor t7) xor t3 and t7 xor t4);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[13] + $137A3BE4;

View file

@ -1,339 +0,0 @@
temp:= (t2 and (t6 xor t1) xor t5 and t4 xor t0 and t3 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 0];
temp:= (t1 and (t5 xor t0) xor t4 and t3 xor t7 and t2 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 1];
temp:= (t0 and (t4 xor t7) xor t3 and t2 xor t6 and t1 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 2];
temp:= (t7 and (t3 xor t6) xor t2 and t1 xor t5 and t0 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 3];
temp:= (t6 and (t2 xor t5) xor t1 and t0 xor t4 and t7 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 4];
temp:= (t5 and (t1 xor t4) xor t0 and t7 xor t3 and t6 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 5];
temp:= (t4 and (t0 xor t3) xor t7 and t6 xor t2 and t5 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 6];
temp:= (t3 and (t7 xor t2) xor t6 and t5 xor t1 and t4 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 7];
temp:= (t2 and (t6 xor t1) xor t5 and t4 xor t0 and t3 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 8];
temp:= (t1 and (t5 xor t0) xor t4 and t3 xor t7 and t2 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 9];
temp:= (t0 and (t4 xor t7) xor t3 and t2 xor t6 and t1 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[10];
temp:= (t7 and (t3 xor t6) xor t2 and t1 xor t5 and t0 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[11];
temp:= (t6 and (t2 xor t5) xor t1 and t0 xor t4 and t7 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[12];
temp:= (t5 and (t1 xor t4) xor t0 and t7 xor t3 and t6 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[13];
temp:= (t4 and (t0 xor t3) xor t7 and t6 xor t2 and t5 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[14];
temp:= (t3 and (t7 xor t2) xor t6 and t5 xor t1 and t4 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[15];
temp:= (t2 and (t6 xor t1) xor t5 and t4 xor t0 and t3 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[16];
temp:= (t1 and (t5 xor t0) xor t4 and t3 xor t7 and t2 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[17];
temp:= (t0 and (t4 xor t7) xor t3 and t2 xor t6 and t1 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[18];
temp:= (t7 and (t3 xor t6) xor t2 and t1 xor t5 and t0 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[19];
temp:= (t6 and (t2 xor t5) xor t1 and t0 xor t4 and t7 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[20];
temp:= (t5 and (t1 xor t4) xor t0 and t7 xor t3 and t6 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[21];
temp:= (t4 and (t0 xor t3) xor t7 and t6 xor t2 and t5 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[22];
temp:= (t3 and (t7 xor t2) xor t6 and t5 xor t1 and t4 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[23];
temp:= (t2 and (t6 xor t1) xor t5 and t4 xor t0 and t3 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[24];
temp:= (t1 and (t5 xor t0) xor t4 and t3 xor t7 and t2 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[25];
temp:= (t0 and (t4 xor t7) xor t3 and t2 xor t6 and t1 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[26];
temp:= (t7 and (t3 xor t6) xor t2 and t1 xor t5 and t0 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[27];
temp:= (t6 and (t2 xor t5) xor t1 and t0 xor t4 and t7 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[28];
temp:= (t5 and (t1 xor t4) xor t0 and t7 xor t3 and t6 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[29];
temp:= (t4 and (t0 xor t3) xor t7 and t6 xor t2 and t5 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[30];
temp:= (t3 and (t7 xor t2) xor t6 and t5 xor t1 and t4 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[31];
temp:= (t3 and (t4 and not t0 xor t1 and t2 xor t6 xor t5) xor t1 and (t4 xor t2) xor t0 and t2 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 5] + $452821E6;
temp:= (t2 and (t3 and not t7 xor t0 and t1 xor t5 xor t4) xor t0 and (t3 xor t1) xor t7 and t1 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[14] + $38D01377;
temp:= (t1 and (t2 and not t6 xor t7 and t0 xor t4 xor t3) xor t7 and (t2 xor t0) xor t6 and t0 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[26] + $BE5466CF;
temp:= (t0 and (t1 and not t5 xor t6 and t7 xor t3 xor t2) xor t6 and (t1 xor t7) xor t5 and t7 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[18] + $34E90C6C;
temp:= (t7 and (t0 and not t4 xor t5 and t6 xor t2 xor t1) xor t5 and (t0 xor t6) xor t4 and t6 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[11] + $C0AC29B7;
temp:= (t6 and (t7 and not t3 xor t4 and t5 xor t1 xor t0) xor t4 and (t7 xor t5) xor t3 and t5 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[28] + $C97C50DD;
temp:= (t5 and (t6 and not t2 xor t3 and t4 xor t0 xor t7) xor t3 and (t6 xor t4) xor t2 and t4 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 7] + $3F84D5B5;
temp:= (t4 and (t5 and not t1 xor t2 and t3 xor t7 xor t6) xor t2 and (t5 xor t3) xor t1 and t3 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[16] + $B5470917;
temp:= (t3 and (t4 and not t0 xor t1 and t2 xor t6 xor t5) xor t1 and (t4 xor t2) xor t0 and t2 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 0] + $9216D5D9;
temp:= (t2 and (t3 and not t7 xor t0 and t1 xor t5 xor t4) xor t0 and (t3 xor t1) xor t7 and t1 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[23] + $8979FB1B;
temp:= (t1 and (t2 and not t6 xor t7 and t0 xor t4 xor t3) xor t7 and (t2 xor t0) xor t6 and t0 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[20] + $D1310BA6;
temp:= (t0 and (t1 and not t5 xor t6 and t7 xor t3 xor t2) xor t6 and (t1 xor t7) xor t5 and t7 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[22] + $98DFB5AC;
temp:= (t7 and (t0 and not t4 xor t5 and t6 xor t2 xor t1) xor t5 and (t0 xor t6) xor t4 and t6 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 1] + $2FFD72DB;
temp:= (t6 and (t7 and not t3 xor t4 and t5 xor t1 xor t0) xor t4 and (t7 xor t5) xor t3 and t5 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[10] + $D01ADFB7;
temp:= (t5 and (t6 and not t2 xor t3 and t4 xor t0 xor t7) xor t3 and (t6 xor t4) xor t2 and t4 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 4] + $B8E1AFED;
temp:= (t4 and (t5 and not t1 xor t2 and t3 xor t7 xor t6) xor t2 and (t5 xor t3) xor t1 and t3 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 8] + $6A267E96;
temp:= (t3 and (t4 and not t0 xor t1 and t2 xor t6 xor t5) xor t1 and (t4 xor t2) xor t0 and t2 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[30] + $BA7C9045;
temp:= (t2 and (t3 and not t7 xor t0 and t1 xor t5 xor t4) xor t0 and (t3 xor t1) xor t7 and t1 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 3] + $F12C7F99;
temp:= (t1 and (t2 and not t6 xor t7 and t0 xor t4 xor t3) xor t7 and (t2 xor t0) xor t6 and t0 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[21] + $24A19947;
temp:= (t0 and (t1 and not t5 xor t6 and t7 xor t3 xor t2) xor t6 and (t1 xor t7) xor t5 and t7 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 9] + $B3916CF7;
temp:= (t7 and (t0 and not t4 xor t5 and t6 xor t2 xor t1) xor t5 and (t0 xor t6) xor t4 and t6 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[17] + $0801F2E2;
temp:= (t6 and (t7 and not t3 xor t4 and t5 xor t1 xor t0) xor t4 and (t7 xor t5) xor t3 and t5 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[24] + $858EFC16;
temp:= (t5 and (t6 and not t2 xor t3 and t4 xor t0 xor t7) xor t3 and (t6 xor t4) xor t2 and t4 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[29] + $636920D8;
temp:= (t4 and (t5 and not t1 xor t2 and t3 xor t7 xor t6) xor t2 and (t5 xor t3) xor t1 and t3 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 6] + $71574E69;
temp:= (t3 and (t4 and not t0 xor t1 and t2 xor t6 xor t5) xor t1 and (t4 xor t2) xor t0 and t2 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[19] + $A458FEA3;
temp:= (t2 and (t3 and not t7 xor t0 and t1 xor t5 xor t4) xor t0 and (t3 xor t1) xor t7 and t1 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[12] + $F4933D7E;
temp:= (t1 and (t2 and not t6 xor t7 and t0 xor t4 xor t3) xor t7 and (t2 xor t0) xor t6 and t0 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[15] + $0D95748F;
temp:= (t0 and (t1 and not t5 xor t6 and t7 xor t3 xor t2) xor t6 and (t1 xor t7) xor t5 and t7 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[13] + $728EB658;
temp:= (t7 and (t0 and not t4 xor t5 and t6 xor t2 xor t1) xor t5 and (t0 xor t6) xor t4 and t6 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 2] + $718BCD58;
temp:= (t6 and (t7 and not t3 xor t4 and t5 xor t1 xor t0) xor t4 and (t7 xor t5) xor t3 and t5 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[25] + $82154AEE;
temp:= (t5 and (t6 and not t2 xor t3 and t4 xor t0 xor t7) xor t3 and (t6 xor t4) xor t2 and t4 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[31] + $7B54A41D;
temp:= (t4 and (t5 and not t1 xor t2 and t3 xor t7 xor t6) xor t2 and (t5 xor t3) xor t1 and t3 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[27] + $C25A59B5;
temp:= (t4 and (t1 and t3 xor t2 xor t5) xor t1 and t0 xor t3 and t6 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[19] + $9C30D539;
temp:= (t3 and (t0 and t2 xor t1 xor t4) xor t0 and t7 xor t2 and t5 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 9] + $2AF26013;
temp:= (t2 and (t7 and t1 xor t0 xor t3) xor t7 and t6 xor t1 and t4 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 4] + $C5D1B023;
temp:= (t1 and (t6 and t0 xor t7 xor t2) xor t6 and t5 xor t0 and t3 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[20] + $286085F0;
temp:= (t0 and (t5 and t7 xor t6 xor t1) xor t5 and t4 xor t7 and t2 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[28] + $CA417918;
temp:= (t7 and (t4 and t6 xor t5 xor t0) xor t4 and t3 xor t6 and t1 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[17] + $B8DB38EF;
temp:= (t6 and (t3 and t5 xor t4 xor t7) xor t3 and t2 xor t5 and t0 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 8] + $8E79DCB0;
temp:= (t5 and (t2 and t4 xor t3 xor t6) xor t2 and t1 xor t4 and t7 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[22] + $603A180E;
temp:= (t4 and (t1 and t3 xor t2 xor t5) xor t1 and t0 xor t3 and t6 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[29] + $6C9E0E8B;
temp:= (t3 and (t0 and t2 xor t1 xor t4) xor t0 and t7 xor t2 and t5 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[14] + $B01E8A3E;
temp:= (t2 and (t7 and t1 xor t0 xor t3) xor t7 and t6 xor t1 and t4 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[25] + $D71577C1;
temp:= (t1 and (t6 and t0 xor t7 xor t2) xor t6 and t5 xor t0 and t3 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[12] + $BD314B27;
temp:= (t0 and (t5 and t7 xor t6 xor t1) xor t5 and t4 xor t7 and t2 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[24] + $78AF2FDA;
temp:= (t7 and (t4 and t6 xor t5 xor t0) xor t4 and t3 xor t6 and t1 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[30] + $55605C60;
temp:= (t6 and (t3 and t5 xor t4 xor t7) xor t3 and t2 xor t5 and t0 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[16] + $E65525F3;
temp:= (t5 and (t2 and t4 xor t3 xor t6) xor t2 and t1 xor t4 and t7 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[26] + $AA55AB94;
temp:= (t4 and (t1 and t3 xor t2 xor t5) xor t1 and t0 xor t3 and t6 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[31] + $57489862;
temp:= (t3 and (t0 and t2 xor t1 xor t4) xor t0 and t7 xor t2 and t5 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[15] + $63E81440;
temp:= (t2 and (t7 and t1 xor t0 xor t3) xor t7 and t6 xor t1 and t4 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 7] + $55CA396A;
temp:= (t1 and (t6 and t0 xor t7 xor t2) xor t6 and t5 xor t0 and t3 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 3] + $2AAB10B6;
temp:= (t0 and (t5 and t7 xor t6 xor t1) xor t5 and t4 xor t7 and t2 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 1] + $B4CC5C34;
temp:= (t7 and (t4 and t6 xor t5 xor t0) xor t4 and t3 xor t6 and t1 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 0] + $1141E8CE;
temp:= (t6 and (t3 and t5 xor t4 xor t7) xor t3 and t2 xor t5 and t0 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[18] + $A15486AF;
temp:= (t5 and (t2 and t4 xor t3 xor t6) xor t2 and t1 xor t4 and t7 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[27] + $7C72E993;
temp:= (t4 and (t1 and t3 xor t2 xor t5) xor t1 and t0 xor t3 and t6 xor t5);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[13] + $B3EE1411;
temp:= (t3 and (t0 and t2 xor t1 xor t4) xor t0 and t7 xor t2 and t5 xor t4);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 6] + $636FBC2A;
temp:= (t2 and (t7 and t1 xor t0 xor t3) xor t7 and t6 xor t1 and t4 xor t3);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[21] + $2BA9C55D;
temp:= (t1 and (t6 and t0 xor t7 xor t2) xor t6 and t5 xor t0 and t3 xor t2);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[10] + $741831F6;
temp:= (t0 and (t5 and t7 xor t6 xor t1) xor t5 and t4 xor t7 and t2 xor t1);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[23] + $CE5C3E16;
temp:= (t7 and (t4 and t6 xor t5 xor t0) xor t4 and t3 xor t6 and t1 xor t0);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[11] + $9B87931E;
temp:= (t6 and (t3 and t5 xor t4 xor t7) xor t3 and t2 xor t5 and t0 xor t7);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[ 5] + $AFD6BA33;
temp:= (t5 and (t2 and t4 xor t3 xor t6) xor t2 and t1 xor t4 and t7 xor t6);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 2] + $6C24CF5C;
temp:= (t3 and (t5 and not t0 xor t2 and not t1 xor t4 xor t1 xor t6) xor t2 and (t4 and t0 xor t5 xor t1) xor t0 and t1 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[24] + $7A325381;
temp:= (t2 and (t4 and not t7 xor t1 and not t0 xor t3 xor t0 xor t5) xor t1 and (t3 and t7 xor t4 xor t0) xor t7 and t0 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 4] + $28958677;
temp:= (t1 and (t3 and not t6 xor t0 and not t7 xor t2 xor t7 xor t4) xor t0 and (t2 and t6 xor t3 xor t7) xor t6 and t7 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 0] + $3B8F4898;
temp:= (t0 and (t2 and not t5 xor t7 and not t6 xor t1 xor t6 xor t3) xor t7 and (t1 and t5 xor t2 xor t6) xor t5 and t6 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[14] + $6B4BB9AF;
temp:= (t7 and (t1 and not t4 xor t6 and not t5 xor t0 xor t5 xor t2) xor t6 and (t0 and t4 xor t1 xor t5) xor t4 and t5 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 2] + $C4BFE81B;
temp:= (t6 and (t0 and not t3 xor t5 and not t4 xor t7 xor t4 xor t1) xor t5 and (t7 and t3 xor t0 xor t4) xor t3 and t4 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 7] + $66282193;
temp:= (t5 and (t7 and not t2 xor t4 and not t3 xor t6 xor t3 xor t0) xor t4 and (t6 and t2 xor t7 xor t3) xor t2 and t3 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[28] + $61D809CC;
temp:= (t4 and (t6 and not t1 xor t3 and not t2 xor t5 xor t2 xor t7) xor t3 and (t5 and t1 xor t6 xor t2) xor t1 and t2 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[23] + $FB21A991;
temp:= (t3 and (t5 and not t0 xor t2 and not t1 xor t4 xor t1 xor t6) xor t2 and (t4 and t0 xor t5 xor t1) xor t0 and t1 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[26] + $487CAC60;
temp:= (t2 and (t4 and not t7 xor t1 and not t0 xor t3 xor t0 xor t5) xor t1 and (t3 and t7 xor t4 xor t0) xor t7 and t0 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 6] + $5DEC8032;
temp:= (t1 and (t3 and not t6 xor t0 and not t7 xor t2 xor t7 xor t4) xor t0 and (t2 and t6 xor t3 xor t7) xor t6 and t7 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[30] + $EF845D5D;
temp:= (t0 and (t2 and not t5 xor t7 and not t6 xor t1 xor t6 xor t3) xor t7 and (t1 and t5 xor t2 xor t6) xor t5 and t6 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[20] + $E98575B1;
temp:= (t7 and (t1 and not t4 xor t6 and not t5 xor t0 xor t5 xor t2) xor t6 and (t0 and t4 xor t1 xor t5) xor t4 and t5 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[18] + $DC262302;
temp:= (t6 and (t0 and not t3 xor t5 and not t4 xor t7 xor t4 xor t1) xor t5 and (t7 and t3 xor t0 xor t4) xor t3 and t4 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[25] + $EB651B88;
temp:= (t5 and (t7 and not t2 xor t4 and not t3 xor t6 xor t3 xor t0) xor t4 and (t6 and t2 xor t7 xor t3) xor t2 and t3 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[19] + $23893E81;
temp:= (t4 and (t6 and not t1 xor t3 and not t2 xor t5 xor t2 xor t7) xor t3 and (t5 and t1 xor t6 xor t2) xor t1 and t2 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 3] + $D396ACC5;
temp:= (t3 and (t5 and not t0 xor t2 and not t1 xor t4 xor t1 xor t6) xor t2 and (t4 and t0 xor t5 xor t1) xor t0 and t1 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[22] + $0F6D6FF3;
temp:= (t2 and (t4 and not t7 xor t1 and not t0 xor t3 xor t0 xor t5) xor t1 and (t3 and t7 xor t4 xor t0) xor t7 and t0 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[11] + $83F44239;
temp:= (t1 and (t3 and not t6 xor t0 and not t7 xor t2 xor t7 xor t4) xor t0 and (t2 and t6 xor t3 xor t7) xor t6 and t7 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[31] + $2E0B4482;
temp:= (t0 and (t2 and not t5 xor t7 and not t6 xor t1 xor t6 xor t3) xor t7 and (t1 and t5 xor t2 xor t6) xor t5 and t6 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[21] + $A4842004;
temp:= (t7 and (t1 and not t4 xor t6 and not t5 xor t0 xor t5 xor t2) xor t6 and (t0 and t4 xor t1 xor t5) xor t4 and t5 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 8] + $69C8F04A;
temp:= (t6 and (t0 and not t3 xor t5 and not t4 xor t7 xor t4 xor t1) xor t5 and (t7 and t3 xor t0 xor t4) xor t3 and t4 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[27] + $9E1F9B5E;
temp:= (t5 and (t7 and not t2 xor t4 and not t3 xor t6 xor t3 xor t0) xor t4 and (t6 and t2 xor t7 xor t3) xor t2 and t3 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[12] + $21C66842;
temp:= (t4 and (t6 and not t1 xor t3 and not t2 xor t5 xor t2 xor t7) xor t3 and (t5 and t1 xor t6 xor t2) xor t1 and t2 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[ 9] + $F6E96C9A;
temp:= (t3 and (t5 and not t0 xor t2 and not t1 xor t4 xor t1 xor t6) xor t2 and (t4 and t0 xor t5 xor t1) xor t0 and t1 xor t6);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 1] + $670C9C61;
temp:= (t2 and (t4 and not t7 xor t1 and not t0 xor t3 xor t0 xor t5) xor t1 and (t3 and t7 xor t4 xor t0) xor t7 and t0 xor t5);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[29] + $ABD388F0;
temp:= (t1 and (t3 and not t6 xor t0 and not t7 xor t2 xor t7 xor t4) xor t0 and (t2 and t6 xor t3 xor t7) xor t6 and t7 xor t4);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[ 5] + $6A51A0D2;
temp:= (t0 and (t2 and not t5 xor t7 and not t6 xor t1 xor t6 xor t3) xor t7 and (t1 and t5 xor t2 xor t6) xor t5 and t6 xor t3);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[15] + $D8542F68;
temp:= (t7 and (t1 and not t4 xor t6 and not t5 xor t0 xor t5 xor t2) xor t6 and (t0 and t4 xor t1 xor t5) xor t4 and t5 xor t2);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[17] + $960FA728;
temp:= (t6 and (t0 and not t3 xor t5 and not t4 xor t7 xor t4 xor t1) xor t5 and (t7 and t3 xor t0 xor t4) xor t3 and t4 xor t1);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[10] + $AB5133A3;
temp:= (t5 and (t7 and not t2 xor t4 and not t3 xor t6 xor t3 xor t0) xor t4 and (t6 and t2 xor t7 xor t3) xor t2 and t3 xor t0);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[16] + $6EEF0B6C;
temp:= (t4 and (t6 and not t1 xor t3 and not t2 xor t5 xor t2 xor t7) xor t3 and (t5 and t1 xor t6 xor t2) xor t1 and t2 xor t7);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[13] + $137A3BE4;
temp:= (t1 and (t3 and t4 and t6 xor not t5) xor t3 and t0 xor t4 and t5 xor t6 and t2);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[27] + $BA3BF050;
temp:= (t0 and (t2 and t3 and t5 xor not t4) xor t2 and t7 xor t3 and t4 xor t5 and t1);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 3] + $7EFB2A98;
temp:= (t7 and (t1 and t2 and t4 xor not t3) xor t1 and t6 xor t2 and t3 xor t4 and t0);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[21] + $A1F1651D;
temp:= (t6 and (t0 and t1 and t3 xor not t2) xor t0 and t5 xor t1 and t2 xor t3 and t7);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[26] + $39AF0176;
temp:= (t5 and (t7 and t0 and t2 xor not t1) xor t7 and t4 xor t0 and t1 xor t2 and t6);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[17] + $66CA593E;
temp:= (t4 and (t6 and t7 and t1 xor not t0) xor t6 and t3 xor t7 and t0 xor t1 and t5);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[11] + $82430E88;
temp:= (t3 and (t5 and t6 and t0 xor not t7) xor t5 and t2 xor t6 and t7 xor t0 and t4);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[20] + $8CEE8619;
temp:= (t2 and (t4 and t5 and t7 xor not t6) xor t4 and t1 xor t5 and t6 xor t7 and t3);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[29] + $456F9FB4;
temp:= (t1 and (t3 and t4 and t6 xor not t5) xor t3 and t0 xor t4 and t5 xor t6 and t2);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[19] + $7D84A5C3;
temp:= (t0 and (t2 and t3 and t5 xor not t4) xor t2 and t7 xor t3 and t4 xor t5 and t1);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 0] + $3B8B5EBE;
temp:= (t7 and (t1 and t2 and t4 xor not t3) xor t1 and t6 xor t2 and t3 xor t4 and t0);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[12] + $E06F75D8;
temp:= (t6 and (t0 and t1 and t3 xor not t2) xor t0 and t5 xor t1 and t2 xor t3 and t7);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[ 7] + $85C12073;
temp:= (t5 and (t7 and t0 and t2 xor not t1) xor t7 and t4 xor t0 and t1 xor t2 and t6);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[13] + $401A449F;
temp:= (t4 and (t6 and t7 and t1 xor not t0) xor t6 and t3 xor t7 and t0 xor t1 and t5);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 8] + $56C16AA6;
temp:= (t3 and (t5 and t6 and t0 xor not t7) xor t5 and t2 xor t6 and t7 xor t0 and t4);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[31] + $4ED3AA62;
temp:= (t2 and (t4 and t5 and t7 xor not t6) xor t4 and t1 xor t5 and t6 xor t7 and t3);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[10] + $363F7706;
temp:= (t1 and (t3 and t4 and t6 xor not t5) xor t3 and t0 xor t4 and t5 xor t6 and t2);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 5] + $1BFEDF72;
temp:= (t0 and (t2 and t3 and t5 xor not t4) xor t2 and t7 xor t3 and t4 xor t5 and t1);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[ 9] + $429B023D;
temp:= (t7 and (t1 and t2 and t4 xor not t3) xor t1 and t6 xor t2 and t3 xor t4 and t0);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[14] + $37D0D724;
temp:= (t6 and (t0 and t1 and t3 xor not t2) xor t0 and t5 xor t1 and t2 xor t3 and t7);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[30] + $D00A1248;
temp:= (t5 and (t7 and t0 and t2 xor not t1) xor t7 and t4 xor t0 and t1 xor t2 and t6);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[18] + $DB0FEAD3;
temp:= (t4 and (t6 and t7 and t1 xor not t0) xor t6 and t3 xor t7 and t0 xor t1 and t5);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 6] + $49F1C09B;
temp:= (t3 and (t5 and t6 and t0 xor not t7) xor t5 and t2 xor t6 and t7 xor t0 and t4);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[28] + $075372C9;
temp:= (t2 and (t4 and t5 and t7 xor not t6) xor t4 and t1 xor t5 and t6 xor t7 and t3);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[24] + $80991B7B;
temp:= (t1 and (t3 and t4 and t6 xor not t5) xor t3 and t0 xor t4 and t5 xor t6 and t2);
t7:= ((temp shr 7) or (temp shl 25)) + ((t7 shr 11) or (t7 shl 21)) + w[ 2] + $25D479D8;
temp:= (t0 and (t2 and t3 and t5 xor not t4) xor t2 and t7 xor t3 and t4 xor t5 and t1);
t6:= ((temp shr 7) or (temp shl 25)) + ((t6 shr 11) or (t6 shl 21)) + w[23] + $F6E8DEF7;
temp:= (t7 and (t1 and t2 and t4 xor not t3) xor t1 and t6 xor t2 and t3 xor t4 and t0);
t5:= ((temp shr 7) or (temp shl 25)) + ((t5 shr 11) or (t5 shl 21)) + w[16] + $E3FE501A;
temp:= (t6 and (t0 and t1 and t3 xor not t2) xor t0 and t5 xor t1 and t2 xor t3 and t7);
t4:= ((temp shr 7) or (temp shl 25)) + ((t4 shr 11) or (t4 shl 21)) + w[22] + $B6794C3B;
temp:= (t5 and (t7 and t0 and t2 xor not t1) xor t7 and t4 xor t0 and t1 xor t2 and t6);
t3:= ((temp shr 7) or (temp shl 25)) + ((t3 shr 11) or (t3 shl 21)) + w[ 4] + $976CE0BD;
temp:= (t4 and (t6 and t7 and t1 xor not t0) xor t6 and t3 xor t7 and t0 xor t1 and t5);
t2:= ((temp shr 7) or (temp shl 25)) + ((t2 shr 11) or (t2 shl 21)) + w[ 1] + $04C006BA;
temp:= (t3 and (t5 and t6 and t0 xor not t7) xor t5 and t2 xor t6 and t7 xor t0 and t4);
t1:= ((temp shr 7) or (temp shl 25)) + ((t1 shr 11) or (t1 shl 21)) + w[25] + $C1A94FB6;
temp:= (t2 and (t4 and t5 and t7 xor not t6) xor t4 and t1 xor t5 and t6 xor t7 and t3);
t0:= ((temp shr 7) or (temp shl 25)) + ((t0 shr 11) or (t0 shl 21)) + w[15] + $409F60C4;

View file

@ -1,5 +0,0 @@
CRC / HASH / HMAC
http://www.wolfgang-ehrhardt.de/crchash_en.html
crc_hash_2016-05-01.zip
Some modifications done for Double Commander (see doublecmd.diff).

View file

@ -1,103 +0,0 @@
Index: kperm_64.inc
===================================================================
--- kperm_64.inc (revision 6895)
+++ kperm_64.inc (working copy)
@@ -33,10 +33,14 @@
{---------------------------------------------------------------------------}
+{$IFDEF FPC}
+ {$MACRO ON} {$DEFINE RotL:= RolQWord}
+{$ELSE}
function RotL(x: u64bit; c: integer): u64bit; {$ifdef HAS_INLINE} inline; {$endif}
begin
RotL := (x shl c) or (x shr (64-c));
end;
+{$ENDIF}
{---------------------------------------------------------------------------}
Index: sha1.pas
===================================================================
--- sha1.pas
+++ sha1.pas
@@ -106,7 +106,7 @@
{$i STD.INC}
-{$ifdef BIT64}
+{$ifndef CPUI386}
{$ifndef PurePascal}
{$define PurePascal}
{$endif}
Index: sha3.pas
===================================================================
--- sha3.pas (revision 6895)
+++ sha3.pas (working copy)
@@ -6,6 +6,15 @@
{$i STD.INC}
+{$ifdef FPC}
+ {$ifdef CPUI386}
+ {$define USE_MMXCODE}
+ {$endif}
+ {$ifdef CPU64}
+ {$define USE_64BITCODE}
+ {$endif}
+{$endif}
+
{.$define USE_64BITCODE} {Use 64-bit for Keccak permutation}
{.$define USE_MMXCODE } {Use MMX for Keccak permutation, contributed by Eric Grange}
{.$define USE_MMX_AKP } {Use MMX for Keccak permutation, contributed by Anna Kaliszewicz / payl}
Index: scrypt.pas
===================================================================
--- scrypt.pas (revision 7740)
+++ scrypt.pas (working copy)
@@ -90,7 +90,7 @@
implementation
uses
- sha256; {Register SHA256 for HMAC-SHA256}
+ SHA3_512; {Register SHA3_512 for HMAC_SHA3_512}
type
TLA16 = array[0..15] of longint;
@@ -361,14 +361,14 @@
{---------------------------------------------------------------------------}
-function pbkfd2_hmac_sha256(pPW: pointer; pLen: word; salt: pointer; sLen,C: longint; var DK; dkLen: longint): integer;
- {-Derive key DK from password pPW using salt and iteration count C using (hmac-)sha256}
+function pbkdf2_hmac_sha3_512(pPW: pointer; pLen: word; salt: pointer; sLen,C: longint; var DK; dkLen: longint): integer;
+ {-Derive key DK from password pPW using salt and iteration count C using hmac_sha3_512}
var
phash: PHashDesc;
begin
- {Note: pbkdf2 will return error indicator phash=nil if _SHA256 is not found!}
- phash := FindHash_by_ID(_SHA256);
- pbkfd2_hmac_sha256 := pbkdf2(phash,pPW,pLen,salt,sLen,C,DK,dkLen);
+ {Note: pbkdf2 will return error indicator phash=nil if _SHA3_512 is not found!}
+ phash := FindHash_by_ID(_SHA3_512);
+ pbkdf2_hmac_sha3_512 := pbkdf2(phash,pPW,pLen,salt,sLen,C,DK,dkLen);
end;
@@ -418,7 +418,7 @@
pV := malloc(sV);
pXY := malloc(sXY);
if (pB<>nil) and (pV<>nil) and (pXY<>nil) then begin
- err := pbkfd2_hmac_sha256(pPW, pLen, salt, sLen, 1, pB^, sB);
+ err := pbkdf2_hmac_sha3_512(pPW, pLen, salt, sLen, 1, pB^, sB);
if err=0 then begin
pw := pB;
for i:=0 to p-1 do begin
@@ -425,7 +425,7 @@
smix(pw, r, N, pV, pXY);
inc(Ptr2Inc(pw), r*128);
end;
- err := pbkfd2_hmac_sha256(pPW, pLen, pB, sB, 1, DK, dKlen);
+ err := pbkdf2_hmac_sha3_512(pPW, pLen, pB, sB, 1, DK, dKlen);
end;
scrypt_kdf := err;
end

View file

@ -1,503 +0,0 @@
{******************************************************************************}
{* DCPcrypt v2.0 written by David Barton (crypto@cityinthesky.co.uk) **********}
{******************************************************************************}
{* A binary compatible implementation of Haval ********************************}
{******************************************************************************}
{* Copyright (c) 1999-2002 David Barton *}
{* Permission is hereby granted, free of charge, to any person obtaining a *}
{* copy of this software and associated documentation files (the "Software"), *}
{* to deal in the Software without restriction, including without limitation *}
{* the rights to use, copy, modify, merge, publish, distribute, sublicense, *}
{* and/or sell copies of the Software, and to permit persons to whom the *}
{* Software is furnished to do so, subject to the following conditions: *}
{* *}
{* The above copyright notice and this permission notice shall be included in *}
{* all copies or substantial portions of the Software. *}
{* *}
{* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *}
{* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *}
{* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *}
{* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *}
{* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *}
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
{* DEALINGS IN THE SOFTWARE. *}
{******************************************************************************}
unit DCPhaval;
{$MODE Delphi}
interface
uses
Classes, Sysutils, DCPcrypt2, DCPconst;
type
TDCP_haval= class(TDCP_hash)
protected
LenHi, LenLo: longword;
Index: DWord;
CurrentHash: array[0..7] of DWord;
HashBuffer: array[0..127] of byte;
procedure Compress;
public
class function GetId: integer; override;
class function GetAlgorithm: string; override;
class function GetHashSize: integer; override;
class function SelfTest: boolean; override;
procedure Init; override;
procedure Burn; override;
procedure Update(const Buffer; Size: longword); override;
procedure Final(var Digest); override;
end;
{ Choose how many passes (previous versions of DCPcrypt uses 5 passes) }
{ ONLY UNCOMMENT ONE! }
//{$DEFINE PASS3}
//{$DEFINE PASS4}
{$DEFINE PASS5}
{ Choose digest length (previous versions of DCPcrypt uses 256bits) }
{ ONLY UNCOMMENT ONE! }
//{$DEFINE DIGEST128}
//{$DEFINE DIGEST160}
//{$DEFINE DIGEST192}
//{$DEFINE DIGEST224}
{$DEFINE DIGEST256}
{******************************************************************************}
{******************************************************************************}
implementation
{$R-}{$Q-}
procedure TDCP_haval.Compress;
var
t7, t6, t5, t4, t3, t2, t1, t0: DWord;
W: array[0..31] of DWord;
Temp: dword;
begin
dcpFillChar(W, SizeOf(W), 0);
t0:= CurrentHash[0];
t1:= CurrentHash[1];
t2:= CurrentHash[2];
t3:= CurrentHash[3];
t4:= CurrentHash[4];
t5:= CurrentHash[5];
t6:= CurrentHash[6];
t7:= CurrentHash[7];
Move(HashBuffer,W,Sizeof(W));
{$IFDEF PASS3}
{$INCLUDE DCPhaval3.inc}
{$ELSE}
{$IFDEF PASS4}
{$INCLUDE DCPhaval4.inc}
{$ELSE}
{$INCLUDE DCPhaval5.inc}
{$ENDIF}
{$ENDIF}
Inc(CurrentHash[0],t0);
Inc(CurrentHash[1],t1);
Inc(CurrentHash[2],t2);
Inc(CurrentHash[3],t3);
Inc(CurrentHash[4],t4);
Inc(CurrentHash[5],t5);
Inc(CurrentHash[6],t6);
Inc(CurrentHash[7],t7);
FillChar(W,Sizeof(W),0);
Index:= 0;
FillChar(HashBuffer,Sizeof(HashBuffer),0);
end;
class function TDCP_haval.GetHashSize: integer;
begin
{$IFDEF DIGEST128}
Result:= 128;
{$ELSE}
{$IFDEF DIGEST160}
Result:= 160;
{$ELSE}
{$IFDEF DIGEST192}
Result:= 192;
{$ELSE}
{$IFDEF DIGEST224}
Result:= 224;
{$ELSE}
Result:= 256;
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
end;
class function TDCP_haval.GetId: integer;
begin
Result:= DCP_haval;
end;
class function TDCP_haval.GetAlgorithm: string;
begin
Result:= 'Haval (';
{$IFDEF DIGEST128}
Result:= Result+'128bit, ';
{$ELSE}
{$IFDEF DIGEST160}
Result:= Result+'160bit, ';
{$ELSE}
{$IFDEF DIGEST192}
Result:= Result+'192bit, ';
{$ELSE}
{$IFDEF DIGEST224}
Result:= Result+'224bit, ';
{$ELSE}
Result:= Result+'256bit, ';
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$IFDEF PASS3}
Result:= Result+'3 passes)';
{$ELSE}
{$IFDEF PASS4}
Result:= Result+'4 passes)';
{$ELSE}
Result:= Result+'5 passes)';
{$ENDIF}
{$ENDIF}
end;
class function TDCP_haval.SelfTest: boolean;
{$IFDEF PASS3}
{$IFDEF DIGEST128}
const
Test1Out: array[0..15] of byte=
($1B,$DC,$55,$6B,$29,$AD,$02,$EC,$09,$AF,$8C,$66,$47,$7F,$2A,$87);
var
TestHash: TDCP_haval;
TestOut: array[0..15] of byte;
begin
TestHash:= TDCP_haval.Create(nil);
TestHash.Init;
TestHash.UpdateStr('');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test1Out,Sizeof(Test1Out));
TestHash.Free;
{$ELSE}
{$IFDEF DIGEST160}
const
Test1Out: array[0..19] of byte=
($5E,$16,$10,$FC,$ED,$1D,$3A,$DB,$0B,$B1,
$8E,$92,$AC,$2B,$11,$F0,$BD,$99,$D8,$ED);
var
TestHash: TDCP_haval;
TestOut: array[0..19] of byte;
begin
TestHash:= TDCP_haval.Create(nil);
TestHash.Init;
TestHash.UpdateStr('a');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test1Out,Sizeof(Test1Out));
TestHash.Free;
{$ELSE}
begin
Result:= true;
{$ENDIF}
{$ENDIF}
{$ELSE}
{$IFDEF PASS4}
{$IFDEF DIGEST192}
const
Test1Out: array[0..23] of byte=
($74,$AA,$31,$18,$2F,$F0,$9B,$CC,$E4,$53,$A7,$F7,
$1B,$5A,$7C,$5E,$80,$87,$2F,$A9,$0C,$D9,$3A,$E4);
var
TestHash: TDCP_haval;
TestOut: array[0..23] of byte;
begin
TestHash:= TDCP_haval.Create(nil);
TestHash.Init;
TestHash.UpdateStr('HAVAL');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test1Out,Sizeof(Test1Out));
TestHash.Free;
{$ELSE}
{$IFDEF DIGEST224}
const
Test1Out: array[0..27] of byte=
($14,$4C,$B2,$DE,$11,$F0,$5D,$F7,$C3,$56,$28,$2A,$3B,$48,
$57,$96,$DA,$65,$3F,$6B,$70,$28,$68,$C7,$DC,$F4,$AE,$76);
var
TestHash: TDCP_haval;
TestOut: array[0..27] of byte;
begin
TestHash:= TDCP_haval.Create(nil);
TestHash.Init;
TestHash.UpdateStr('0123456789');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test1Out,Sizeof(Test1Out));
TestHash.Free;
{$ELSE}
begin
Result:= true;
{$ENDIF}
{$ENDIF}
{$ELSE}
{$IFDEF DIGEST256}
const
Test1Out: array[0..31] of byte=
($1A,$1D,$C8,$09,$9B,$DA,$A7,$F3,$5B,$4D,$A4,$E8,$05,$F1,$A2,$8F,
$EE,$90,$9D,$8D,$EE,$92,$01,$98,$18,$5C,$BC,$AE,$D8,$A1,$0A,$8D);
Test2Out: array[0..31] of byte=
($C5,$64,$7F,$C6,$C1,$87,$7F,$FF,$96,$74,$2F,$27,$E9,$26,$6B,$68,
$74,$89,$4F,$41,$A0,$8F,$59,$13,$03,$3D,$9D,$53,$2A,$ED,$DB,$39);
var
TestHash: TDCP_haval;
TestOut: array[0..31] of byte;
begin
dcpFillChar(TestOut, SizeOf(TestOut), 0);
TestHash:= TDCP_haval.Create(nil);
TestHash.Init;
TestHash.UpdateStr('abcdefghijklmnopqrstuvwxyz');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test1Out,Sizeof(Test1Out));
TestHash.Init;
TestHash.UpdateStr('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test2Out,Sizeof(Test2Out)) and Result;
TestHash.Free;
{$ELSE}
begin
Result:= true;
{$ENDIF}
{$ENDIF}
{$ENDIF}
end;
procedure TDCP_haval.Init;
begin
Burn;
CurrentHash[0]:= $243F6A88;
CurrentHash[1]:= $85A308D3;
CurrentHash[2]:= $13198A2E;
CurrentHash[3]:= $03707344;
CurrentHash[4]:= $A4093822;
CurrentHash[5]:= $299F31D0;
CurrentHash[6]:= $082EFA98;
CurrentHash[7]:= $EC4E6C89;
fInitialized:= true;
end;
procedure TDCP_haval.Burn;
begin
LenHi:= 0; LenLo:= 0;
Index:= 0;
FillChar(HashBuffer,Sizeof(HashBuffer),0);
FillChar(CurrentHash,Sizeof(CurrentHash),0);
fInitialized:= false;
end;
procedure TDCP_haval.Update(const Buffer; Size: longword);
var
PBuf: ^byte;
begin
if not fInitialized then
raise EDCP_hash.Create('Hash not initialized');
Inc(LenHi,Size shr 29);
Inc(LenLo,Size*8);
if LenLo< (Size*8) then
Inc(LenHi);
PBuf:= @Buffer;
while Size> 0 do
begin
if (Sizeof(HashBuffer)-Index)<= DWord(Size) then
begin
Move(PBuf^,HashBuffer[Index],Sizeof(HashBuffer)-Index);
Dec(Size,Sizeof(HashBuffer)-Index);
Inc(PBuf,Sizeof(HashBuffer)-Index);
Compress;
end
else
begin
Move(PBuf^,HashBuffer[Index],Size);
Inc(Index,Size);
Size:= 0;
end;
end;
end;
procedure TDCP_haval.Final(var Digest);
{$IFNDEF DIGEST256}
{$IFNDEF DIGEST224}
var
temp: dword;
{$ENDIF}
{$ENDIF}
begin
if not fInitialized then
raise EDCP_hash.Create('Hash not initialized');
HashBuffer[Index]:= $80;
if Index>= 118 then
Compress;
{$IFDEF PASS3}
{$IFDEF DIGEST128}
HashBuffer[118]:= ((128 and 3) shl 6) or (3 shl 3) or 1;
HashBuffer[119]:= (128 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST160}
HashBuffer[118]:= ((160 and 3) shl 6) or (3 shl 3) or 1;
HashBuffer[119]:= (160 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST192}
HashBuffer[118]:= ((192 and 3) shl 6) or (3 shl 3) or 1;
HashBuffer[119]:= (192 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST224}
HashBuffer[118]:= ((224 and 3) shl 6) or (3 shl 3) or 1;
HashBuffer[119]:= (224 shr 2) and $FF;
{$ELSE}
HashBuffer[118]:= ((256 and 3) shl 6) or (3 shl 3) or 1;
HashBuffer[119]:= (256 shr 2) and $FF;
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ELSE}
{$IFDEF PASS4}
{$IFDEF DIGEST128}
HashBuffer[118]:= ((128 and 3) shl 6) or (4 shl 3) or 1;
HashBuffer[119]:= (128 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST160}
HashBuffer[118]:= ((160 and 3) shl 6) or (4 shl 3) or 1;
HashBuffer[119]:= (160 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST192}
HashBuffer[118]:= ((192 and 3) shl 6) or (4 shl 3) or 1;
HashBuffer[119]:= (192 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST224}
HashBuffer[118]:= ((224 and 3) shl 6) or (4 shl 3) or 1;
HashBuffer[119]:= (224 shr 2) and $FF;
{$ELSE}
HashBuffer[118]:= ((256 and 3) shl 6) or (4 shl 3) or 1;
HashBuffer[119]:= (256 shr 2) and $FF;
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ELSE}
{$IFDEF DIGEST128}
HashBuffer[118]:= ((128 and 3) shl 6) or (5 shl 3) or 1;
HashBuffer[119]:= (2128 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST160}
HashBuffer[118]:= ((160 and 3) shl 6) or (5 shl 3) or 1;
HashBuffer[119]:= (160 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST192}
HashBuffer[118]:= ((192 and 3) shl 6) or (5 shl 3) or 1;
HashBuffer[119]:= (192 shr 2) and $FF;
{$ELSE}
{$IFDEF DIGEST224}
HashBuffer[118]:= ((224 and 3) shl 6) or (5 shl 3) or 1;
HashBuffer[119]:= (224 shr 2) and $FF;
{$ELSE}
HashBuffer[118]:= ((256 and 3) shl 6) or (5 shl 3) or 1;
HashBuffer[119]:= (256 shr 2) and $FF;
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
PDWord(@HashBuffer[120])^:= LenLo;
PDWord(@HashBuffer[124])^:= LenHi;
Compress;
{$IFDEF DIGEST128}
temp:= (CurrentHash[7] and $000000FF) or
(CurrentHash[6] and $FF000000) or
(CurrentHash[5] and $00FF0000) or
(CurrentHash[4] and $0000FF00);
Inc(CurrentHash[0],(temp shr 8) or (temp shl 24));
temp:= (CurrentHash[7] and $0000FF00) or
(CurrentHash[6] and $000000FF) or
(CurrentHash[5] and $FF000000) or
(CurrentHash[4] and $00FF0000);
Inc(CurrentHash[1],(temp shr 16) or (temp shl 16));
temp:= (CurrentHash[7] and $00FF0000) or
(CurrentHash[6] and $0000FF00) or
(CurrentHash[5] and $000000FF) or
(CurrentHash[4] and $FF000000);
Inc(CurrentHash[2],(temp shr 24) or (temp shl 8));
temp:= (CurrentHash[7] and $FF000000) or
(CurrentHash[6] and $00FF0000) or
(CurrentHash[5] and $0000FF00) or
(CurrentHash[4] and $000000FF);
Inc(CurrentHash[3],temp);
Move(CurrentHash,Digest,128 div 8);
{$ELSE}
{$IFDEF DIGEST160}
temp:= (CurrentHash[7] and $3F) or
(CurrentHash[6] and ($7F shl 25)) or
(CurrentHash[5] and ($3F shl 19));
Inc(CurrentHash[0],(temp shr 19) or (temp shl 13));
temp:= (CurrentHash[7] and ($3F shl 6)) or
(CurrentHash[6] and $3F) or
(CurrentHash[5] and ($7F shl 25));
Inc(CurrentHash[1],(temp shr 25) or (temp shl 7));
temp:= (CurrentHash[7] and ($7F shl 12)) or
(CurrentHash[6] and ($3F shl 6)) or
(CurrentHash[5] and $3F);
Inc(CurrentHash[2],temp);
temp:= (CurrentHash[7] and ($3F shl 19)) or
(CurrentHash[6] and ($7F shl 12)) or
(CurrentHash[5] and ($3F shl 6));
Inc(CurrentHash[3],temp shr 6);
temp:= (CurrentHash[7] and ($7F shl 25)) or
(CurrentHash[6] and ($3F shl 19)) or
(CurrentHash[5] and ($7F shl 12));
Inc(CurrentHash[4],temp shr 12);
Move(CurrentHash,Digest,160 div 8);
{$ELSE}
{$IFDEF DIGEST192}
temp:= (CurrentHash[7] and $1F) or
(CurrentHash[6] and ($3F shl 26));
Inc(CurrentHash[0],(temp shr 26) or (temp shl 6));
temp:= (CurrentHash[7] and ($1F shl 5)) or
(CurrentHash[6] and $1F);
Inc(CurrentHash[1],temp);
temp:= (CurrentHash[7] and ($3F shl 10)) or
(CurrentHash[6] and ($1F shl 5));
Inc(CurrentHash[2],temp shr 5);
temp:= (CurrentHash[7] and ($1F shl 16)) or
(CurrentHash[6] and ($3F shl 10));
Inc(CurrentHash[3],temp shr 10);
temp:= (CurrentHash[7] and ($1F shl 21)) or
(CurrentHash[6] and ($1F shl 16));
Inc(CurrentHash[4],temp shr 16);
temp:= (CurrentHash[7] and ($3F shl 26)) or
(CurrentHash[6] and ($1F shl 21));
Inc(CurrentHash[5],temp shr 21);
Move(CurrentHash,Digest,192 div 8);
{$ELSE}
{$IFDEF DIGEST224}
Inc(CurrentHash[0],(CurrentHash[7] shr 27) and $1F);
Inc(CurrentHash[1],(CurrentHash[7] shr 22) and $1F);
Inc(CurrentHash[2],(CurrentHash[7] shr 18) and $F);
Inc(CurrentHash[3],(CurrentHash[7] shr 13) and $1F);
Inc(CurrentHash[4],(CurrentHash[7] shr 9) and $F);
Inc(CurrentHash[5],(CurrentHash[7] shr 4) and $1F);
Inc(CurrentHash[6],CurrentHash[7] and $F);
Move(CurrentHash,Digest,224 div 8);
{$ELSE}
Move(CurrentHash,Digest,256 div 8);
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
Burn;
end;
end.

View file

@ -1,130 +0,0 @@
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
= DCPcrypt Cryptographic Component Library v2 Beta 3 =
= Copyright (c) 1999-2003 David Barton =
= http://www.cityinthesky.co.uk/ =
= crypto@cityinthesky.co.uk =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Introduction:
DCPcrypt is a collection of cryptographic components for the Borland
Delphi(tm), C++ Builder(tm) and Kylix(tm) programming languages. The
supported versions are Delphi 4, 5, 6, 7, 2005, C++ Builder (3?), 4,
5, (6?) and Kylix 1 (untested), 2 and 3 (untested).
Thanks to Manuel C. for the modifications to make DCPcrypt work under
Delphi 2005!
The idea behind DCPcrypt is that it should be possible to "drop in"
any algorithm implementation to replace another with minimum or no
code changes. To aid in this goal all cryptographic components are
descended from one of several base classes, TDCP_cipher for encryption
algorithms and TDCP_hash for message digest algorithms.
DCPcrypt is open source software (released under the MIT license) and
as such there is no charge for inclusion in other software. However, I
am currently a student and if you are making money from my software I
would really appreciate a donation of some sort, whether financial or
a license for the software you develop (or if anyone wants to sponsor
a Mathematical Modelling (Masters) student for their final year...).
Please note THIS IS NOT COMPULSORY IN ANY WAY. See
http://www.cityinthesky.co.uk/cryptography.html for details on
financial donations.
This software is OSI Certified Open Source Software.
OSI Certified is a certification mark of the Open Source Initiative.
If you maintain a website then a link to my page at
http://www.cityinthesky.co.uk/ would be great!
What's New:
Changes since DCPcrypt v2 Beta 2 include
* Corrected C++ Builder compilation problem.
Changes since DCPcrypt v2 Beta 1 include
* Renamed source code files for hashes and ciphers to DCPxxx.pas
* Change the format of Cipher.InitStr so that the hash algorithm
used to generate the key is explicitly specified. In order to
get the same functionality as before, use TDCP_sha1.
e.g. Cipher.InitStr('Hello World',TDCP_sha1);
* Block ciphers are now inherited from an intermediate component
that implements the block size specific chaining mode encryption
routines.
* Remove the internal component registration, it was more hassle
than it was worth. If there is a demand for this to be put back
then I might...
* Added the full range of operation modes for Haval. By changing
the defines at the top of DCPhaval.pas you can specify the
number of passes and the output hash size.
* Added the Tiger hash algorithm (192bit digest).
* Changed the name of the file containing TDCP_ripemd160 for
consistency to DCPripemd160 from DCPrmd160.
* GOST no longer appears on the component palette pending verifying
what the actual standard is (the code is still included however).
* Added the RipeMD-128 hash algorithm (128bit digest).
* Added the Serpent block cipher (AES finalist).
* Added the SHA-256,384,512 hash algorithms (256, 384, 512bit digest
respectively).
* Added CTR chaining mode to all block ciphers.
Installation:
Delphi: Open the appropriate package, DCPdelphiX.dpk where X is
your version of Delphi (either 4, 5 or 6). Then press the
install button.
C++ Builder: Create a new design time package and add all the .pas
files from the DCPcrypt2.zip archive including all those
in the Ciphers and Hashes subdirectories. Then press the
install button.
Kylix: Open the DCPkylix.dpk package and then press the install
button (note: Kylix 1 users may need to create a new
package as with C++ Builder as this is a Kylix 2 package).
You may need to add the directory containing DCPcrypt (and the Ciphers
and Hashes subdirectories) to your library search path (found under
Environment Options).
Once installed you will find two extra pages of components on your
component palette, namely DCPciphers and DCPhashes. You can now place
these components onto the form of your application to start using the
algorithms.
Usage:
See the main html documentation in the Docs subdirectory.
Contact:
I appreciate knowing what DCPcrypt is being used for and also if you
have any queries or bug reports please email me at crypto@cityinthesky.co.uk.
DCPcrypt is copyrighted (c) 1999-2003 David Barton.
All trademarks are property of their respective owners.

View file

@ -1,18 +0,0 @@
{ This file was automatically created by Lazarus. do not edit!
This source is only used to compile and install the package.
}
unit dcp;
interface
uses
DCPbase64, DCPblockciphers, DCPconst, DCPcrypt2, DCPblowfish, DCPcast128,
DCPcast256, DCPdes, DCPgost, DCPice, DCPidea, DCPmars, DCPmisty1, DCPrc2,
DCPrc4, DCPrc5, DCPrc6, DCPrijndael, DCPserpent, DCPtea, DCPtwofish,
DCPhaval, DCPmd4, DCPmd5, DCPripemd128, DCPripemd160, DCPsha1, DCPsha256,
DCPsha512, DCPtiger;
implementation
end.

View file

@ -35,12 +35,13 @@ type
TWinFileTime = QWord; // NTFS time (UTC) (2 x DWORD)
TDosFileTime = LongInt; // MS-DOS time (local)
TUnixFileTime = Int64; // UNIX time (UTC)
{$IFDEF MSWINDOWS}
TFileTime = TWinFileTime;
TFileTimeEx = TFileTime;
{$ELSE}
TFileTime = Int64;
TFileTime = TUnixFileTime;
TFileTimeEx = record
public
@ -52,8 +53,6 @@ type
end;
{$ENDIF}
TUnixFileTime = TFileTime;
PFileTime = ^TFileTime;
PWinFileTime = ^TWinFileTime;
@ -63,10 +62,17 @@ const
implementation
{$IF not DEFINED(MSWINDOWS)}
constructor TFileTimeEx.create( aSec:int64; aNanosec:int64 );
constructor TFileTimeEx.Create(aSec: Int64; aNanosec: Int64);
begin
self.sec:= aSec;
self.nanosec:= aNanosec;
Self.sec:= aSec;
Self.nanosec:= aNanosec;
if Self.nanosec < 0 then
Self.nanosec := 0
else if Self.nanosec > 999999999 then
begin
Self.nanosec := 999999999;
end;
end;
class operator TFileTimeEx.=(l,r : TFileTimeEx): Boolean;

View file

@ -0,0 +1,30 @@
unit DCClasses;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, NullStream;
type
{ TNullStreamEx }
TNullStreamEx = class(TNullStream)
public
function Write(const Buffer; Count: LongInt): LongInt; override;
end;
implementation
{ TNullStreamEx }
function TNullStreamEx.Write(const Buffer; Count: LongInt): LongInt;
begin
Result:= Count;
inherited Write(Buffer, Count);
end;
end.

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
This module contains classes with UTF8 file names support.
Copyright (C) 2008-2022 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2008-2024 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -28,7 +28,7 @@ unit DCClassesUtf8;
interface
uses
Classes, RtlConsts, SysUtils, IniFiles;
Classes, RtlConsts, SysUtils, IniFiles, Math;
type
{ TFileStreamEx class }
@ -42,7 +42,7 @@ type
protected
FFileName: String;
procedure Sync(AWritten: Int64);
procedure SetSize64(const NewSize: Int64); override;
procedure SetCapacity(const NewCapacity: Int64);
public
constructor Create(const AFileName: String; Mode: LongWord); virtual; overload;
destructor Destroy; override;
@ -51,8 +51,9 @@ type
function Write(const Buffer; Count: LongInt): LongInt; override;
property DirtyLimit: Int64 read FDirtyLimit write FDirtyLimit;
property AutoSync: Boolean read FAutoSync write SetAutoSync;
property Capacity: Int64 write SetCapacity;
property FileName: String read FFileName;
end;
end;
{ TStringListEx }
@ -63,7 +64,7 @@ type
function IndexOfValue(const Value: String): Integer;
procedure LoadFromFile(const FileName: String); override;
procedure SaveToFile(const FileName: String); override;
end;
end;
{ TIniFileEx }
@ -71,8 +72,8 @@ type
private
FReadOnly: Boolean;
public
constructor Create(const AFileName: String; Mode: Word); virtual;
constructor Create(const AFileName: String; AEscapeLineFeeds : Boolean = False); override;
constructor Create(const AFileName: String; Mode: Word; AOptions: TIniFileOptions = []); virtual;
constructor Create(const AFileName: String; AOptions: TIniFileOptions = []); override;
procedure UpdateFile; override;
public
property ReadOnly: Boolean read FReadOnly;
@ -81,7 +82,7 @@ type
implementation
uses
DCOSUtils, LazUTF8;
DCOSUtils, DCConvertEncoding;
{ TFileStreamEx }
@ -156,9 +157,9 @@ begin
end;
end;
procedure TFileStreamEx.SetSize64(const NewSize: Int64);
procedure TFileStreamEx.SetCapacity(const NewCapacity: Int64);
begin
FileAllocate(Handle, NewSize);
FileAllocate(Handle, NewCapacity);
end;
constructor TFileStreamEx.Create(const AFileName: String; Mode: LongWord);
@ -169,15 +170,15 @@ begin
begin
AHandle:= mbFileCreate(AFileName, Mode);
if AHandle = feInvalidHandle then
raise EFCreateError.CreateFmt(SFCreateError, [AFileName])
raise EFCreateError.CreateFmt(SFCreateError + LineEnding + mbSysErrorMessage, [AFileName])
else
inherited Create(AHandle);
end
else
begin
begin
AHandle:= mbFileOpen(AFileName, Mode);
if AHandle = feInvalidHandle then
raise EFOpenError.CreateFmt(SFOpenError, [AFilename])
raise EFOpenError.CreateFmt(SFOpenError + LineEnding + mbSysErrorMessage , [AFilename])
else
inherited Create(AHandle);
end;
@ -212,11 +213,26 @@ end;
{ TStringListEx }
function TStringListEx.DoCompareText(const S1, S2: String): PtrInt;
var
U1, U2: UnicodeString;
begin
U1:= CeUtf8ToUtf16(S1);
U2:= CeUtf8ToUtf16(S2);
if CaseSensitive then
Result:= UTF8CompareStr(S1, S2)
begin
Result:= UnicodeCompareStr(U1, U2);
if Result = 0 then
begin
Result := CompareMemRange(Pointer(U1), Pointer(U2), Min(Length(U1), Length(U2)) * SizeOf(WideChar));
if Result = 0 then
Result := Length(U1) - Length(U2);
end
end
else
Result:= UTF8CompareText(S1, S2);
begin
Result:= UnicodeCompareText(U1, U2);
end;
end;
function TStringListEx.IndexOfValue(const Value: String): Integer;
@ -270,13 +286,14 @@ end;
{ TIniFileEx }
constructor TIniFileEx.Create(const AFileName: String; Mode: Word);
constructor TIniFileEx.Create(const AFileName: String; Mode: Word;
AOptions: TIniFileOptions);
var
slLines : TStringListEx;
begin
FReadOnly := ((Mode and $03) = fmOpenRead);
inherited Create(EmptyStr);
inherited Create(EmptyStr, AOptions);
if ((Mode and $03) <> fmOpenWrite) then
begin
@ -294,7 +311,7 @@ begin
Rename(AFileName, False);
end;
constructor TIniFileEx.Create(const AFileName: String; AEscapeLineFeeds: Boolean);
constructor TIniFileEx.Create(const AFileName: String; AOptions: TIniFileOptions);
var
Mode: Word;
begin
@ -305,7 +322,7 @@ begin
else begin
Mode := fmOpenRead or fmShareDenyNone;
end;
Create(AFileName, Mode);
Create(AFileName, Mode, AOptions);
end;
procedure TIniFileEx.UpdateFile;

View file

@ -61,18 +61,21 @@ function CeTryDecode(const aValue: AnsiString; aCodePage: Cardinal;
{$ELSEIF DEFINED(UNIX)}
var
SystemEncodingUtf8: Boolean = False;
SystemLanguage, SystemEncoding, SystemLocale: String;
SystemEncoding, SystemLocale: String;
{$ENDIF}
var
SystemLanguage: String;
implementation
uses
{$IF DEFINED(UNIX)}
iconvenc_dyn, LazUTF8
LazUTF8
{$IF DEFINED(DARWIN)}
, MacOSAll, CocoaAll
, dc_iconvenc_dyn, MacOSAll, CocoaAll, StrUtils
{$ELSE}
, UnixCP
, iconvenc_dyn, UnixCP
{$ENDIF}
{$ELSEIF DEFINED(MSWINDOWS)}
Windows
@ -324,6 +327,8 @@ begin
end;
procedure Initialize;
var
Buffer: array[1..4] of AnsiChar;
begin
CeOemToSys:= @OEM2Ansi;
CeSysToOem:= @Ansi2OEM;
@ -335,6 +340,9 @@ begin
CeUtf8ToAnsi:= @UTF82Sys;
CeSysToUtf8:= @Sys2UTF8;
CeUtf8ToSys:= @UTF82Sys;
if GetLocaleInfo(GetUserDefaultLCID, LOCALE_SABBREVLANGNAME, @Buffer[1], 4) > 0 then
SystemLanguage := LowerCase(Copy(Buffer, 1, 2));
end;
{$ELSEIF DEFINED(UNIX)}
@ -379,6 +387,7 @@ begin
begin
// Crop to terminating zero
SystemLanguage:= PAnsiChar(SystemLanguage);
SystemLanguage:= Copy2Symb(SystemLanguage, '-');
// Get system country
CurrentLocale:= NSLocale.currentLocale();
Country:= NSString(CurrentLocale.objectForKey(NSLocaleCountryCode)).UTF8String;
@ -398,7 +407,7 @@ begin
Lang:= SysUtils.GetEnvironmentVariable('LC_ALL');
if Length(Lang) = 0 then
begin
Lang:= SysUtils.GetEnvironmentVariable('LC_MESSAGES');
Lang:= SysUtils.GetEnvironmentVariable('LC_CTYPE');
if Length(Lang) = 0 then
begin
Lang:= SysUtils.GetEnvironmentVariable('LANG');

View file

@ -1,18 +1,118 @@
unit DCDarwin;
{$mode delphi}
{$packrecords c}
{$pointermath on}
{$modeswitch objectivec1}
interface
uses
Classes, SysUtils, DCBasicTypes, CocoaAll;
Classes, SysUtils, DCBasicTypes, CocoaAll, BaseUnix;
const
CLOSE_RANGE_CLOEXEC = (1 << 2);
function CloseRange(first: cuint; last: cuint; flags: cint): cint; cdecl;
function mbFileCopyXattr(const Source, Target: String): Boolean;
// MacOS File Utils
function MacosFileSetCreationTime( const path:String; const birthtime:TFileTimeEx ): Boolean;
type
{ TDarwinFileUtil }
TDarwinFileUtil = class
class function cloneFile( const fromPath: String; const toPath: String; const size: Int64 ): Boolean;
end;
implementation
uses
DCUnix;
type
proc_fdinfo = record
proc_fd: Int32;
proc_fdtype: UInt32;
end;
Pproc_fdinfo = ^proc_fdinfo;
const
PROC_PIDLISTFDS = 1;
PROC_PIDLISTFD_SIZE = SizeOf(proc_fdinfo);
const
NSAppKitVersionNumber10_13 = 1561;
const
COPYFILE_ACL = 1 shl 0;
COPYFILE_STAT = 1 shl 1;
COPYFILE_XATTR = 1 shl 2;
COPYFILE_DATA = 1 shl 3;
COPYFILE_SECURITY = COPYFILE_STAT or COPYFILE_ACL;
COPYFILE_METADATA = COPYFILE_SECURITY or COPYFILE_XATTR;
COPYFILE_ALL = COPYFILE_METADATA or COPYFILE_DATA;
COPYFILE_UNLINK = 1 shl 21;
COPYFILE_CLONE = 1 shl 24;
COPYFILE_CLONE_FORCE = 1 shl 25;
type
copyfile_state_t_o = record
end;
copyfile_state_t = ^copyfile_state_t_o;
copyfile_flags_t = UInt32;
function copyfile( const fromPath: pchar; const toPath: pchar; state: copyfile_state_t; flags: copyfile_flags_t ): Integer;
cdecl; external name 'copyfile';
function proc_pidinfo(pid: cint; flavor: cint; arg: cuint64; buffer: pointer; buffersize: cint): cint; cdecl; external 'proc';
function CloseRange(first: cuint; last: cuint; flags: cint): cint; cdecl;
var
I: cint;
Handle: cint;
ProcessId: TPid;
bufferSize: cint;
pidInfo: Pproc_fdinfo;
begin
Result:= -1;
ProcessId:= FpGetpid;
bufferSize:= proc_pidinfo(ProcessId, PROC_PIDLISTFDS, 0, nil, 0);
pidInfo:= GetMem(bufferSize);
if Assigned(pidInfo) then
begin
bufferSize:= proc_pidinfo(ProcessId, PROC_PIDLISTFDS, 0, pidInfo, bufferSize);
for I:= 0 to (bufferSize div PROC_PIDLISTFD_SIZE) - 1 do
begin
Handle:= pidInfo[I].proc_fd;
if (Handle >= first) and (Handle <= last) then
begin
if (flags and CLOSE_RANGE_CLOEXEC <> 0) then
FileCloseOnExec(Handle)
else begin
FileClose(Handle);
end;
end;
end;
Result:= 0;
FreeMem(pidInfo);
end;
end;
function mbFileCopyXattr(const Source, Target: String): Boolean;
var
ret: Integer;
begin
Writeln( '>>3> mbFileCopyXattr' );
ret:= copyfile( pchar(Source), pchar(Target), nil, COPYFILE_XATTR );
fpseterrno( ret );
Result:= (ret=0);
end;
function StringToNSString(const S: String): NSString;
begin
Result:= NSString(NSString.stringWithUTF8String(PAnsiChar(S)));
@ -33,5 +133,39 @@ begin
Result:= NSFileManager.defaultManager.setAttributes_ofItemAtPath_error( attrs, nsPath, nil );
end;
{ TDarwinFileUtil }
// the copyfile() api has two advantages:
// 1. dramatically improve file copy speed on APFS
// 2. supports copying macOS specific attributes
// therefore, we should try copyfile() as much as possible on macOS
class function TDarwinFileUtil.cloneFile( const fromPath: String; const toPath: String; const size: Int64 ): Boolean;
const
NO_CALLBACK_MAXSIZE = 20*1024*1024; // 20MB
var
flags: copyfile_flags_t;
ret: Integer;
begin
Result:= False;
flags:= COPYFILE_ALL;
// call copyfile() when:
// 1. macOS < 10.13 and filesize <= MAX_SIZE (copy only)
// 2. macOS >= 10.13 and filesize > MAX_SIZE (clone only, fail fast)
// 3. macOS >= 10.13 and filesize <= MAX_SIZE (try clone, then copy)
if NSAppKitVersionNumber < NSAppKitVersionNumber10_13 then begin
if size > NO_CALLBACK_MAXSIZE then
Exit;
end else begin
if size > NO_CALLBACK_MAXSIZE then
flags:= flags or COPYFILE_CLONE_FORCE or COPYFILE_UNLINK
else
flags:= flags or COPYFILE_CLONE;
end;
ret:= copyfile( pchar(fromPath), pchar(toPath), nil, flags );
Result:= (ret=0);
end;
end.

View file

@ -4,7 +4,7 @@
Date and time functions.
Copyright (C) 2009-2012 Przemysław Nagay (cobines@gmail.com)
Copyright (C) 2017-2022 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2017-2025 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -22,7 +22,8 @@
unit DCDateTimeUtils;
{$mode objfpc}{$H+}
{$mode objfpc}
{$H+}{$R-}{$Q-}
interface
@ -35,11 +36,18 @@ uses
{$ENDIF}
;
const
DATE_TIME_NULL = TDateTime(2958466.0);
function FileTimeToDateTime(FileTime : DCBasicTypes.TFileTime) : TDateTime;
function FileTimeToDateTimeEx(FileTime : DCBasicTypes.TFileTimeEx) : TDateTime;
function DateTimeToFileTime(DateTime : TDateTime) : DCBasicTypes.TFileTime;
function DateTimeToFileTimeEx(DateTime : TDateTime) : DCBasicTypes.TFileTimeEx;
function FileTimeToWinFileTime(FileTime : DCBasicTypes.TFileTime) : TWinFileTime;
function FileTimeExToWinFileTime(FileTime : DCBasicTypes.TFileTimeEx) : TWinFileTime;
function WinFileTimeToFileTimeEx(FileTime: TWinFileTime) : DCBasicTypes.TFileTimeEx;
{en
Converts system specific UTC time to local time.
}
@ -97,10 +105,17 @@ function UnixFileTimeToDateTimeEx(UnixTime: DCBasicTypes.TFileTimeEx) : TDateTim
{$ENDIF}
function DateTimeToUnixFileTime(DateTime: TDateTime) : TUnixFileTime;
function DateTimeToUnixFileTimeEx(DateTime: TDateTime) : DCBasicTypes.TFileTimeEx;
function UnixFileTimeToFileTime(UnixTime: TUnixFileTime): DCBasicTypes.TFileTime;
function UnixFileTimeToDosTime(UnixTime: TUnixFileTime): TDosFileTime;
function DosTimeToUnixFileTime(DosTime: TDosFileTime): TUnixFileTime;
function UnixFileTimeToWinTime(UnixTime: TUnixFileTime): TWinFileTime;
function WinFileTimeToUnixTime(WinTime: TWinFileTime) : TUnixFileTime;
function WinFileTimeToDosTime(FileTime: TWinFileTime): TDosFileTime;
function DosTimeToWinFileTime(FileTime: TDosFileTime): TWinFileTime;
function WcxFileTimeToFileTime(WcxTime: LongInt): DCBasicTypes.TFileTime; inline;
function FileTimeToWcxFileTime(FileTime: DCBasicTypes.TFileTime): LongInt; inline;
function WcxFileTimeToDateTime(WcxTime: LongInt): TDateTime;
@ -140,6 +155,8 @@ uses
const
UnixWinEpoch = TWinFileTime($019DB1DED53E8000); // Unix epoch start
MinWinUnixSec = (0 - TUnixFileTime(UnixWinEpoch div 10000000 - 1));
MaxWinUnixSec = TUnixFileTime(High(TWinFileTime) div 10000000 - 1);
const { Short names of months. }
ShortMonthNames: TMonthNameArray = ('Jan','Feb','Mar','Apr','May','Jun',
@ -276,6 +293,58 @@ begin
end;
{$ENDIF}
function FileTimeToWinFileTime(FileTime: DCBasicTypes.TFileTime): TWinFileTime; inline;
{$IF DEFINED(MSWINDOWS)}
begin
Result:= TWinFileTime(FileTime)
end;
{$ELSEIF DEFINED(UNIX)}
begin
Result:= UnixFileTimeToWinTime(TUnixFileTime(FileTime));
end;
{$ENDIF}
function FileTimeExToWinFileTime(FileTime: DCBasicTypes.TFileTimeEx): TWinFileTime;
{$IF DEFINED(MSWINDOWS)}
begin
Result:= TWinFileTime(FileTime)
end;
{$ELSEIF DEFINED(UNIX)}
begin
if (FileTime.Sec > MaxWinUnixSec) then
Result:= High(TWinFileTime)
else if (FileTime.Sec < MinWinUnixSec) then
Result:= Low(TWinFileTime)
else begin
Result:= UnixWinEpoch + FileTime.sec * 10000000 + FileTime.nanosec div 100;
end;
end;
{$ENDIF}
function WinFileTimeToFileTimeEx(FileTime: TWinFileTime): DCBasicTypes.TFileTimeEx;
{$IF DEFINED(MSWINDOWS)}
begin
Result := TFileTimeEx(FileTime);
end;
{$ELSEIF DEFINED(UNIX)}
begin
if (FileTime >= UnixWinEpoch) then
begin
Result.Sec:= Int64((FileTime - UnixWinEpoch) div 10000000);
Result.NanoSec:= Int64((FileTime - UnixWinEpoch) mod 10000000) * 100;
end
else begin
Result.Sec:= (Int64(FileTime) - Int64(UnixWinEpoch)) div 10000000;
if (Result.Sec = 0) then
Result.NanoSec:= 0
else begin
Result.NanoSec:= (Int64(UnixWinEpoch - FileTime) mod 10000000) * 100;
if (Result.NanoSec > 0) then Result.NanoSec:= 1000000000 - Result.NanoSec;
end;
end;
end;
{$ENDIF}
function FileTimeToLocalFileTime(const FileTime: DCBasicTypes.TFileTime;
out LocalFileTime: DCBasicTypes.TFileTime): LongBool;
{$IFDEF MSWINDOWS}
@ -328,9 +397,7 @@ function WinFileTimeToDateTime(ft : TWinFileTime) : TDateTime;
{$IF DEFINED(MSWINDOWS)}
var
lpUniversalTime, lpLocalTime: TSystemTime;
{$ENDIF}
begin
{$IF DEFINED(MSWINDOWS)}
if (Win32MajorVersion > 5) then
begin
FileTimeToSystemTime(@ft, @lpUniversalTime);
@ -338,20 +405,22 @@ begin
Result := SystemTimeToDateTime(lpLocalTime);
end
else
{$ENDIF}
begin
WinFileTimeToLocalFileTime(ft,ft);
Result := (ft / 864000000000.0) - 109205.0;
end;
end;
{$ELSE}
begin
Result := FileTimeToDateTimeEx(WinFileTimeToFileTimeEx(ft));
end;
{$ENDIF}
function DateTimeToWinFileTime(dt : TDateTime) : TWinFileTime;
{$IF DEFINED(MSWINDOWS)}
var
lpUniversalTime, lpLocalTime: TSystemTime;
{$ENDIF}
begin
{$IF DEFINED(MSWINDOWS)}
if (Win32MajorVersion > 5) then
begin
DateTimeToSystemTime(dt, lpLocalTime);
@ -359,12 +428,16 @@ begin
SystemTimeToFileTime(@lpUniversalTime, @Result);
end
else
{$ENDIF}
begin
Result := Round((Extended(dt) + 109205.0) * 864000000000.0);
WinLocalFileTimeToFileTime(Result, Result);
end;
end;
{$ELSE}
begin
Result := FileTimeExToWinFileTime(DateTimeToFileTimeEx(dt));
end;
{$ENDIF}
function DosFileTimeToDateTime(const DosTime: TDosFileTime): TDateTime;
var
@ -405,10 +478,16 @@ var
Hr, Mn, S, MS: Word;
begin
DecodeDate(DateTime, Yr, Mo, Dy);
if (Yr < 1980) or (Yr > 2107) then // outside DOS file date year range
Yr := 1980;
DecodeTime(DateTime, Hr, Mn, S, MS);
// Outside DOS file date year range
if (Yr < 1980) then
Yr := 1980
else if (Yr > 2107) then
begin
Yr := 2107;
end;
LongRec(Result).Lo := (S shr 1) or (Mn shl 5) or (Hr shl 11);
LongRec(Result).Hi := Dy or (Mo shl 5) or (Word(Yr - 1980) shl 9);
end;
@ -480,7 +559,7 @@ end;
function UnixFileTimeToDateTimeEx(UnixTime: DCBasicTypes.TFileTimeEx) : TDateTime;
var
ATime: TTimeStruct;
milliseconds: Word;
Milliseconds: Word;
begin
if (fpLocalTime(@UnixTime.sec, @ATime) = nil) then
Exit(UnixEpoch);
@ -495,9 +574,11 @@ begin
if ATime.tm_sec > 59 then
ATime.tm_sec := 59;
milliseconds:= round( Extended(UnixTime.nanosec) / (1000.0*1000.0) );
if (milliseconds > 999) then
milliseconds:= 999;
if (UnixTime.nanosec > 999000000) then
Milliseconds := 999
else begin
Milliseconds := Round( Extended(UnixTime.nanosec) / (1000.0 * 1000.0) );
end;
Result := ComposeDateTime(EncodeDate(ATime.tm_year, ATime.tm_mon, ATime.tm_mday),
EncodeTime(ATime.tm_hour, ATime.tm_min, ATime.tm_sec, milliseconds));
@ -515,34 +596,10 @@ end;
function DateTimeToUnixFileTime(DateTime : TDateTime): TUnixFileTime;
{$IF DEFINED(UNIX)}
var
AUnixTime: TTime;
ATime: TTimeStruct;
Year, Month, Day: Word;
Hour, Minute, Second, MilliSecond: Word;
AUnixTime: TFileTimeEx;
begin
if DateTime < UnixEpoch then
raise EDateOutOfRange.Create(DateTime);
DecodeDate(DateTime, Year, Month, Day);
DecodeTime(DateTime, Hour, Minute, Second, MilliSecond);
ATime.tm_isdst:= -1;
ATime.tm_year:= Year - 1900;
ATime.tm_mon:= Month - 1;
ATime.tm_mday:= Day;
ATime.tm_hour:= Hour;
ATime.tm_min:= Minute;
ATime.tm_sec:= Second;
AUnixTime:= fpMkTime(@ATime);
if (AUnixTime < 0) then
Result:= 0
else begin
Result:= TUnixFileTime(AUnixTime);
end;
AUnixTime:= DateTimeToUnixFileTimeEx(DateTime);
Result:= TUnixFileTime(AUnixTime.Sec);
end;
{$ELSE}
var
@ -561,9 +618,6 @@ var
Year, Month, Day: Word;
Hour, Minute, Second, MilliSecond: Word;
begin
if DateTime < UnixEpoch then
raise EDateOutOfRange.Create(DateTime);
DecodeDate(DateTime, Year, Month, Day);
DecodeTime(DateTime, Hour, Minute, Second, MilliSecond);
@ -579,10 +633,11 @@ begin
AUnixTime:= fpMkTime(@ATime);
if (AUnixTime < 0) then
if (AUnixTime = -1) then
Result:= TFileTimeExNull
else begin
Result:= TFileTimeEx.create(AUnixTime, MilliSecond*1000*1000);
if (AUnixTime < 0) then MilliSecond:= 0;
Result:= TFileTimeEx.Create(AUnixTime, MilliSecond * 1000 * 1000);
end;
end;
{$ELSE}
@ -594,11 +649,25 @@ begin
end;
{$ENDIF}
function UnixFileTimeToFileTime(UnixTime: TUnixFileTime): DCBasicTypes.TFileTime; inline;
begin
{$IF DEFINED(MSWINDOWS)}
Result:= UnixFileTimeToWinTime(UnixTime);
{$ELSE}
Result:= UnixTime;
{$ENDIF}
end;
function UnixFileTimeToDosTime(UnixTime: TUnixFileTime): TDosFileTime;
begin
Result := DateTimeToDosFileTime(UnixFileTimeToDateTime(UnixTime));
end;
function DosTimeToUnixFileTime(DosTime: TDosFileTime): TUnixFileTime;
begin
Result:= DateTimeToUnixFileTime(DosFileTimeToDateTime(DosTime));
end;
function UnixFileTimeToWinTime(UnixTime: TUnixFileTime): TWinFileTime;
var
WinFileTime: TWinFileTime;
@ -616,6 +685,16 @@ begin
Result:= TUnixFileTime((WinTime - UnixWinEpoch) div 10000000);
end;
function WinFileTimeToDosTime(FileTime: TWinFileTime): TDosFileTime;
begin
Result := DateTimeToDosFileTime(WinFileTimeToDateTime(FileTime));
end;
function DosTimeToWinFileTime(FileTime: TDosFileTime): TWinFileTime;
begin
Result := DateTimeToWinFileTime(DosFileTimeToDateTime(FileTime));
end;
function WcxFileTimeToFileTime(WcxTime: LongInt): DCBasicTypes.TFileTime;
begin
{$IF DEFINED(MSWINDOWS)}

View file

@ -34,8 +34,10 @@ const
FILE_ATTRIBUTE_READONLY = $0001;
FILE_ATTRIBUTE_HIDDEN = $0002;
FILE_ATTRIBUTE_SYSTEM = $0004;
FILE_ATTRIBUTE_VOLUME = $0008;
FILE_ATTRIBUTE_DIRECTORY = $0010;
FILE_ATTRIBUTE_ARCHIVE = $0020;
FILE_ATTRIBUTE_DEVICE = $0040;
FILE_ATTRIBUTE_NORMAL = $0080;
FILE_ATTRIBUTE_TEMPORARY = $0100;
FILE_ATTRIBUTE_SPARSE_FILE = $0200;
@ -80,6 +82,8 @@ const
S_IRWXU = S_IRUSR or S_IWUSR or S_IXUSR;
S_IRWXG = S_IRGRP or S_IWGRP or S_IXGRP;
S_IRWXO = S_IROTH or S_IWOTH or S_IXOTH;
S_IRUGO = S_IRUSR or S_IRGRP or S_IROTH;
S_IWUGO = S_IWUSR or S_IWGRP or S_IWOTH;
S_IXUGO = S_IXUSR or S_IXGRP or S_IXOTH;
{ POSIX setuid(), setgid(), and sticky bit }
@ -99,6 +103,7 @@ const
function WinToUnixFileAttr(Attr: TFileAttrs): TFileAttrs;
function UnixToWinFileAttr(Attr: TFileAttrs): TFileAttrs;
function UnixToWcxFileAttr(Attr: TFileAttrs): TFileAttrs;
function WinToWcxFileAttr(Attr: TFileAttrs): TFileAttrs;
function UnixToWinFileAttr(const FileName: String; Attr: TFileAttrs): TFileAttrs;
function SingleStrToFileAttr(sAttr: String): TFileAttrs;
@ -186,13 +191,14 @@ function WinToUnixFileAttr(Attr: TFileAttrs): TFileAttrs;
begin
Result := S_IRUSR or S_IRGRP or S_IROTH;
if (Attr and faReadOnly) = 0 then
Result := Result or S_IWUSR;
if (Attr and faDirectory) <> 0 then
Result := Result or S_IFDIR or S_IXUGO
else
Result := Result or S_IFDIR or S_IXUGO or S_IWUSR
else begin
Result := Result or S_IFREG;
if (Attr and faReadOnly) = 0 then
Result := Result or S_IWUSR;
end;
end;
function UnixToWinFileAttr(Attr: TFileAttrs): TFileAttrs;
@ -227,6 +233,17 @@ begin
{$ENDIF}
end;
function WinToWcxFileAttr(Attr: TFileAttrs): TFileAttrs;
begin
{$IF DEFINED(UNIX)}
Result := WinToUnixFileAttr(Attr);
{$ELSEIF DEFINED(MSWINDOWS)}
Result := Attr;
{$ELSE}
Result := 0;
{$ENDIF}
end;
function UnixToWinFileAttr(const FileName: String; Attr: TFileAttrs): TFileAttrs;
begin
Result := UnixToWinFileAttr(Attr);

View file

@ -0,0 +1,213 @@
{
Double Commander
-------------------------------------------------------------------------
This unit contains Linux specific functions
Copyright (C) 2023 Alexander Koblov (alexx2000@mail.ru)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see <https://www.gnu.org/licenses/>
}
unit DCLinux;
{$mode objfpc}{$H+}
{$packrecords c}
interface
uses
Classes, SysUtils, BaseUnix, Unix;
const
CLOSE_RANGE_CLOEXEC = (1 << 2);
const
FS_IOC_GETFLAGS = $80086601;
FS_IOC_SETFLAGS = $40086602;
(*
* Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
*)
FS_SECRM_FL = $00000001; //* Secure deletion */
FS_UNRM_FL = $00000002; //* Undelete */
FS_COMPR_FL = $00000004; //* Compress file */
FS_SYNC_FL = $00000008; //* Synchronous updates */
FS_IMMUTABLE_FL = $00000010; //* Immutable file */
FS_APPEND_FL = $00000020; //* Writes to file may only append */
FS_NODUMP_FL = $00000040; //* Do not dump file */
FS_NOATIME_FL = $00000080; //* Do not update atime */
FS_FL_USER_VISIBLE = $0003DFFF; //* User visible flags */
FS_FL_USER_MODIFIABLE = $000380FF; //* User modifiable flags */
type
TFlagName = record
Flag: UInt32;
Name: AnsiChar;
end;
const
FlagsName: array[1..8] of TFlagName = (
(Flag: FS_SECRM_FL; Name: 's'),
(Flag: FS_UNRM_FL; Name: 'u'),
(Flag: FS_SYNC_FL; Name: 'S'),
(Flag: FS_IMMUTABLE_FL; Name: 'i'),
(Flag: FS_APPEND_FL; Name: 'a'),
(Flag: FS_NODUMP_FL; Name: 'd'),
(Flag: FS_NOATIME_FL; Name: 'A'),
(Flag: FS_COMPR_FL; Name: 'c')
);
function FormatFileFlags(Flags: UInt32): String;
function FileGetFlags(Handle: THandle; out Flags: UInt32): Boolean;
function mbFileGetFlags(const FileName: String; out Flags: UInt32): Boolean;
function mbFileGetXattr(const FileName: String): TStringArray;
function mbFileCopyXattr(const Source, Target: String): Boolean;
implementation
uses
InitC, DCConvertEncoding, DCOSUtils;
function lremovexattr(const path, name: PAnsiChar): cint; cdecl; external clib;
function llistxattr(const path: PAnsiChar; list: PAnsiChar; size: csize_t): ssize_t; cdecl; external clib;
function lgetxattr(const path, name: PAnsiChar; value: Pointer; size: csize_t): ssize_t; cdecl; external clib;
function lsetxattr(const path, name: PAnsiChar; const value: Pointer; size: csize_t; flags: cint): cint; cdecl; external clib;
function FormatFileFlags(Flags: UInt32): String;
var
Index: Integer;
begin
Result:=StringOfChar('-', Length(FlagsName));
for Index:= 1 to High(FlagsName) do
begin
if Flags and FlagsName[Index].Flag <> 0 then
begin
Result[Index]:= FlagsName[Index].Name;
end;
end;
end;
function FileGetFlags(Handle: THandle; out Flags: UInt32): Boolean;
begin
Result:= (FpIOCtl(Handle, FS_IOC_GETFLAGS, @Flags) >= 0);
end;
function mbFileGetFlags(const FileName: String; out Flags: UInt32): Boolean;
var
Handle: THandle;
begin
Handle:= mbFileOpen(FileName, fmOpenRead or fmShareDenyNone);
Result:= Handle <> feInvalidHandle;
if Result then
begin
Result:= (FpIOCtl(Handle, FS_IOC_GETFLAGS, @Flags) >= 0);
FileClose(Handle);
end;
end;
function mbFileGetXattr(const FileName: String): TStringArray;
var
AList: String;
ALength: ssize_t;
AFileName: String;
begin
SetLength(AList, MaxSmallint);
Result:= Default(TStringArray);
AFileName:= CeUtf8ToSys(FileName);
ALength:= llistxattr(PAnsiChar(AFileName), Pointer(AList), Length(AList));
if (ALength < 0) then
begin
if (fpgetCerrno <> ESysERANGE) then
begin
fpseterrno(fpgetCerrno);
Exit;
end
else begin
ALength:= llistxattr(PAnsiChar(AFileName), nil, 0);
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit;
end;
SetLength(AList, ALength);
ALength:= llistxattr(PAnsiChar(AFileName), Pointer(AList), ALength);
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit;
end;
end;
end;
if (ALength > 0) then
begin
SetLength(AList, ALength - 1);
Result:= AList.Split(#0);
end;
end;
function mbFileCopyXattr(const Source, Target: String): Boolean;
var
Value: String;
Index: Integer;
ALength: ssize_t;
Names: TStringArray;
ASource, ATarget: String;
begin
Result:= True;
ASource:= CeUtf8ToSys(Source);
ATarget:= CeUtf8ToSys(Target);
// Remove attributes from target
Names:= mbFileGetXattr(Target);
for Index:= 0 to High(Names) do
begin
lremovexattr(PAnsiChar(ATarget), PAnsiChar(Names[Index]));
end;
SetLength(Value, MaxSmallint);
Names:= mbFileGetXattr(Source);
for Index:= 0 to High(Names) do
begin
ALength:= lgetxattr(PAnsiChar(ASource), PAnsiChar(Names[Index]), Pointer(Value), Length(Value));
if (ALength < 0) then
begin
if (fpgetCerrno <> ESysERANGE) then
begin
fpseterrno(fpgetCerrno);
Exit(False);
end
else begin
ALength:= lgetxattr(PAnsiChar(ASource), PAnsiChar(Names[Index]), nil, 0);
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit(False);
end;
SetLength(Value, ALength);
ALength:= lgetxattr(PAnsiChar(ASource), PAnsiChar(Names[Index]), Pointer(Value), Length(Value));
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit(False);
end;
end;
end;
if (lsetxattr(PAnsiChar(ATarget), PAnsiChar(Names[Index]), Pointer(Value), ALength, 0) < 0) then
begin
fpseterrno(fpgetCerrno);
Exit(fpgeterrno = ESysEOPNOTSUPP);
end;
end;
end;
end.

View file

@ -4,7 +4,7 @@
This unit contains functions to work with hard and symbolic links
on the NTFS file system.
Copyright (C) 2012-2017 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2012-2025 Alexander Koblov (alexx2000@mail.ru)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -17,8 +17,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
License along with this library. If not, see <https://www.gnu.org/licenses/>.
}
unit DCNtfsLinks;
@ -40,8 +39,11 @@ const
FSCTL_SET_REPARSE_POINT = $000900A4;
FSCTL_GET_REPARSE_POINT = $000900A8;
FSCTL_DELETE_REPARSE_POINT = $000900AC;
// WSL and Cygwin symbolic link
IO_REPARSE_TAG_LX_SYMLINK = $A000001D;
const
LX_SYMLINK_HEADER_SIZE = 4;
REPARSE_DATA_HEADER_SIZE = 8;
MOUNT_POINT_HEADER_SIZE = 8;
FILE_DOES_NOT_EXIST = DWORD(-1);
@ -68,6 +70,11 @@ type
PathBuffer: array[0..0] of WCHAR;
end;
TLxSymlinkReparseBuffer = record
FileType: DWORD;
PathBuffer: array[0..0] of AnsiChar;
end;
TGenericReparseBuffer = record
DataBuffer: array[0..0] of UCHAR;
end;
@ -79,7 +86,8 @@ type
case Integer of
0: (SymbolicLinkReparseBuffer: TSymbolicLinkReparseBuffer);
1: (MountPointReparseBuffer: TMountPointReparseBuffer);
2: (GenericReparseBuffer: TGenericReparseBuffer);
2: (LxSymlinkReparseBuffer: TLxSymlinkReparseBuffer);
3: (GenericReparseBuffer: TGenericReparseBuffer);
end;
TReparseDataBuffer = REPARSE_DATA_BUFFER;
PReparseDataBuffer = ^REPARSE_DATA_BUFFER;
@ -95,7 +103,7 @@ type
@param(ALinkName The name of the symbolic link)
@returns(The function returns @true if successful, @false otherwise)
}
function CreateSymLink(const ATargetName, ALinkName: UnicodeString): Boolean;
function CreateSymLink(const ATargetName, ALinkName: UnicodeString; Attr: UInt32): Boolean;
{en
Established a hard link beetwen an existing file and new file. This function
is only supported on the NTFS file system, and only for files, not directories.
@ -112,6 +120,13 @@ function CreateHardLink(const AFileName, ALinkName: UnicodeString): Boolean;
@returns(The function returns @true if successful, @false otherwise)
}
function ReadSymLink(const aSymlinkFileName: UnicodeString; out aTargetFileName: UnicodeString): Boolean;
{en
Creates a WSL/Cygwin symbolic link.
@param(aTargetFileName The name of the existing file)
@param(aSymlinkFileName The name of the symbolic link)
@returns(The function returns @true if successful, @false otherwise)
}
function CreateSymLinkUnix(const aTargetFileName: String; const aSymlinkFileName: UnicodeString): Boolean;
implementation
@ -250,6 +265,7 @@ function _CreateSymLink_Old(aTargetFileName, aSymlinkFileName: UnicodeString): B
var
hDevice: THandle;
lpInBuffer: PReparseDataBuffer;
dwLastError,
nInBufferSize,
dwPathBufferSize: DWORD;
wsNativeFileName: UnicodeString;
@ -261,7 +277,11 @@ begin
hDevice:= CreateFileW(PWideChar(aSymlinkFileName),
GENERIC_WRITE, 0, nil, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS or FILE_FLAG_OPEN_REPARSE_POINT, 0);
if hDevice = INVALID_HANDLE_VALUE then Exit(False);
if hDevice = INVALID_HANDLE_VALUE then
begin
dwLastError:= GetLastError;
Exit(False);
end;
if Pos(wsLongFileNamePrefix, aTargetFileName) <> 1 then
wsNativeFileName:= wsNativeFileNamePrefix + aTargetFileName
else begin
@ -288,15 +308,19 @@ begin
0, // nOutBufferSize
lpBytesReturned, // lpBytesReturned
nil); // OVERLAPPED structure
if not Result then dwLastError:= GetLastError;
FreeMem(lpInBuffer);
CloseHandle(hDevice);
finally
if not Result then RemoveDirectoryW(PWideChar(aSymlinkFileName));
if not Result then
begin
RemoveDirectoryW(PWideChar(aSymlinkFileName));
SetLastError(dwLastError);
end;
end;
end;
function CreateSymLink(const ATargetName, ALinkName: UnicodeString): Boolean;
function CreateSymLink(const ATargetName, ALinkName: UnicodeString; Attr: UInt32): Boolean;
var
dwAttributes: DWORD;
lpFilePart: LPWSTR = nil;
@ -315,7 +339,11 @@ begin
AFullPathName:= ATargetName;
end;
end;
dwAttributes:= Windows.GetFileAttributesW(PWideChar(AFullPathName));
if (Attr <> FILE_DOES_NOT_EXIST) then
dwAttributes:= Attr
else begin
dwAttributes:= Windows.GetFileAttributesW(PWideChar(AFullPathName));
end;
if dwAttributes = FILE_DOES_NOT_EXIST then Exit;
if HasNewApi = False then
begin
@ -337,11 +365,61 @@ begin
end;
end;
function ReadSymLink(const aSymlinkFileName: UnicodeString; out aTargetFileName: UnicodeString): Boolean;
function CreateSymLinkUnix(const aTargetFileName: String; const aSymlinkFileName: UnicodeString): Boolean;
var
hDevice: THandle;
dwLastError: DWORD;
nInBufferSize: DWORD;
dwPathBufferSize: DWORD;
lpBytesReturned: DWORD = 0;
lpInBuffer: PReparseDataBuffer;
begin
hDevice:= CreateFileW(PWideChar(aSymlinkFileName),
GENERIC_WRITE, 0, nil, CREATE_NEW,
FILE_FLAG_OPEN_REPARSE_POINT, 0);
if hDevice = INVALID_HANDLE_VALUE then Exit(False);
dwPathBufferSize:= Length(aTargetFileName);
nInBufferSize:= REPARSE_DATA_HEADER_SIZE + LX_SYMLINK_HEADER_SIZE + dwPathBufferSize;
lpInBuffer:= GetMem(nInBufferSize);
ZeroMemory(lpInBuffer, nInBufferSize);
with lpInBuffer^, lpInBuffer^.LxSymlinkReparseBuffer do
begin
FileType:= 2; // symbolic link
ReparseTag:= IO_REPARSE_TAG_LX_SYMLINK;
ReparseDataLength:= LX_SYMLINK_HEADER_SIZE + dwPathBufferSize;
CopyMemory(@PathBuffer[0], @aTargetFileName[1], Length(aTargetFileName));
end;
Result:= DeviceIoControl(hDevice, // handle to file or directory
FSCTL_SET_REPARSE_POINT, // dwIoControlCode
lpInBuffer, // input buffer
nInBufferSize, // size of input buffer
nil, // lpOutBuffer
0, // nOutBufferSize
lpBytesReturned, // lpBytesReturned
nil); // OVERLAPPED structure
// File system does not support reparse points
// Create a normal file with the link target inside
if (not Result) and (GetLastError = ERROR_INVALID_FUNCTION) then
begin
Result:= (FileWrite(hDevice, aTargetFileName[1], dwPathBufferSize) = dwPathBufferSize);
if Result then SetFileAttributesW(PWideChar(aSymlinkFileName), FILE_ATTRIBUTE_SYSTEM);
end;
if not Result then dwLastError:= GetLastError;
FreeMem(lpInBuffer);
CloseHandle(hDevice);
if not Result then
begin
DeleteFileW(PWideChar(aSymlinkFileName));
SetLastError(dwLastError);
end;
end;
function ReadSymLink(const aSymlinkFileName: UnicodeString; out aTargetFileName: UnicodeString): Boolean;
var
L: Integer;
hDevice: THandle;
dwFileAttributes: DWORD;
caOutBuffer: array[0..4095] of Byte;
caOutBuffer: array[0..MaxSmallint] of Byte;
lpOutBuffer: TReparseDataBuffer absolute caOutBuffer;
pwcTargetFileName: PWideChar;
lpBytesReturned: DWORD = 0;
@ -389,6 +467,13 @@ begin
SetLength(aTargetFileName, SubstituteNameLength div SizeOf(WideChar));
CopyMemory(PWideChar(aTargetFileName), pwcTargetFileName, SubstituteNameLength);
end;
IO_REPARSE_TAG_LX_SYMLINK:
with lpOutBuffer.LxSymlinkReparseBuffer do
begin
L:= lpOutBuffer.ReparseDataLength - SizeOf(FileType);
SetLength(aTargetFileName, L + 1);
SetLength(aTargetFileName, MultiByteToWideChar(CP_UTF8, 0, @PathBuffer[0], L, PWideChar(aTargetFileName), L + 1));
end;
end;
if Pos(wsNetworkFileNamePrefix, aTargetFileName) = 1 then
Delete(aTargetFileName, 2, Length(wsNetworkFileNamePrefix) - 2)

329
components/doublecmd/dcosutils.pas Executable file → Normal file
View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
This unit contains platform dependent functions dealing with operating system.
Copyright (C) 2006-2023 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2006-2025 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -31,6 +31,12 @@ uses
{$IFDEF UNIX}
, BaseUnix, DCUnix
{$ENDIF}
{$IFDEF LINUX}
, DCLinux
{$ENDIF}
{$IFDEF DARWIN}
, DCDarwin
{$ENDIF}
{$IFDEF HAIKU}
, DCHaiku
{$ENDIF}
@ -43,6 +49,7 @@ const
fmOpenSync = $10000;
fmOpenDirect = $20000;
fmOpenNoATime = $40000;
fmOpenSpecial = $80000;
{$IF DEFINED(UNIX)}
ERROR_NOT_SAME_DEVICE = ESysEXDEV;
@ -50,6 +57,8 @@ const
ERROR_NOT_SAME_DEVICE = Windows.ERROR_NOT_SAME_DEVICE;
{$ENDIF}
FileNameNormalized = {$IFDEF DARWIN}True{$ELSE}False{$ENDIF};
type
TFileMapRec = record
FileHandle : System.THandle;
@ -96,7 +105,7 @@ type
PCopyAttributesResult = ^TCopyAttributesResult;
const
faInvalidAttributes: TFileAttrs = TFileAttrs(-1);
faInvalidAttributes = TFileAttrs(-1);
CopyAttributesOptionCopyAll = [caoCopyAttributes, caoCopyTime, caoCopyOwnership];
{en
@ -111,6 +120,12 @@ function FPS_ISDIR(iAttr: TFileAttrs) : Boolean;
@returns(@true if file is a symbolic link, @false otherwise)
}
function FPS_ISLNK(iAttr: TFileAttrs) : Boolean;
{en
Is file a regular file
@param(iAttr File attributes)
@returns(@true if file is a regular file, @false otherwise)
}
function FPS_ISREG(iAttr: TFileAttrs) : Boolean;
{en
Is file executable
@param(sFileName File name)
@ -146,6 +161,10 @@ function FileIsReadOnly(iAttr: TFileAttrs): Boolean; inline;
The path '/tmp' must already exist.)
}
function GetTempName(PathPrefix: String; Extension: String = 'tmp'): String;
{en
Find file in the system PATH
}
function FindInSystemPath(var FileName: String): Boolean;
{en
Extract file root directory
@param(FileName File name)
@ -166,6 +185,8 @@ function MapFile(const sFileName : String; out FileMapRec : TFileMapRec) : Boole
}
procedure UnMapFile(var FileMapRec : TFileMapRec);
function NormalizeFileName(const Source: String): String;
{en
Convert from console to UTF8 encoding.
}
@ -177,6 +198,7 @@ function mbFileCreate(const FileName: String): System.THandle; overload; inline;
function mbFileCreate(const FileName: String; Mode: LongWord): System.THandle; overload; inline;
function mbFileCreate(const FileName: String; Mode, Rights: LongWord): System.THandle; overload;
function mbFileAge(const FileName: String): DCBasicTypes.TFileTime;
function mbFileGetTime(const FileName: String): DCBasicTypes.TFileTimeEx;
// On success returns True.
// nanoseconds supported
function mbFileGetTime(const FileName: String;
@ -222,6 +244,7 @@ function mbFileSize(const FileName: String): Int64;
function FileGetSize(Handle: System.THandle): Int64;
function FileFlush(Handle: System.THandle): Boolean;
function FileFlushData(Handle: System.THandle): Boolean;
function FileIsReadOnlyEx(Handle: System.THandle): Boolean;
function FileAllocate(Handle: System.THandle; Size: Int64): Boolean;
{ Directory handling functions}
function mbGetCurrentDir: String;
@ -293,7 +316,7 @@ function CreateHardLink(const Path, LinkName: String) : Boolean;
@param(LinkName Name of symbolic link)
@returns(The function returns @true if successful, @false otherwise)
}
function CreateSymLink(const Path, LinkName: string) : Boolean;
function CreateSymLink(const Path, LinkName: string; Attr: UInt32 = faInvalidAttributes) : Boolean;
{en
Read destination of symbolic link
@param(LinkName Name of symbolic link)
@ -317,6 +340,9 @@ uses
{$ENDIF}
{$IF DEFINED(UNIX)}
Unix, dl,
{$ENDIF}
{$IF DEFINED(DARWIN)}
LazFileUtils,
{$ENDIF}
DCStrUtils, LazUTF8;
@ -381,8 +407,6 @@ const
O_SYNC or O_DIRECT);
{$ENDIF}
(*Is Directory*)
function FPS_ISDIR(iAttr: TFileAttrs) : Boolean; inline;
{$IFDEF MSWINDOWS}
begin
@ -394,8 +418,6 @@ begin
end;
{$ENDIF}
(*Is Link*)
function FPS_ISLNK(iAttr: TFileAttrs) : Boolean; inline;
{$IFDEF MSWINDOWS}
begin
@ -407,6 +429,17 @@ begin
end;
{$ENDIF}
function FPS_ISREG(iAttr: TFileAttrs) : Boolean; inline;
{$IFDEF MSWINDOWS}
begin
Result := (iAttr and FILE_ATTRIBUTE_DIRECTORY = 0);
end;
{$ELSE}
begin
Result := BaseUnix.FPS_ISREG(TMode(iAttr));
end;
{$ENDIF}
function FileIsExeLib(const sFileName : String) : Boolean;
var
fsExeLib : TFileStreamEx;
@ -484,54 +517,59 @@ function mbFileCopyAttr(const sSrc, sDst: String;
): TCopyAttributesOptions;
{$IFDEF MSWINDOWS}
var
Attr : TFileAttrs;
Attr: TWin32FileAttributeData;
Option: TCopyAttributesOption;
ModificationTime, CreationTime, LastAccessTime: DCBasicTypes.TFileTime;
begin
Result := [];
if not GetFileAttributesExW(PWideChar(UTF16LongName(sSrc)), GetFileExInfoStandard, @Attr) then
begin
Result := Options;
if Assigned(Errors) then
begin
for Option in Result do
Errors^[Option]:= GetLastOSError;
end;
Exit;
end;
if [caoCopyAttributes, caoCopyAttrEx] * Options <> [] then
begin
Attr := mbFileGetAttr(sSrc);
if Attr <> faInvalidAttributes then
if (not (caoCopyAttributes in Options)) and (Attr.dwFileAttributes and faDirectory = 0) then
Attr.dwFileAttributes := (Attr.dwFileAttributes or faArchive);
if (caoRemoveReadOnlyAttr in Options) and ((Attr.dwFileAttributes and faReadOnly) <> 0) then
Attr.dwFileAttributes := (Attr.dwFileAttributes and not faReadOnly);
if not mbFileSetAttr(sDst, Attr.dwFileAttributes) then
begin
if (not (caoCopyAttributes in Options)) and (Attr and faDirectory = 0) then
Attr := (Attr or faArchive);
if (caoRemoveReadOnlyAttr in Options) and ((Attr and faReadOnly) <> 0) then
Attr := (Attr and not faReadOnly);
if not mbFileSetAttr(sDst, Attr) then
begin
Include(Result, caoCopyAttributes);
if Assigned(Errors) then Errors^[caoCopyAttributes]:= GetLastOSError;
end;
end
else begin
Include(Result, caoCopyAttributes);
if Assigned(Errors) then Errors^[caoCopyAttributes]:= GetLastOSError;
end;
end;
if caoCopyXattributes in Options then
if not FPS_ISLNK(Attr.dwFileAttributes) then
begin
if not mbFileCopyXattr(sSrc, sDst) then
if (caoCopyXattributes in Options) then
begin
Include(Result, caoCopyXattributes);
if Assigned(Errors) then Errors^[caoCopyXattributes]:= GetLastOSError;
if not mbFileCopyXattr(sSrc, sDst) then
begin
Include(Result, caoCopyXattributes);
if Assigned(Errors) then Errors^[caoCopyXattributes]:= GetLastOSError;
end;
end;
end;
if [caoCopyTime, caoCopyTimeEx] * Options <> [] then
begin
if not mbFileGetTime(sSrc, ModificationTime, CreationTime, LastAccessTime) then
if ([caoCopyTime, caoCopyTimeEx] * Options <> []) then
begin
Include(Result, caoCopyTime);
if Assigned(Errors) then Errors^[caoCopyTime]:= GetLastOSError;
end
else begin
if not (caoCopyTime in Options) then
begin
CreationTime:= 0;
LastAccessTime:= 0;
end
else begin
CreationTime:= DCBasicTypes.TFileTime(Attr.ftCreationTime);
LastAccessTime:= DCBasicTypes.TFileTime(Attr.ftLastAccessTime);
end;
ModificationTime:= DCBasicTypes.TFileTime(Attr.ftLastWriteTime);
if not mbFileSetTime(sDst, ModificationTime, CreationTime, LastAccessTime) then
begin
@ -581,6 +619,14 @@ begin
if Assigned(Errors) then Errors^[caoCopyOwnership]:= GetLastOSError;
end;
end;
if caoCopyTime in Options then
begin
if DC_SymLinkSetTime(sDst, StatInfo.mtime, StatInfo.atime) = false then
begin
Include(Result, caoCopyTime);
if Assigned(Errors) then Errors^[caoCopyTime]:= GetLastOSError;
end;
end;
{$IF DEFINED(HAIKU)}
if caoCopyXattributes in Options then
begin
@ -627,7 +673,7 @@ begin
end;
end;
{$IF DEFINED(LINUX) or DEFINED(HAIKU)}
{$IF DEFINED(LINUX) or DEFINED(DARWIN) or DEFINED(HAIKU)}
if caoCopyXattributes in Options then
begin
if not mbFileCopyXattr(sSrc, sDst) then
@ -670,6 +716,26 @@ begin
until not mbFileSystemEntryExists(Result);
end;
function FindInSystemPath(var FileName: String): Boolean;
var
I: Integer;
Path, FullName: String;
Value: TDynamicStringArray;
begin
Path:= mbGetEnvironmentVariable('PATH');
Value:= SplitString(Path, PathSeparator);
for I:= Low(Value) to High(Value) do
begin
FullName:= IncludeTrailingPathDelimiter(Value[I]) + FileName;
if mbFileExists(FullName) then
begin
FileName:= FullName;
Exit(True);
end;
end;
Result:= False;
end;
function ExtractRootDir(const FileName: String): String;
{$IFDEF UNIX}
begin
@ -795,6 +861,17 @@ begin
end;
{$ENDIF}
function NormalizeFileName(const Source: String): String; inline;
{$IF DEFINED(DARWIN)}
begin
Result:= GetDarwinNormalizedFileName(Source);
end;
{$ELSE}
begin
Result:= Source;
end;
{$ENDIF}
function ConsoleToUTF8(const Source: String): RawByteString;
{$IFDEF MSWINDOWS}
begin
@ -818,12 +895,14 @@ begin
if (Mode and fmOpenNoATime <> 0) then
begin
if (Result <> feInvalidHandle) then
SetFileTime(Result, nil, @ft, @ft)
SetFileTime(Result, nil, @ft, nil)
else if GetLastError = ERROR_ACCESS_DENIED then
Result := mbFileOpen(FileName, Mode and not fmOpenNoATime);
end;
end;
{$ELSE}
var
Info: BaseUnix.Stat;
begin
repeat
Result:= fpOpen(UTF8ToSys(FileName), AccessModes[Mode and 3] or
@ -832,7 +911,28 @@ begin
if Result <> feInvalidHandle then
begin
FileCloseOnExec(Result);
Result:= FileLock(Result, Mode and $FF);
if (Mode and fmOpenSpecial = 0) then
begin
if fpFStat(Result, Info) = 0 then
begin
if FPS_ISFIFO(Info.st_mode) then
begin
FileClose(Result);
errno:= ESysEINVAL;
Exit(feInvalidHandle);
end;
end;
end;
{$IF DEFINED(DARWIN)}
if (Mode and (fmOpenSync or fmOpenDirect) <> 0) then
begin
if (FpFcntl(Result, F_NOCACHE, 1) = -1) then
begin
FileClose(Result);
Exit(feInvalidHandle);
end;
end;
{$ENDIF}
end;
end;
{$ENDIF}
@ -863,7 +963,16 @@ begin
if Result <> feInvalidHandle then
begin
FileCloseOnExec(Result);
Result:= FileLock(Result, Mode and $FF);
{$IF DEFINED(DARWIN)}
if (Mode and (fmOpenSync or fmOpenDirect) <> 0) then
begin
if (FpFcntl(Result, F_NOCACHE, 1) = -1) then
begin
FileClose(Result);
Exit(feInvalidHandle);
end;
end;
{$ENDIF}
end;
end;
{$ENDIF}
@ -874,27 +983,34 @@ var
Handle: System.THandle;
FindData: TWin32FindDataW;
begin
Handle := FindFirstFileW(PWideChar(UTF16LongName(FileName)), FindData);
Handle:= FindFirstFileW(PWideChar(UTF16LongName(FileName)), FindData);
if Handle <> INVALID_HANDLE_VALUE then
begin
Windows.FindClose(Handle);
if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 then
Exit(DCBasicTypes.TWinFileTime(FindData.ftLastWriteTime));
end;
begin
Windows.FindClose(Handle);
Exit(DCBasicTypes.TFileTime(FindData.ftLastWriteTime));
end;
Result:= DCBasicTypes.TFileTime(-1);
end;
{$ELSE}
var
Info: BaseUnix.Stat;
begin
Result:= DCBasicTypes.TFileTime(-1);
if fpStat(UTF8ToSys(FileName), Info) >= 0 then
{$PUSH}{$R-}
Result := Info.st_mtime;
{$POP}
Result:= DCBasicTypes.TFileTime(Info.st_mtime)
else begin
Result:= DCBasicTypes.TFileTime(-1);
end;
end;
{$ENDIF}
function mbFileGetTime(const FileName: String): DCBasicTypes.TFileTimeEx;
var
CreationTime, LastAccessTime: DCBasicTypes.TFileTimeEx;
begin
if not mbFileGetTime(FileName, Result, CreationTime, LastAccessTime) then
Result:= TFileTimeExNull;
end;
function mbFileGetTime(const FileName: String;
var ModificationTime: DCBasicTypes.TFileTimeEx;
var CreationTime : DCBasicTypes.TFileTimeEx;
@ -1250,8 +1366,10 @@ begin
// (On Linux rename() returns success but doesn't do anything
// if renaming a file to its hard link.)
// We cannot use st_nlink for directories because it means "number of
// subdirectories"; hard links to directories are not supported on Linux
// or Windows anyway (on MacOSX they are). Therefore we always treat
// subdirectories" ("number of all entries" under macOS) in that directory,
// plus its special entries '.' and '..';
// hard links to directories are not supported on Linux
// or Windows anyway (on macOS they are). Therefore we always treat
// directories as if they were a single link and rename them using temporary name.
if (NewFileStat.st_nlink = 1) or BaseUnix.fpS_ISDIR(NewFileStat.st_mode) then
@ -1265,14 +1383,7 @@ begin
// We have renamed the old file but the new file name still exists,
// so this wasn't a single file on a case-insensitive filesystem
// accessible by two names that differ by case.
FpRename(UTF8ToSys(tmpFileName), UTF8ToSys(OldName)); // Restore old file.
{$IFDEF DARWIN}
// If it's a directory with multiple hard links then simply unlink the source.
if BaseUnix.fpS_ISDIR(NewFileStat.st_mode) and (NewFileStat.st_nlink > 1) then
Result := (fpUnLink(UTF8ToSys(OldName)) = 0)
else
{$ENDIF}
Result := False;
end
else if FpRename(UTF8ToSys(tmpFileName), UTF8ToSys(NewName)) = 0 then
@ -1367,14 +1478,48 @@ begin
end;
{$ENDIF}
function FileIsReadOnlyEx(Handle: System.THandle): Boolean;
{$IF DEFINED(MSWINDOWS)}
var
Info: BY_HANDLE_FILE_INFORMATION;
begin
if GetFileInformationByHandle(Handle, Info) then
Result:= (Info.dwFileAttributes and (faReadOnly or faHidden or faSysFile) <> 0)
else
Result:= False;
end;
{$ELSEIF DEFINED(LINUX)}
var
Flags: UInt32;
begin
if FileGetFlags(Handle, Flags) then
begin
if (Flags and (FS_IMMUTABLE_FL or FS_APPEND_FL) <> 0) then
Exit(True);
end;
Result:= False;
end;
{$ELSE}
begin
Result:= False;
end;
{$ENDIF}
function FileAllocate(Handle: System.THandle; Size: Int64): Boolean;
{$IF DEFINED(LINUX)}
var
Ret: cint;
Sta: TStat;
StaFS: TStatFS;
begin
if (Size > 0) then
begin
repeat
Ret:= fpfStatFS(Handle, @StaFS);
until (Ret <> -1) or (fpgeterrno <> ESysEINTR);
// FAT32 does not support a fast allocation
if (StaFS.fstype = MSDOS_SUPER_MAGIC) then
Exit(False);
repeat
Ret:= fpFStat(Handle, Sta);
until (Ret <> -1) or (fpgeterrno <> ESysEINTR);
@ -1384,7 +1529,7 @@ begin
Sta.st_size:= (Size + Sta.st_blksize - 1) and not (Sta.st_blksize - 1);
repeat
Ret:= fpFAllocate(Handle, 0, 0, Sta.st_size);
until (Ret <> -1) or (fpgeterrno <> ESysEINTR) or (fpgeterrno <> ESysEAGAIN);
until (Ret <> -1) or (fpgeterrno <> ESysEINTR);
end;
end;
Result:= FileTruncate(Handle, Size);
@ -1501,8 +1646,16 @@ begin
Result := mbFileGetAttr(Path) <> faInvalidAttributes;
end;
function mbCompareFileNames(const FileName1, FileName2: String): Boolean; inline;
{$IF DEFINED(WINDOWS) OR DEFINED(DARWIN)}
function mbCompareFileNames(const FileName1, FileName2: String): Boolean;
{$IF DEFINED(DARWIN)}
begin
if (Length(FileName1) = 0) or (Length(FileName2) = 0) then
Result:= (FileName1 = FileName2)
else begin
Result:= CompareFilenamesIgnoreCase(FileName1, FileName2) = 0;
end;
end;
{$ELSEIF DEFINED(MSWINDOWS)}
begin
Result:= (UnicodeCompareText(CeUtf8ToUtf16(FileName1), CeUtf8ToUtf16(FileName2)) = 0);
end;
@ -1647,7 +1800,7 @@ begin
if EqualPos = 0 then Continue;
EnvName:= Copy(EnvVar, 1, EqualPos - 1);
EnvValue:= Copy(EnvVar, EqualPos + 1, MaxInt);
Result:= StringReplace(Result, '$' + EnvName, EnvValue, [rfReplaceAll, rfIgnoreCase]);
Result:= StringReplace(Result, '$' + EnvName, EnvValue, [rfReplaceAll]);
Inc(Index);
end;
end;
@ -1764,21 +1917,27 @@ end;
function mbLoadLibrary(const Name: String): TLibHandle;
{$IFDEF MSWINDOWS}
var
dwMode: DWORD;
dwErrCode: DWORD;
sRememberPath: String;
begin
dwMode:= SetErrorMode(SEM_FAILCRITICALERRORS or SEM_NOOPENFILEERRORBOX);
try
//Some plugins using DLL(s) in their directory are loaded correctly only if "CurrentDir" is poining their location.
//Also, TC switch "CurrentDir" to their directory when loading them. So let's do the same.
sRememberPath:=GetCurrentDir;
SetCurrentDir(ExcludeTrailingPathDelimiter(ExtractFilePath(Name)));
Result:= LoadLibraryW(PWideChar(CeUtf8ToUtf16(Name)));
// Some plugins using DLL(s) in their directory are loaded correctly only if "CurrentDir" is poining their location.
// Also, TC switch "CurrentDir" to their directory when loading them. So let's do the same.
sRememberPath:= GetCurrentDir;
SetCurrentDir(ExtractFileDir(Name));
Result:= SafeLoadLibrary(CeUtf8ToUtf16(Name));
dwErrCode:= GetLastError;
finally
SetErrorMode(dwMode);
SetCurrentDir(sRememberPath);
SetLastError(dwErrCode);
end;
end;
{$ELSE}
begin
Result:= TLibHandle(dlopen(PChar(UTF8ToSys(Name)), RTLD_LAZY));
Result:= SafeLoadLibrary(CeUtf8ToSys(Name));
end;
{$ENDIF}
@ -1787,29 +1946,37 @@ function mbLoadLibraryEx(const Name: String): TLibHandle;
const
PATH_ENV = 'PATH';
var
dwFlags:DWORD;
APath: String;
APathType: TPathType;
usName: UnicodeString;
begin
usName:= CeUtf8ToUtf16(Name);
APathType:= GetPathType(Name);
if CheckWin32Version(10)then
if CheckWin32Version(10) or (GetProcAddress(GetModuleHandleW(Kernel32), 'AddDllDirectory') <> nil) then
begin
Result:= LoadLibraryExW(PWideChar(usName), 0, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR or LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
end
else if CheckWin32Version(6) then
begin
SetDllDirectoryW(PWideChar(ExtractFileDir(usName)));
try
Result:= LoadLibraryW(PWideChar(usName));
finally
SetDllDirectoryW(nil);
if APathType <> ptAbsolute then
dwFlags:= 0
else begin
dwFlags:= LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR;
end;
Result:= LoadLibraryExW(PWideChar(usName), 0, dwFlags or LOAD_LIBRARY_SEARCH_DEFAULT_DIRS);
end
else begin
APath:= mbGetEnvironmentVariable(PATH_ENV);
try
mbSetEnvironmentVariable(PATH_ENV, ExtractFileDir(Name));
Result:= LoadLibraryW(PWideChar(usName));
if APathType <> ptAbsolute then
SetDllDirectoryW(PWideChar(''))
else begin
SetDllDirectoryW(PWideChar(ExtractFileDir(usName)));
end;
try
SetEnvironmentVariableW(PATH_ENV, nil);
Result:= LoadLibraryW(PWideChar(usName));
finally
SetDllDirectoryW(nil);
end;
finally
mbSetEnvironmentVariable(PATH_ENV, APath);
end;
@ -1817,7 +1984,7 @@ begin
end;
{$ELSE}
begin
Result:= TLibHandle(dlopen(PChar(UTF8ToSys(Name)), RTLD_LAZY));
Result:= SafeLoadLibrary(CeUtf8ToSys(Name));
end;
{$ENDIF}
@ -1928,14 +2095,14 @@ begin
end;
{$ENDIF}
function CreateSymLink(const Path, LinkName: string) : Boolean;
function CreateSymLink(const Path, LinkName: string; Attr: UInt32): Boolean;
{$IFDEF MSWINDOWS}
var
wsPath, wsLinkName: UnicodeString;
begin
wsPath:= CeUtf8ToUtf16(Path);
wsLinkName:= UTF16LongName(LinkName);
Result:= DCNtfsLinks.CreateSymlink(wsPath, wsLinkName);
Result:= DCNtfsLinks.CreateSymlink(wsPath, wsLinkName, Attr);
end;
{$ELSE}
begin

View file

@ -27,7 +27,7 @@ uses
type
{ TProcessUtf8 }
{$IF DEFINED(UNIX)}
{$IF DEFINED(UNIX)}
TProcessUtf8 = class(UTF8Process.TProcessUTF8)
private
procedure DoForkEvent(Sender : TObject);
@ -38,12 +38,14 @@ type
function Suspend : Integer; override;
function Terminate (AExitCode : Integer): Boolean; override;
end;
{$ELSEIF DEFINED(MSWINDOWS)}
{$ELSEIF DEFINED(MSWINDOWS) AND (FPC_FULLVERSION < 30301)}
TProcessUtf8 = class(TProcess)
public
procedure Execute; override;
end;
{$ENDIF}
{$ELSE}
TProcessUtf8 = class(TProcess);
{$ENDIF}
implementation
@ -102,7 +104,7 @@ begin
if Result then WaitOnExit;
end;
{$ELSEIF DEFINED(MSWINDOWS)}
{$ELSEIF DEFINED(MSWINDOWS) AND (FPC_FULLVERSION < 30301)}
{$WARN SYMBOL_DEPRECATED OFF}

View file

@ -42,12 +42,14 @@ type
private
FList: PStringHashItemList;
FCount: Integer;
fNormalize: Boolean;
fCaseSensitive: Boolean;
function BinarySearch(HashValue: Cardinal): Integer;
function CompareString(const Low, Key: String): Boolean;
function CompareValue(const Value1, Value2: Cardinal): Integer;
procedure FindHashBoundaries(HashValue: Cardinal; StartFrom: Integer; out First, Last: Integer);
function GetData(const S: String): Pointer;
procedure SetNormalize(AValue: Boolean);
procedure SetCaseSensitive(const Value: Boolean);
procedure Delete(Index: Integer);
procedure SetData(const S: String; const AValue: Pointer);
@ -60,11 +62,13 @@ type
function Add(const S: String): Integer;
function Add(const S: String; ItemData: Pointer): Integer;
procedure Clear;
procedure Remove(Index: Integer);
function Find(const S: String): Integer;
function Find(const S: String; Data: Pointer): Integer;
function Remove(const S: String): Integer;
function Remove(const S: String; Data: Pointer): Integer;
procedure FindBoundaries(StartFrom: Integer; out First, Last: Integer);
property Normalize: Boolean read fNormalize write SetNormalize;
property CaseSensitive: Boolean read fCaseSensitive write SetCaseSensitive;
property Count: Integer read FCount;
property Data[const S: String]: Pointer read GetData write SetData; default;
@ -74,7 +78,7 @@ type
implementation
uses
LazUTF8;
LazUTF8, DCOSUtils;
{ TStringHashListUtf8 }
@ -96,6 +100,10 @@ begin
else begin
Text:= UTF8LowerCase(S);
end;
if fNormalize then
begin
Text:= NormalizeFileName(Text);
end;
New(Item);
Val:= HashOf(Text);
Item^.HashValue := Val;
@ -162,6 +170,15 @@ begin
fCount:= 0;
end;
procedure TStringHashListUtf8.Remove(Index: Integer);
begin
if (Index >= 0) and (Index < FCount) then
begin
Dispose(fList[Index]);
Delete(Index);
end;
end;
function TStringHashListUtf8.CompareString(const Low, Key: String): Boolean;
var
P: Pointer;
@ -170,13 +187,20 @@ var
begin
P:= Pointer(Low);
Len:= Length(Low);
if fCaseSensitive then
if not fNormalize then
begin
Result:= (Len = Length(Key));
if Result then Result:= (CompareByte(P^, Pointer(Key)^, Len) = 0);
LKey:= Key;
end
else begin
LKey:= UTF8LowerCase(Key);
LKey:= NormalizeFileName(Key);
end;
if fCaseSensitive then
begin
Result:= (Len = Length(LKey));
if Result then Result:= (CompareByte(P^, Pointer(LKey)^, Len) = 0);
end
else begin
LKey:= UTF8LowerCase(LKey);
Result:= (Len = Length(LKey));
if Result then Result:= (CompareByte(P^, Pointer(LKey)^, Len) = 0);
end;
@ -222,6 +246,18 @@ begin
Add(S,AValue);
end;
procedure TStringHashListUtf8.SetNormalize(AValue: Boolean);
begin
if fNormalize <> AValue then
begin
if Count > 0 then
begin
raise EListError.Create(lrsListMustBeEmpty);
end;
fNormalize := AValue;
end;
end;
destructor TStringHashListUtf8.Destroy;
begin
Clear;
@ -239,6 +275,10 @@ begin
else begin
Text:= UTF8LowerCase(S);
end;
if fNormalize then
begin
Text:= NormalizeFileName(Text);
end;
Value:= HashOf(Text);
Result:= BinarySearch(Value);
if (Result <> -1) and not CompareString(Text, FList[Result]^.Key) then
@ -265,6 +305,10 @@ begin
else begin
Text:= UTF8LowerCase(S);
end;
if fNormalize then
begin
Text:= NormalizeFileName(Text);
end;
Value:= HashOf(Text);
Result:= BinarySearch(Value);
if (Result <> -1) and
@ -325,7 +369,8 @@ end;
constructor TStringHashListUtf8.Create(CaseSensitivity: boolean);
begin
fCaseSensitive:=CaseSensitivity;
fNormalize:= FileNameNormalized;
fCaseSensitive:= CaseSensitivity;
inherited Create;
end;

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Useful functions dealing with strings.
Copyright (C) 2006-2023 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2006-2025 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2012 Przemyslaw Nagay (cobines@gmail.com)
This program is free software; you can redistribute it and/or modify
@ -45,6 +45,12 @@ function ContainsOneOf(StringToCheck: String; PossibleCharacters: String): Boole
Convert known directory separators to the current directory separator.
}
function NormalizePathDelimiters(const Path: String): String;
{en
Convert known directory separators to user defined directory separator.
}
function ReplaceDirectorySeparator(const Path: String; const Separator : Char): String;
{en
Get last directory name in path
@returns(Last directory name in path)
@ -241,6 +247,7 @@ function TrimPath(const Path: String): String;
}
function TrimRightLineEnding(const sText: String; TextLineBreakStyle: TTextLineBreakStyle): String;
function mbCompareText(const s1, s2: String): PtrInt;
function mbCompareStr(const s1, s2: String): PtrInt;
function StrNewW(const mbString: String): PWideChar;
procedure StrDisposeW(var pStr : PWideChar);
@ -365,6 +372,21 @@ implementation
uses
DCOSUtils, DCConvertEncoding, StrUtils;
function ReplaceDirectorySeparator(const Path: String; const Separator : Char): String;
const
AllowPathDelimiters : set of char = ['\','/'];
var
I : LongInt;
begin
Result := Path;
if (Separator in AllowPathDelimiters) then
begin
for I:= 1 to Length(Path) do
if Path[I] in AllowPathDelimiters then
Result[I]:= Separator
end
end;
function NormalizePathDelimiters(const Path: String): String;
{$IFDEF UNIX}
begin
@ -375,11 +397,16 @@ const
AllowPathDelimiters : set of char = ['\','/'];
var
I : LongInt;
uriPos : Integer;
begin
Result:= Path;
// If path is not URI
if Pos('://', Result) = 0 then
begin
uriPos := Pos('://', Result);
if (uriPos = 0)
{$IF DEFINED(MSWINDOWS)}
or ( (uriPos = 2) and (Path[1] in ['A'..'z']) )
{$ENDIF} then
begin
for I:= 1 to Length(Path) do
if Path[I] in AllowPathDelimiters then
Result[I]:= DirectorySeparator;
@ -624,7 +651,7 @@ end;
function ReplaceInvalidChars(const FileName: String): String;
const
{$IFDEF MSWINDOWS}
ForbiddenChars : set of char = ['<','>',':','"','/','|','?','*'];
ForbiddenChars : set of char = [#00..#31, '<','>',':','"','/','|','?','*'];
{$ELSE}
ForbiddenChars : set of char = [#0];
{$ENDIF}
@ -645,7 +672,7 @@ end;
function RemoveInvalidCharsFromFileName(const FileName: String): String;
const
{$IFDEF MSWINDOWS}
ForbiddenChars : set of char = ['<','>',':','"','/','\','|','?','*'];
ForbiddenChars : set of char = [#00..#31, '<','>',':','"','/','\','|','?','*'];
{$ELSE}
ForbiddenChars : set of char = ['/'];
{$ENDIF}
@ -659,34 +686,56 @@ begin
end;
function ExpandAbsolutePath(const Path: String): String;
const
PATH_DELIM_POS = {$IFDEF MSWINDOWS}3{$ELSE}1{$ENDIF};
var
I, J: Integer;
begin
Result := Path;
{First remove all references to '\.\'}
I := Pos (DirectorySeparator + '.' + DirectorySeparator, Result);
// Remove all references to '\.\'
I := Pos(DirectorySeparator + '.' + DirectorySeparator, Result);
while I <> 0 do
begin
Delete (Result, I, 2);
I := Pos (DirectorySeparator + '.' + DirectorySeparator, Result);
end;
if StrEnds(Result, DirectorySeparator + '.') then
Delete (Result, Length(Result) - 1, 2);
begin
Delete(Result, I, 2);
I := Pos(DirectorySeparator + '.' + DirectorySeparator, Result, I);
end;
{Then remove all references to '\..\'}
I := Pos (DirectorySeparator + '..', Result);
while (I <> 0) do
begin
J := Pred (I);
while (J > 0) and (Result [J] <> DirectorySeparator) do
Dec (J);
if (J = 0) then
Delete (Result, I, 3)
else
Delete (Result, J, I - J + 3);
I := Pos (DirectorySeparator + '..', Result);
end;
// Remove all references to '\..\'
I := Pos(DirectorySeparator + '..' + DirectorySeparator, Result);
while I <> 0 do
begin
J := Pred(I);
while (J > 0) and (Result[J] <> DirectorySeparator) do Dec (J);
Delete(Result, J + 1, I - J + 3);
I := Pos(DirectorySeparator + '..' + DirectorySeparator, Result);
end;
// Remove a reference to '\..' at the end of line
if StrEnds(Result, DirectorySeparator + '..') then
begin
J := Length(Result) - 3;
while (J > 0) and (Result[J] <> DirectorySeparator) do Dec(J);
if (J = 0) then
Result := EmptyStr
else if (J > PATH_DELIM_POS) then
Delete(Result, J, MaxInt)
else
Delete(Result, J + 1, MaxInt);
end;
// Remove a reference to '\.' at the end of line
if Length(Result) = 1 then
begin
if Result[1] = '.' then Result := EmptyStr;
end
else if StrEnds(Result, DirectorySeparator + '.') then
begin
if Length(Result) = (PATH_DELIM_POS + 1) then
Delete(Result, Length(Result), 1)
else
Delete(Result, Length(Result) - 1, 2);
end;
end;
function HasPathInvalidCharacters(Path: String): Boolean;
@ -704,12 +753,12 @@ begin
sBasePath := IncludeTrailingPathDelimiter(sBasePath);
BasePathLength := Length(sBasePath);
PathToCheckLength := Length(sPathToCheck);
BasePathLength := UTF8Length(sBasePath);
PathToCheckLength := UTF8Length(sPathToCheck);
if PathToCheckLength > BasePathLength then
begin
if mbCompareFileNames(Copy(sPathToCheck, 1, BasePathLength), sBasePath) then
if mbCompareFileNames(UTF8Copy(sPathToCheck, 1, BasePathLength), sBasePath) then
begin
if AllowSubDirs then
Result := True
@ -718,10 +767,10 @@ begin
// Additionally check if the remaining path is a relative path.
// Look for a path delimiter in the middle of the filepath.
sPathToCheck := Copy(sPathToCheck, 1 + BasePathLength,
sPathToCheck := UTF8Copy(sPathToCheck, 1 + BasePathLength,
PathToCheckLength - BasePathLength);
DelimiterPos := Pos(DirectorySeparator, sPathToCheck);
DelimiterPos := UTF8Pos(DirectorySeparator, sPathToCheck);
// If no delimiter was found or it was found at then end (directories
// may end with it), then the 'sPathToCheck' is in 'sBasePath'.
@ -736,7 +785,7 @@ begin
(((PathToCheckLength = BasePathLength) and
(mbCompareFileNames(sPathToCheck, sBasePath))) or
((PathToCheckLength = BasePathLength - 1) and
(mbCompareFileNames(Copy(sBasePath, 1, PathToCheckLength), sPathToCheck))));
(mbCompareFileNames(UTF8Copy(sBasePath, 1, PathToCheckLength), sPathToCheck))));
end;
function ExtractDirLevel(const sPrefix, sPath: String): String;
@ -976,9 +1025,12 @@ end;
function mbCompareText(const s1, s2: String): PtrInt; inline;
begin
// From 0.9.31 LazUtils can be used but this package does not exist in 0.9.30.
// Result := LazUTF8.UTF8CompareText(s1, s2);
Result := WideCompareText(CeUtf8ToUtf16(s1), CeUtf8ToUtf16(s2));
Result := UnicodeCompareText(CeUtf8ToUtf16(s1), CeUtf8ToUtf16(s2));
end;
function mbCompareStr(const s1, s2: String): PtrInt; inline;
begin
Result := UnicodeCompareStr(CeUtf8ToUtf16(s1), CeUtf8ToUtf16(s2));
end;
function StrNewW(const mbString: String): PWideChar;

View file

@ -23,7 +23,7 @@ uses
the number of bytes this character spans. If the character was valid
InvalidCharLen is zero.)
}
function SafeUTF8NextCharLen(P: PByte; aMaxBytes: Integer; out InvalidCharLen: Integer): Integer;
function SafeUTF8NextCharLen(P: PByte; aMaxBytes: IntPtr; out InvalidCharLen: Integer): Integer;
{en
Retrieves length in bytes of the previous UTF-8 character.
@ -40,7 +40,7 @@ function SafeUTF8NextCharLen(P: PByte; aMaxBytes: Integer; out InvalidCharLen: I
the number of bytes this character spans. If the character was valid
InvalidCharLen is zero.)
}
function SafeUTF8PrevCharLen(P: PByte; aMaxBytes: Integer; out InvalidCharLen: Integer): Integer;
function SafeUTF8PrevCharLen(P: PByte; aMaxBytes: IntPtr; out InvalidCharLen: Integer): Integer;
function SafeUTF8NextCharStart(UTF8Str: PByte; Len: PtrInt): PByte;
function SafeUTF8PrevCharEnd(UTF8Str: PByte; Len: PtrInt): PByte;
{en
@ -83,7 +83,7 @@ uses
const
maxUTF8Len = 7; // really is 4, but this includes any invalid characters up to length 7
function SafeUTF8NextCharLen(P: PByte; aMaxBytes: Integer; out InvalidCharLen: Integer): Integer;
function SafeUTF8NextCharLen(P: PByte; aMaxBytes: IntPtr; out InvalidCharLen: Integer): Integer;
var
BytesLen: Integer;
i: Integer;
@ -133,7 +133,7 @@ begin
end;
end;
function SafeUTF8PrevCharLen(P: PByte; aMaxBytes: Integer; out InvalidCharLen: Integer): Integer;
function SafeUTF8PrevCharLen(P: PByte; aMaxBytes: IntPtr; out InvalidCharLen: Integer): Integer;
var
BytesLen: Integer;
signature: Byte;
@ -480,7 +480,7 @@ begin
Index:= 0;
SrcPos:= PAnsiChar(UTF8Text);
while Len > 0 do begin
Result[Index]:= UTF8CharacterToUnicode(SrcPos, CharLen);
Result[Index]:= UTF8CodepointToUnicode(SrcPos, CharLen);
Inc(SrcPos, CharLen);
Dec(Len, CharLen);
Inc(Index);

211
components/doublecmd/dcunix.pas Executable file → Normal file
View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
This unit contains Unix specific functions
Copyright (C) 2015-2023 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2015-2024 Alexander Koblov (alexx2000@mail.ru)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -40,13 +40,24 @@ const
{$IF DEFINED(LINUX)}
FD_CLOEXEC = 1;
O_CLOEXEC = &02000000;
O_PATH = &010000000;
_SC_NPROCESSORS_CONF = 83;
_SC_NPROCESSORS_ONLN = 84;
{$ELSEIF DEFINED(FREEBSD)}
O_CLOEXEC = &04000000;
_SC_NPROCESSORS_CONF = 57;
_SC_NPROCESSORS_ONLN = 58;
CLOSE_RANGE_CLOEXEC = (1 << 2);
{$ELSEIF DEFINED(NETBSD)}
O_CLOEXEC = $00400000;
{$ELSEIF DEFINED(HAIKU)}
FD_CLOEXEC = 1;
O_CLOEXEC = $00000040;
{$ELSEIF DEFINED(DARWIN)}
F_NOCACHE = 48;
O_CLOEXEC = $1000000;
_SC_NPROCESSORS_CONF = 57;
_SC_NPROCESSORS_ONLN = 58;
{$ELSE}
O_CLOEXEC = 0;
{$ENDIF}
@ -155,6 +166,7 @@ type
{$ELSE}
TDCStat = BaseUnix.Stat;
{$ENDIF}
PDCStat = ^TDCStat;
TDCStatHelper = record Helper for TDCStat
Public
@ -172,6 +184,11 @@ function DC_FileSetTime(const FileName: String;
const birthtime: TFileTimeEx;
const atime : TFileTimeEx ): Boolean;
// nanoseconds supported, does not follow symbolic links
function DC_SymLinkSetTime(const FileName: String;
const mtime : TFileTimeEx;
const atime : TFileTimeEx ): Boolean;
{en
Set the close-on-exec flag to all
@ -248,6 +265,10 @@ function getgrgid(gid: gid_t): PGroupRecord; cdecl; external clib;
fields of the record in the group database that matches the group name)
}
function getgrnam(name: PChar): PGroupRecord; cdecl; external clib;
{en
Get configuration information at run time
}
function sysconf(name: cint): clong; cdecl; external clib;
function FileLock(Handle: System.THandle; Mode: cInt): System.THandle;
@ -255,12 +276,12 @@ function fpMkTime(tm: PTimeStruct): TTime;
function fpLocalTime(timer: PTime; tp: PTimeStruct): PTimeStruct;
{$IF DEFINED(LINUX)}
var
KernVersion: UInt16;
function fpFDataSync(fd: cint): cint;
function fpCloneFile(src_fd, dst_fd: cint): Boolean;
function fpFAllocate(fd: cint; mode: cint; offset, len: coff_t): cint;
function mbFileGetXattr(const FileName: String): TStringArray;
function mbFileCopyXattr(const Source, Target: String): Boolean;
{$ENDIF}
{$IF DEFINED(UNIX) AND NOT DEFINED(DARWIN)}
@ -270,17 +291,24 @@ function fnmatch(const pattern: PAnsiChar; const str: PAnsiChar; flags: cint): c
implementation
uses
Unix, DCConvertEncoding, LazUTF8
{$IFDEF DARWIN}
Unix, DCConvertEncoding, DCOSUtils, LazUTF8
{$IF DEFINED(DARWIN)}
, DCDarwin
{$ELSEIF DEFINED(LINUX)}
, Dos, DCLinux
{$ENDIF}
;
{$IF not DEFINED(LINUX)}
function TDCStatHelper.birthtime: TFileTimeEx;
begin
{$IF DEFINED(HAIKU)}
Result.sec:= st_crtime;
Result.nanosec:= st_crtimensec;
{$ELSE}
Result.sec:= st_birthtime;
Result.nanosec:= st_birthtimensec;
{$ENDIF}
end;
function TDCStatHelper.mtime: TFileTimeEx;
@ -348,6 +376,7 @@ end;
{$ENDIF}
function fputimes( path:pchar; times:Array of UnixType.timeval ): cint; cdecl; external clib name 'utimes';
function flutimes( path:pchar; times:Array of UnixType.timeval ): cint; cdecl; external clib name 'lutimes';
function DC_FileSetTime(const FileName: String;
const mtime : TFileTimeEx;
@ -373,7 +402,22 @@ begin
{$ENDIF}
end;
// Like DC_FileSetTime but uses lutimes() instead of utimes(), so the
// timestamp is set on the symlink itself rather than its target.
function DC_SymLinkSetTime(const FileName: String;
const mtime : TFileTimeEx;
const atime : TFileTimeEx ): Boolean;
var
timevals: Array[0..1] of UnixType.timeval;
begin
// last access time
timevals[0].tv_sec:= atime.sec;
timevals[0].tv_usec:= round( Extended(atime.nanosec) / 1000.0 );
// last modification time
timevals[1].tv_sec:= mtime.sec;
timevals[1].tv_usec:= round( Extended(mtime.nanosec) / 1000.0 );
Result:= flutimes(pchar(UTF8ToSys(FileName)), timevals) = 0;
end;
{$IF DEFINED(BSD)}
type rlim_t = Int64;
@ -394,26 +438,44 @@ const
{$ENDIF}
procedure tzset(); cdecl; external clib;
function sysconf(name: cint): clong; cdecl; external clib;
function mktime(tp: PTimeStruct): TTime; cdecl; external clib;
function localtime_r(timer: PTime; tp: PTimeStruct): PTimeStruct; cdecl; external clib;
function lchown(path : PChar; owner : TUid; group : TGid): cInt; cdecl; external clib;
{$IF DEFINED(LINUX)}
function fdatasync(fd: cint): cint; cdecl; external clib;
function fallocate(fd: cint; mode: cint; offset, len: coff_t): cint; cdecl; external clib;
{$ENDIF}
function lremovexattr(const path, name: PAnsiChar): cint; cdecl; external clib;
function llistxattr(const path: PAnsiChar; list: PAnsiChar; size: csize_t): ssize_t; cdecl; external clib;
function lgetxattr(const path, name: PAnsiChar; value: Pointer; size: csize_t): ssize_t; cdecl; external clib;
function lsetxattr(const path, name: PAnsiChar; const value: Pointer; size: csize_t; flags: cint): cint; cdecl; external clib;
{$IF DEFINED(LINUX) OR DEFINED(FREEBSD)}
var
hLibC: TLibHandle = NilHandle;
procedure LoadCLibrary;
begin
hLibC:= mbLoadLibrary(mbGetModuleName(@tzset));
end;
{$ENDIF}
{$IF DEFINED(LINUX) OR DEFINED(BSD)}
var
close_range: function(first: cuint; last: cuint; flags: cint): cint; cdecl = nil;
{$ENDIF}
procedure FileCloseOnExecAll;
const
MAX_FD = 1024;
var
fd: cint;
p: TRLimit;
fd_max: rlim_t = RLIM_INFINITY;
begin
{$IF DEFINED(LINUX) OR DEFINED(BSD)}
if Assigned(close_range) then
begin
close_range(3, High(Int32), CLOSE_RANGE_CLOEXEC);
Exit;
end;
{$ENDIF}
if (FpGetRLimit(RLIMIT_NOFILE, @p) = 0) and (p.rlim_cur <> RLIM_INFINITY) then
fd_max:= p.rlim_cur
else begin
@ -421,8 +483,8 @@ begin
fd_max:= sysconf(_SC_OPEN_MAX);
{$ENDIF}
end;
if fd_max = RLIM_INFINITY then
fd_max:= High(Byte);
if (fd_max = RLIM_INFINITY) or (fd_max > MAX_FD) then
fd_max:= MAX_FD;
for fd:= 3 to cint(fd_max) do
FileCloseOnExec(fd);
end;
@ -454,21 +516,22 @@ begin
begin
if (I = 1) then
sTemp:= PathDelim
else
else begin
sTemp:= Copy(FileName, 1, I - 1);
end;
// Stat for current directory
if (fpLStat(sTemp, recStat) < 0) then Continue;
// If it is a link then checking link destination
if fpS_ISLNK(recStat.st_mode) then
begin
sTemp:= fpReadlink(sTemp);
sTemp:= mbReadAllLinks(sTemp);
Result:= FindMountPointPath(sTemp);
Exit;
end;
// Check device ID
if (recStat.st_dev <> st_dev) then
begin
Result:= Copy(FileName, 1, J);
Result:= IncludeTrailingPathDelimiter(Copy(FileName, 1, J));
Exit;
end;
J:= I;
@ -505,6 +568,7 @@ begin
if (fpFStatFS(Handle, @Sbfs) = 0) then
begin
case UInt32(Sbfs.fstype) of
NFS_SUPER_MAGIC,
SMB_SUPER_MAGIC,
SMB2_MAGIC_NUMBER,
CIFS_MAGIC_NUMBER: Exit;
@ -558,103 +622,28 @@ begin
Result := fallocate(fd, mode, offset, len);
if Result = -1 then fpseterrno(fpgetCerrno);
end;
function mbFileGetXattr(const FileName: String): TStringArray;
var
AList: String;
ALength: ssize_t;
AFileName: String;
begin
SetLength(AList, MaxSmallint);
Result:= Default(TStringArray);
AFileName:= CeUtf8ToSys(FileName);
ALength:= llistxattr(PAnsiChar(AFileName), Pointer(AList), Length(AList));
if (ALength < 0) then
begin
if (fpgetCerrno <> ESysERANGE) then
begin
fpseterrno(fpgetCerrno);
Exit;
end
else begin
ALength:= llistxattr(PAnsiChar(AFileName), nil, 0);
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit;
end;
SetLength(AList, ALength);
ALength:= llistxattr(PAnsiChar(AFileName), Pointer(AList), ALength);
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit;
end;
end;
end;
if (ALength > 0) then
begin
SetLength(AList, ALength - 1);
Result:= AList.Split(#0);
end;
end;
function mbFileCopyXattr(const Source, Target: String): Boolean;
var
Value: String;
Index: Integer;
ALength: ssize_t;
Names: TStringArray;
ASource, ATarget: String;
begin
Result:= True;
ASource:= CeUtf8ToSys(Source);
ATarget:= CeUtf8ToSys(Target);
// Remove attributes from target
Names:= mbFileGetXattr(Target);
for Index:= 0 to High(Names) do
begin
lremovexattr(PAnsiChar(ATarget), PAnsiChar(Names[Index]));
end;
SetLength(Value, MaxSmallint);
Names:= mbFileGetXattr(Source);
for Index:= 0 to High(Names) do
begin
ALength:= lgetxattr(PAnsiChar(ASource), PAnsiChar(Names[Index]), Pointer(Value), Length(Value));
if (ALength < 0) then
begin
if (fpgetCerrno <> ESysERANGE) then
begin
fpseterrno(fpgetCerrno);
Exit(False);
end
else begin
ALength:= lgetxattr(PAnsiChar(ASource), PAnsiChar(Names[Index]), nil, 0);
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit(False);
end;
SetLength(Value, ALength);
ALength:= lgetxattr(PAnsiChar(ASource), PAnsiChar(Names[Index]), Pointer(Value), Length(Value));
if ALength < 0 then
begin
fpseterrno(fpgetCerrno);
Exit(False);
end;
end;
end;
if (lsetxattr(PAnsiChar(ATarget), PAnsiChar(Names[Index]), Pointer(Value), ALength, 0) < 0) then
begin
fpseterrno(fpgetCerrno);
Exit(fpgeterrno = ESysEOPNOTSUPP);
end;
end;
end;
{$ENDIF}
initialization
procedure Initialize;
begin
tzset();
{$IF DEFINED(LINUX) OR DEFINED(FREEBSD)}
LoadCLibrary;
{$IF DEFINED(LINUX)}
KernVersion:= BEtoN(DosVersion);
// Linux kernel >= 5.11
if KernVersion >= $50B then
{$ENDIF}
begin
Pointer(close_range):= GetProcAddress(hLibC, 'close_range');
end;
{$ELSEIF DEFINED(DARWIN)}
close_range:= @CloseRange;
{$ENDIF}
end;
initialization
Initialize;
end.

40
components/doublecmd/dcxmlconfig.pas Normal file → Executable file
View file

@ -6,6 +6,7 @@
Based on XmlConf from fcl-xml package.
Copyright (C) 2010 Przemyslaw Nagay (cobines@gmail.com)
Copyright (C) 2013-2023 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -21,6 +22,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit DCXmlConfig;
{$mode objfpc}{$H+}
@ -117,7 +119,7 @@ type
// ------------------------------------------------------------------------
procedure GetFont(const aNode: TXmlNode; Path: TXmlPath;
out Name: String; out Size: Integer; out Style, Quality: Integer;
var Name: String; var Size: Integer; var Style, Quality: Integer;
const DefName: String; const DefSize: Integer; const DefStyle, DefQuality: Integer);
procedure SetFont(const aNode: TXmlNode; Path: TXmlPath;
@ -149,7 +151,10 @@ type
implementation
uses
LazLogger, DCOSUtils, DCClassesUtf8, URIParser;
LazLogger, DCBasicTypes, DCOSUtils, DCClassesUtf8, URIParser;
const
XML_READER_FLAGS = [xrfAllowSpecialCharsInAttributeValue];
const
BoolStrings: array[Boolean] of DOMString = ('False', 'True');
@ -525,7 +530,7 @@ begin
try
if FileStream.Size = 0 then
raise EXmlConfigEmpty.Create('');
ReadXMLFile(TmpDoc, FileStream, FilenameToURI(AFilename), []);
ReadXMLFile(TmpDoc, FileStream, FilenameToURI(AFilename), XML_READER_FLAGS);
if TmpDoc.DocumentElement.NodeName <> ApplicationName then
raise EXMLReadError.Create('Root element is not <' + ApplicationName + '>.');
FDoc.Free;
@ -541,18 +546,19 @@ var
begin
if AStream.Size = 0 then
raise EXmlConfigEmpty.Create('');
ReadXMLFile(TmpDoc, AStream, []);
ReadXMLFile(TmpDoc, AStream, XML_READER_FLAGS);
FDoc.Free;
FDoc := TmpDoc;
end;
procedure TXmlConfig.WriteToFile(const AFilename: String);
var
FileStream: TStream;
FileStream: TFileStreamEx;
begin
FileStream := TFileStreamEx.Create(AFilename, fmCreate or fmShareDenyWrite);
try
WriteToStream(FileStream);
FileStream.Flush;
finally
FileStream.Free;
end;
@ -611,6 +617,8 @@ end;
function TXmlConfig.Save: Boolean;
var
AFileName: String;
dwAttr: TFileAttrs;
bFileExists: Boolean;
sTmpConfigFileName: String;
begin
@ -619,17 +627,25 @@ begin
if FFileName = '' then
Exit;
bFileExists := mbFileExists(FileName);
dwAttr := mbFileGetAttr(FileName);
bFileExists := (dwAttr <> faInvalidAttributes) and (not FPS_ISDIR(dwAttr));
if bFileExists and FPS_ISLNK(dwAttr) then
AFileName := mbReadAllLinks(FileName)
else begin
AFileName := FileName;
end;
// Write to temporary file and if successfully written rename to proper name.
if (not bFileExists) or mbFileAccess(FileName, fmOpenWrite or fmShareDenyWrite) then
if (not bFileExists) or mbFileAccess(AFileName, fmOpenWrite or fmShareDenyWrite) then
begin
sTmpConfigFileName := GetTempName(FileName);
sTmpConfigFileName := GetTempName(AFileName);
try
WriteToFile(sTmpConfigFileName);
if bFileExists then begin
mbFileCopyAttr(FileName, sTmpConfigFileName, [caoCopyOwnership, caoCopyPermissions]);
mbFileCopyAttr(AFileName, sTmpConfigFileName, [caoCopyOwnership, caoCopyPermissions]);
end;
if not mbRenameFile(sTmpConfigFileName, FileName) then
if not mbRenameFile(sTmpConfigFileName, AFileName) then
begin
mbDeleteFile(sTmpConfigFileName);
DebugLogger.Debugln('Cannot save configuration file ', FileName);
@ -776,8 +792,8 @@ begin
end;
end;
procedure TXmlConfig.GetFont(const aNode: TXmlNode; Path: TXmlPath; out
Name: String; out Size: Integer; out Style, Quality: Integer;
procedure TXmlConfig.GetFont(const aNode: TXmlNode; Path: TXmlPath; var
Name: String; var Size: Integer; var Style, Quality: Integer;
const DefName: String; const DefSize: Integer; const DefStyle,
DefQuality: Integer);
begin

View file

@ -8,6 +8,8 @@
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="iconvenc"/>
<OtherUnitFiles Value="iconvenc"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Conditionals Value="if (TargetCPU &lt;> &apos;arm&apos;) then
@ -34,8 +36,8 @@ end"/>
</CompilerOptions>
<Description Value="Common units for Double Commander"/>
<License Value="GNU GPL 2"/>
<Version Minor="4" Release="1"/>
<Files Count="12">
<Version Minor="4" Release="3"/>
<Files Count="13">
<Item1>
<Filename Value="dcclassesutf8.pas"/>
<UnitName Value="DCClassesUtf8"/>
@ -84,6 +86,10 @@ end"/>
<Filename Value="dcjsonconfig.pas"/>
<UnitName Value="DCJsonConfig"/>
</Item12>
<Item13>
<Filename Value="dcclasses.pas"/>
<UnitName Value="DCClasses"/>
</Item13>
</Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="2">

View file

@ -1,17 +1,17 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit doublecmd_common;
{$warn 5023 off : no warning about unused units}
interface
uses
DCClassesUtf8, DCOSUtils, DCStrUtils, DCBasicTypes, DCFileAttributes,
DCConvertEncoding, DCDateTimeUtils, DCXmlConfig, DCProcessUtf8,
DCUnicodeUtils, DCStringHashListUtf8, DCJsonConfig;
implementation
end.
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit doublecmd_common;
{$warn 5023 off : no warning about unused units}
interface
uses
DCClassesUtf8, DCOSUtils, DCStrUtils, DCBasicTypes, DCFileAttributes,
DCConvertEncoding, DCDateTimeUtils, DCXmlConfig, DCProcessUtf8,
DCUnicodeUtils, DCStringHashListUtf8, DCJsonConfig, DCClasses;
implementation
end.

View file

@ -0,0 +1,106 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2000 by Marco van de Voort(marco@freepascal.org)
member of the Free Pascal development team
libiconv header translation + a helper routine
http://wiki.freepascal.org/iconvenc Dynamic version
See the file COPYING.FPC, included in this distribution,
for details about the copyright. (LGPL)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}
unit dc_iconvenc_dyn;
interface
{$mode objfpc}{$H+}
uses
ctypes,unixtype,baseunix,
dl,
initc;
const
n = 1;
{$ifdef beos}
ESysEILSEQ = EILSEQ;
{$endif}
type
piconv_t = ^iconv_t;
iconv_t = pointer;
Ticonv_open = function(__tocode: pchar; __fromcode: pchar): iconv_t; cdecl;
Ticonv = function(__cd: iconv_t; __inbuf: ppchar; __inbytesleft: psize_t; __outbuf: ppchar; __outbytesleft: psize_t): size_t; cdecl;
Ticonv_close = function(__cd: iconv_t): cint; cdecl;
var
iconv_lib: pointer;
iconv_open: Ticonv_open;
iconv: Ticonv;
iconv_close: Ticonv_close;
IconvLibFound: boolean = False;
function TryLoadLib(LibName: string; var error: string): boolean; // can be used to load non standard libname
function Iconvert(s: string; var res: string; const FromEncoding, ToEncoding: string): cint;
function InitIconv(var error: string): boolean;
implementation
function TryLoadLib(LibName: string; var error: string): boolean;
function resolvesymbol (var funcptr; symbol: string): Boolean;
begin
pointer(funcptr) := pointer(dlsym(iconv_lib, pchar(symbol)));
result := assigned(pointer(funcptr));
if not result then
error := error+#13#10+dlerror();
end;
var
res: boolean;
begin
result := false;
Error := Error+#13#10'Trying '+LibName;
iconv_lib := dlopen(pchar(libname), RTLD_NOW);
if Assigned(iconv_lib) then
begin
result := true;
result := result and resolvesymbol(pointer(iconv),'iconv');
result := result and resolvesymbol(pointer(iconv_open),'iconv_open');
result := result and resolvesymbol(pointer(iconv_close),'iconv_close');
if not result then
begin
result:=true;
result := result and resolvesymbol(pointer(iconv),'libiconv');
result := result and resolvesymbol(pointer(iconv_open),'libiconv_open');
result := result and resolvesymbol(pointer(iconv_close),'libiconv_close');
end;
// if not res then
// dlclose(iconv_lib);
end else
error:=error+#13#10+dlerror();
end;
function InitIconv(var error: string): boolean;
begin
result := true;
error := '';
if not TryLoadLib('libc.so.6', error) then
if not TryLoadLib('libiconv.so', error) then
{$if defined(haiku)}
if not TryLoadLib('libtextencoding.so', error) then
{$ifend}
result := false;
iconvlibfound := iconvlibfound or result;
end;
{$i dc_iconvert.inc}
end.

View file

@ -0,0 +1,53 @@
function Iconvert(S: string; var Res: string; const FromEncoding, ToEncoding: string): cint;
var
InLen, OutLen, Offset: size_t;
Src, Dst: pchar;
H: iconv_t;
lerr: cint;
iconvres: size_t;
begin
H := iconv_open(PChar(ToEncoding), PChar(FromEncoding));
if h=Iconv_t(-1) then
begin
Res := S;
exit(-1);
end;
try
InLen:=Length(s);
outlen:=InLen;
setlength(res,outlen);
Src := PChar(S);
Dst := PChar(Res);
while InLen > 0 do
begin
iconvres := iconv(H, @Src, @InLen, @Dst, @OutLen);
if iconvres = size_t(-1) then
begin
lerr := cerrno;
if lerr = ESysEILSEQ then // unknown char, skip
begin
Inc(Src);
Dec(InLen);
end
else
if lerr = ESysE2BIG then
begin
Offset := Dst - PChar(Res);
SetLength(Res, Length(Res)+InLen*2+5); // 5 is minimally one utf-8 char
Dst := PChar(Res) + Offset;
OutLen := Length(Res) - Offset;
end
else
exit(-1)
end;
end;
finally
setlength(Res,Length(Res) - Outlen);
iconv_close(H);
end;
Result := 0;
end;

View file

@ -1,370 +0,0 @@
Index: gifanim.pas
===================================================================
--- gifanim.pas (revision none)
+++ gifanim.pas (working copy)
@@ -26,7 +26,7 @@
uses
Classes, LCLProc, Lresources, SysUtils, Controls, Graphics, ExtCtrls,
- IntfGraphics, FPimage, Contnrs, GraphType, dialogs;
+ IntfGraphics, FPimage, Contnrs, GraphType, dialogs, types;
const
@@ -193,7 +193,7 @@
procedure DoAutoSize; override;
procedure DoStartAnim;
procedure DoStopAnim;
- class function GetControlClassDefaultSize: TPoint; override;
+ class function GetControlClassDefaultSize: TSize; override;
procedure GifChanged;
procedure LoadFromFile(const Filename: string); virtual;
procedure Paint; override;
@@ -203,6 +203,8 @@
{ Public declarations }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
+ procedure NextFrame;
+ procedure PriorFrame;
property Empty: boolean Read FEmpty;
property GifBitmaps: TGifList Read FGifBitmaps;
property GifIndex: integer Read FCurrentImage;
@@ -237,28 +239,9 @@
implementation
-uses LazIDEIntf, propedits;
-Type
- TGifFileNamePropertyEditor=class(TFileNamePropertyEditor)
- protected
- function GetFilter: String; override;
- function GetInitialDirectory: string; override;
- end;
-function TGifFileNamePropertyEditor.GetFilter: String;
-begin
- Result := 'GIF|*.gif';
-end;
-
-function TGifFileNamePropertyEditor.GetInitialDirectory: string;
-begin
- Result:= ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
-end;
-
procedure Register;
begin
RegisterComponents('Wile64', [TGifAnim]);
- RegisterPropertyEditor(TypeInfo(String),
- TGifAnim, 'FileName', TGifFileNamePropertyEditor);
end;
{ TGifAnim }
@@ -268,7 +251,7 @@
inherited Create(AOwner);
ControlStyle := [csCaptureMouse, csClickEvents, csDoubleClicks];
AutoSize := True;
- SetInitialBounds(0, 0, GetControlClassDefaultSize.X, GetControlClassDefaultSize.Y);
+ SetInitialBounds(0, 0, GetControlClassDefaultSize.CX, GetControlClassDefaultSize.CY);
FEmpty := True;
FCurrentImage := 0;
CurrentView := TBitmap.Create;
@@ -295,6 +278,59 @@
CurrentView.Free;
end;
+procedure TGifAnim.NextFrame;
+begin
+ if (not FEmpty) and Visible and (not FAnimate) then
+ begin
+ if FCurrentImage >= GifBitmaps.Count - 1 then
+ FCurrentImage := 0
+ else
+ Inc(FCurrentImage);
+ if Assigned(FOnFrameChanged) then
+ FOnFrameChanged(Self);
+ Repaint;
+ end;
+end;
+
+procedure TGifAnim.PriorFrame;
+var
+ DesiredImage: Integer;
+begin
+ if (not FEmpty) and Visible and (not FAnimate) then
+ begin
+ if FCurrentImage = 0 then
+ DesiredImage:= GifBitmaps.Count - 1
+ else
+ DesiredImage:= FCurrentImage - 1;
+ // For proper display repaint image from first frame to desired frame
+ FCurrentImage:= 0;
+ while FCurrentImage < DesiredImage do
+ begin
+ with GifBitmaps.Items[FCurrentImage] do
+ begin
+ BufferImg.Canvas.Brush.Color := (Self.Color);
+ if FCurrentImage = 0 then
+ BufferImg.Canvas.FillRect(Rect(0, 0, Width, Height));
+ if Delay <> 0 then
+ FWait.Interval := Delay * 10;
+ BufferImg.Canvas.Draw(PosX, PosY, Bitmap);
+ case Method of
+ //0 : Not specified...
+ //1 : No change Background
+ 2: BufferImg.Canvas.FillRect(
+ Rect(PosX, PosY, Bitmap.Width + PosX, Bitmap.Height + PosY));
+
+ 3: BufferImg.Canvas.FillRect(Rect(0, 0, Width, Height));
+ end;
+ end;
+ Inc(FCurrentImage);
+ end;
+ if Assigned(FOnFrameChanged) then
+ FOnFrameChanged(Self);
+ Repaint;
+ end;
+end;
+
function TGifAnim.LoadFromLazarusResource(const ResName: String): boolean;
var
GifLoader: TGifLoader;
@@ -340,12 +376,13 @@
begin
if (not Empty) and Visible then
begin
- if FCurrentImage > GifBitmaps.Count - 1 then
- FCurrentImage := 0;
- if assigned(FOnFrameChanged) then
- FOnFrameChanged(self);
- Paint;
- Inc(FCurrentImage);
+ if FCurrentImage >= GifBitmaps.Count - 1 then
+ FCurrentImage := 0
+ else
+ Inc(FCurrentImage);
+ if Assigned(FOnFrameChanged) then
+ FOnFrameChanged(Self);
+ Repaint;
end;
end;
@@ -365,27 +402,12 @@
end;
procedure TGifAnim.SetFileName(const AValue: string);
-var
- fn: string;
begin
-
- if (FFileName = AValue) then
- exit;
+ if (FFileName = AValue) then Exit;
FFileName := AValue;
ResetImage;
- if (FFileName = '') then exit;
- if (csDesigning in ComponentState) then
- begin
- fn:= ExtractFileName(AValue);
- FFileName:= ExtractFilePath(AValue);
- FFileName:= ExtractRelativepath(ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile) ,FFileName);
- FFileName:=FFileName+fn;
- LoadFromFile(FFileName+fn);
- end
- else begin
- FFileName := AValue;
- LoadFromFile(FFileName);
- end;
+ if (FFileName = '') then Exit;
+ LoadFromFile(FFileName);
if not Empty then
GifChanged;
end;
@@ -441,10 +463,10 @@
end;
end;
-class function TGifAnim.GetControlClassDefaultSize: TPoint;
+class function TGifAnim.GetControlClassDefaultSize: TSize;
begin
- Result.X := 90;
- Result.Y := 90;
+ Result.CX := 90;
+ Result.CY := 90;
end;
procedure TGifAnim.GifChanged;
Index: gifanimdsgn.pas
===================================================================
--- gifanimdsgn.pas (revision 0)
+++ gifanimdsgn.pas (revision 0)
@@ -0,0 +1,41 @@
+unit GifAnimDsgn;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ LazIDEIntf, PropEdits;
+
+Type
+ TGifFileNamePropertyEditor = class(TFileNamePropertyEditor)
+ protected
+ function GetFilter: String; override;
+ function GetInitialDirectory: string; override;
+ end;
+
+procedure Register;
+
+implementation
+
+uses
+ SysUtils, GifAnim;
+
+function TGifFileNamePropertyEditor.GetFilter: String;
+begin
+ Result := 'GIF|*.gif';
+end;
+
+function TGifFileNamePropertyEditor.GetInitialDirectory: string;
+begin
+ Result:= ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
+end;
+
+procedure Register;
+begin
+ RegisterPropertyEditor(TypeInfo(String), TGifAnim,
+ 'FileName', TGifFileNamePropertyEditor);
+end;
+
+end.
+
Index: pkg_gifanim.lpk
===================================================================
--- pkg_gifanim.lpk (revision none)
+++ pkg_gifanim.lpk (working copy)
@@ -1,15 +1,21 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
- <Package Version="3">
+ <Package Version="4">
<PathDelim Value="\"/>
<Name Value="pkg_gifanim"/>
+ <AddToProjectUsesSection Value="True"/>
<Author Value="Laurent Jacques"/>
<CompilerOptions>
- <Version Value="8"/>
+ <Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
- <OtherUnitFiles Value="$(LazarusDir)\ide\"/>
+ <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
+ <Linking>
+ <Debugging>
+ <DebugInfoType Value="dsDwarf2Set"/>
+ </Debugging>
+ </Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
@@ -33,15 +39,16 @@
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">
<Item1>
- <PackageName Value="FCL"/>
+ <PackageName Value="LCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
<Item2>
- <PackageName Value="IDEIntf"/>
+ <PackageName Value="FCL"/>
+ <MinVersion Major="1" Valid="True"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
- <UnitPath Value="$(PkgOutDir)\"/>
+ <UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
Index: pkg_gifanim_dsgn.lpk
===================================================================
--- pkg_gifanim_dsgn.lpk (revision 0)
+++ pkg_gifanim_dsgn.lpk (revision 0)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <Package Version="4">
+ <PathDelim Value="\"/>
+ <Name Value="pkg_gifanim_dsgn"/>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <PathDelim Value="\"/>
+ <SearchPaths>
+ <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ <Linking>
+ <Debugging>
+ <DebugInfoType Value="dsDwarf2Set"/>
+ </Debugging>
+ </Linking>
+ <Other>
+ <CompilerMessages>
+ <MsgFileName Value=""/>
+ </CompilerMessages>
+ <CompilerPath Value="$(CompPath)"/>
+ </Other>
+ </CompilerOptions>
+ <License Value="GPL"/>
+ <Version Major="1" Minor="4"/>
+ <Files Count="1">
+ <Item1>
+ <Filename Value="gifanimdsgn.pas"/>
+ <HasRegisterProc Value="True"/>
+ <UnitName Value="GifAnimDsgn"/>
+ </Item1>
+ </Files>
+ <Type Value="DesignTime"/>
+ <RequiredPkgs Count="2">
+ <Item1>
+ <PackageName Value="IDEIntf"/>
+ </Item1>
+ <Item2>
+ <PackageName Value="pkg_gifanim"/>
+ </Item2>
+ </RequiredPkgs>
+ <UsageOptions>
+ <UnitPath Value="$(PkgOutDir)"/>
+ </UsageOptions>
+ <PublishOptions>
+ <Version Value="2"/>
+ </PublishOptions>
+ </Package>
+</CONFIG>
Index: pkg_gifanim_dsgn.pas
===================================================================
--- pkg_gifanim_dsgn.pas (revision 0)
+++ pkg_gifanim_dsgn.pas (revision 0)
@@ -0,0 +1,21 @@
+{ This file was automatically created by Lazarus. Do not edit!
+ This source is only used to compile and install the package.
+ }
+
+unit pkg_gifanim_dsgn;
+
+interface
+
+uses
+ GifAnimDsgn, LazarusPackageIntf;
+
+implementation
+
+procedure Register;
+begin
+ RegisterUnit('GifAnimDsgn', @GifAnimDsgn.Register);
+end;
+
+initialization
+ RegisterPackage('pkg_gifanim_dsgn', @Register);
+end.

View file

@ -1,25 +0,0 @@
LazarusResources.Add('tgifanim','XPM',[
'/* XPM */'#13#10'static char * gifanim_xpm[] = {'#13#10'"24 24 31 1",'#13#10
+'" '#9'c None",'#13#10'".'#9'c #959595",'#13#10'"+'#9'c #E1E1E1",'#13#10'"@'
+#9'c #919191",'#13#10'"#'#9'c #848484",'#13#10'"$'#9'c #888888",'#13#10'"%'#9
+'c #EEEEEE",'#13#10'"&'#9'c #E6E9EC",'#13#10'"*'#9'c #D6DFE8",'#13#10'"='#9
+'c #FFFFFF",'#13#10'"-'#9'c #E7F0F9",'#13#10'";'#9'c #3783CE",'#13#10'">'#9
+'c #FFF7F7",'#13#10'",'#9'c #FFEFEF",'#13#10'"'''#9'c #F7F2F5",'#13#10'")'#9
+'c #F7FAFD",'#13#10'"!'#9'c #FF5757",'#13#10'"~'#9'c #FFDFDF",'#13#10'"{'#9
+'c #FF4F4F",'#13#10'"]'#9'c #FFD7D7",'#13#10'"^'#9'c #FF4747",'#13#10'"/'#9
+'c #FF3F3F",'#13#10'"('#9'c #8D8D8D",'#13#10'"_'#9'c #EEE6E6",'#13#10'":'#9
+'c #EED6D6",'#13#10'"<'#9'c #EECECE",'#13#10'"['#9'c #FAFAFA",'#13#10'"}'#9
+'c #F2F2F2",'#13#10'"|'#9'c #F6F6F6",'#13#10'"1'#9'c #A2A2A2",'#13#10'"2'#9
+'c #FAF2F2",'#13#10'" .++@ @++. ",'#13#10'" @@@##$$$$$$$$$$$$##'
+'@@@ ",'#13#10'" .++$#$$$$$$$$$$$$#$++. ",'#13#10'" .++@+%%&**&&**&%%+@++. "'
+','#13#10'" @@@@%==-;;--;;-==%@@@@ ",'#13#10'" .++.%==-;;--;;-==%.++. ",'#13
+#10'" .++.%>,''--))--'',>%.++. ",'#13#10'" @@@@%,!~>====>~!,%@@@@ ",'#13#10
+'" .++.%>~{]~~~~]{~>%.++. ",'#13#10'" .++.%=>~^////^~>=%.++. ",'#13#10'" @@@'
+'(+%%_:<<<<:_%%+(@@@ ",'#13#10'" .++$#$$$$$$$$$$$$#$++. ",'#13#10'" .++$#$$$'
+'$$$$$$$$$#$++. ",'#13#10'" @@@(+%%&**&%%%%%%+(@@@ ",'#13#10'" .++.%==-;;-[}'
+'}[==%.++. ",'#13#10'" .++.%==-;;-|11|==%.++. ",'#13#10'" @@@@%>,''--)[}}2,>'
+'%@@@@ ",'#13#10'" .++.%,!~>====>~!,%.++. ",'#13#10'" .++.%>~{]~~~~]{~>%.++.'
+' ",'#13#10'" @@@@%=>~^////^~>=%@@@@ ",'#13#10'" .++@+%%_:<<<<:_%%+@++. ",'
+#13#10'" .++$#$$$$$$$$$$$$#$++. ",'#13#10'" @@@##$$$$$$$$$$$$##@@@ ",'#13#10
+'" .++@ @++. "};'#13#10
]);

File diff suppressed because it is too large Load diff

View file

@ -1,41 +0,0 @@
unit GifAnimDsgn;
{$mode objfpc}{$H+}
interface
uses
LazIDEIntf, PropEdits;
Type
TGifFileNamePropertyEditor = class(TFileNamePropertyEditor)
protected
function GetFilter: String; override;
function GetInitialDirectory: string; override;
end;
procedure Register;
implementation
uses
SysUtils, GifAnim;
function TGifFileNamePropertyEditor.GetFilter: String;
begin
Result := 'GIF|*.gif';
end;
function TGifFileNamePropertyEditor.GetInitialDirectory: string;
begin
Result:= ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
end;
procedure Register;
begin
RegisterPropertyEditor(TypeInfo(String), TGifAnim,
'FileName', TGifFileNamePropertyEditor);
end;
end.

View file

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="pkg_gifanim"/>
<AddToProjectUsesSection Value="True"/>
<Author Value="Laurent Jacques"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="Show Gif Animation
"/>
<License Value="GPL
"/>
<Version Major="1" Minor="5"/>
<Files Count="2">
<Item1>
<Filename Value="gifanim.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="GifAnim"/>
</Item1>
<Item2>
<Filename Value="gifanim.lrs"/>
<Type Value="LRS"/>
</Item2>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="LCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -1,21 +0,0 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit pkg_gifanim;
interface
uses
GifAnim, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('GifAnim', @GifAnim.Register);
end;
initialization
RegisterPackage('pkg_gifanim', @Register);
end.

View file

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="4">
<PathDelim Value="\"/>
<Name Value="pkg_gifanim_dsgn"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<License Value="GPL"/>
<Version Major="1" Minor="4"/>
<Files Count="1">
<Item1>
<Filename Value="gifanimdsgn.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="GifAnimDsgn"/>
</Item1>
</Files>
<Type Value="DesignTime"/>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="IDEIntf"/>
</Item1>
<Item2>
<PackageName Value="pkg_gifanim"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -1,21 +0,0 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit pkg_gifanim_dsgn;
interface
uses
GifAnimDsgn, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('GifAnimDsgn', @GifAnimDsgn.Register);
end;
initialization
RegisterPackage('pkg_gifanim_dsgn', @Register);
end.

View file

@ -1,5 +0,0 @@
GifAnim
http://wile64.perso.neuf.fr/download/download.php?cat=4&id=8
Version 1.4 (14/09/2009)
Some modifications done for Double Commander (see doublecmd.diff).

View file

@ -1,28 +0,0 @@
1) Gif in ressource file
-------------------------
- Create ressource file with lazres ex : lazres mygif.lrs gif1.gif gif2.gif
- Put TGifAnim on your form
- In the FormCreate add (see down)
[code]
procedure TForm1.FormCreate(Sender: TObject);
begin
GifAnim1.LoadFromLazarusResource('gif1');
GifAnim2.LoadFromLazarusResource('gif2');
end;
[/code]
- And insert ressouce file in initialization section (see down)
[code]
initialization
{$I unit1.lrs}
{$I mesgif.lrs}
[/code]

View file

@ -1,58 +0,0 @@
/* XPM */
static char * gifanim_xpm[] = {
"24 24 31 1",
" c None",
". c #959595",
"+ c #E1E1E1",
"@ c #919191",
"# c #848484",
"$ c #888888",
"% c #EEEEEE",
"& c #E6E9EC",
"* c #D6DFE8",
"= c #FFFFFF",
"- c #E7F0F9",
"; c #3783CE",
"> c #FFF7F7",
", c #FFEFEF",
"' c #F7F2F5",
") c #F7FAFD",
"! c #FF5757",
"~ c #FFDFDF",
"{ c #FF4F4F",
"] c #FFD7D7",
"^ c #FF4747",
"/ c #FF3F3F",
"( c #8D8D8D",
"_ c #EEE6E6",
": c #EED6D6",
"< c #EECECE",
"[ c #FAFAFA",
"} c #F2F2F2",
"| c #F6F6F6",
"1 c #A2A2A2",
"2 c #FAF2F2",
" .++@ @++. ",
" @@@##$$$$$$$$$$$$##@@@ ",
" .++$#$$$$$$$$$$$$#$++. ",
" .++@+%%&**&&**&%%+@++. ",
" @@@@%==-;;--;;-==%@@@@ ",
" .++.%==-;;--;;-==%.++. ",
" .++.%>,'--))--',>%.++. ",
" @@@@%,!~>====>~!,%@@@@ ",
" .++.%>~{]~~~~]{~>%.++. ",
" .++.%=>~^////^~>=%.++. ",
" @@@(+%%_:<<<<:_%%+(@@@ ",
" .++$#$$$$$$$$$$$$#$++. ",
" .++$#$$$$$$$$$$$$#$++. ",
" @@@(+%%&**&%%%%%%+(@@@ ",
" .++.%==-;;-[}}[==%.++. ",
" .++.%==-;;-|11|==%.++. ",
" @@@@%>,'--)[}}2,>%@@@@ ",
" .++.%,!~>====>~!,%.++. ",
" .++.%>~{]~~~~]{~>%.++. ",
" @@@@%=>~^////^~>=%@@@@ ",
" .++@+%%_:<<<<:_%%+@++. ",
" .++$#$$$$$$$$$$$$#$++. ",
" @@@##$$$$$$$$$$$$##@@@ ",
" .++@ @++. "};

View file

@ -0,0 +1,373 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View file

@ -0,0 +1,15 @@
GifView
Animated GIF Viewer Component
Copyright (C) 2025 Alexander Koblov
License:
MPL 2.0
Based on:
TGIFViewer
https://github.com/jdelauney/TGIFViewer
Original author:
Copyright (C) 2018 J.Delauney (BeanzMaster)

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="5">
<PathDelim Value="\"/>
<Name Value="GifView"/>
<Type Value="RunAndDesignTime"/>
<Author Value="Jérôme Delauney (BeanzMaster), Alexander Koblov"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="source"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
</Linking>
</CompilerOptions>
<Description Value="GIF Viewer"/>
<License Value="MPL-2.0"/>
<Version Major="1"/>
<Files>
<Item>
<Filename Value="source\GifViewerStrConsts.pas"/>
<UnitName Value="GifViewerStrConsts"/>
</Item>
<Item>
<Filename Value="source\uFastBitmap.pas"/>
<UnitName Value="uFastBitmap"/>
</Item>
<Item>
<Filename Value="source\uGifViewer.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="uGifViewer"/>
</Item>
</Files>
<RequiredPkgs>
<Item>
<PackageName Value="LCL"/>
<MinVersion Major="2" Minor="2" Valid="True"/>
</Item>
<Item>
<PackageName Value="FCL"/>
</Item>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -0,0 +1,22 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit GifView;
{$warn 5023 off : no warning about unused units}
interface
uses
GifViewerStrConsts, uFastBitmap, uGifViewer, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('uGifViewer', @uGifViewer.Register);
end;
initialization
RegisterPackage('GifView', @Register);
end.

Binary file not shown.

View file

@ -0,0 +1,36 @@
Unit GifViewerStrConsts;
{$mode objfpc}{$H+}
Interface
ResourceString
// Messages d'erreurs ou de notifications
// Error or notification messages
//uGifViewer
rsScreenBadColorSize = 'Invalid number of colors in the global palette.';
rsImageBadColorSize = 'Number of colors is invalid in local palette.';
rsBadSignature = 'GIF invalid signature: %s';
rsBadScreenSize = 'Invalid image size: %dx%d';
rsEmptyColorMap = 'Error no palette of color available for this image!';
rsEmptyImage = 'The picture is empty';
rsUnknownVersion = 'Unknown GIF version';
rsFileNotFound = 'The file %s not found !';
rsResourceNotFound = 'Resource %s not found!';
rsBufferOverFlow = 'Image #%d: The decoder has been stopped to prevent a buffer overflow';
rsInvalidOutputBufferSize = 'Image #%d: The size of the output buffer is invalid (size < = 0)';
rsInvalidInputBufferSize = 'Image #%d: The size of the input buffer is invalid (size < = 0)';
rsInvalidBufferSize = 'Image #%d: The size of the input and output buffer are invalid (size < = 0)';
rsLZWInternalErrorOutputBufferOverflow = 'Output buffer overflow in the GIF LZW decoder buffer. Report this bug. This is a serious bug!';
rsLZWInternalErrorInputBufferOverflow = 'Input buffer overflow in the GIF LZW decoder. Report this bug. This is a serious bug!';
rsLZWInvalidInput = 'Image #%d: The decoder encountered an invalid entry (corrupted data)';
rsLZWOutputBufferTooSmall = 'Image #%d: The decoder could not decode all the data because the output buffer is too small';
rsAllFrameCorrupted = 'All images in the GIF are corrupted. Unable to display GIF file.';
//uFastBitmap
rsBitmapCreateError = 'An Error occured while creating TBitmap';
rsBitmapScanlineOutOfRange = 'Scanline : Index Out of range';
Implementation
End.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Some files were not shown because too many files have changed in this diff Show more