Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Third party / Re: C-evo: New Horizons 1.3.0 release
« Last post by Chronos on Today at 06:32:41 pm »
A new version 1.3.2 was released which supports High DPI screens and scale game interface according system settings.

https://app.zdechov.net/c-evo

One interesting thing about this is that C-evo as a game is pretty big project and it has a lots of hard coded user interface dimension constants so it was not as simple as scaling those constants with some scale function or LCL scaling. So I had to use different approach and I have developed scaling layer between the game and LCL called DpiControls https://app.zdechov.net/c-evo/browser/trunk/Packages/DpiControls . Thanks to that layer which contains many components like TButton, TPanel, TEdit, TForm, etc., it is possible to keep hardcoded constants and use them as points instead of pixels. With some additional bitmap handling to make precise graphics drawing, it is now possible to simply scale the game according either system settings or according to custom set DPI. So that would be another approach to add High DPI support for existing app.
2
Windows / Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Last post by msintle on Today at 06:32:02 pm »
I would be in favor if Windows was available for ARM64 and supported various devices such as Raspberry Pi, Organe Pi, etc. I mean the real one, not a substitute in the form of Windows IoT (earlier RT and even earlier CE). But these are more of a dream. Porting WinAPI from AMD64/EM64T to ARM64 is years of work (if it is technically possible). All industrial computers (and the like), if they use Windows, probably only run on AMD64/EM64T. The second thing is the processing power that Windows requires to run. However, for now, ARM is inferior to the AMD64/EM64T family in terms of computing power.

It sounds like you're unaware Windows aarch64 has been shipping on laptops (and tablets) since 2018.

The full Windows API is available and has been for more than half a decade.

Furthermore, not only can Windows aarch64 emulate x86 apps, it can also emulate amd64 apps starting with Windows 11 (although, this doesn't extend to things like major shell extensions, where native code aarch64 is required).

Microsoft released (and upgraded) Surface 9 X as an aarch64 device years ago, and in May this year they are going to launch another major upgrade for it as the consumer Surface 10 device, again implemented as an aarch64 platform - their first major consumer play for the first time on aarch64.

So yes, it is high time Free Pascal and Lazaru supports aarch64 targets on Windows - the only (and ironically, biggest) platform where they lack this support.
3
General / Re: How can i make this window ?
« Last post by Handoko on Today at 06:23:43 pm »
It is relatively easy to write a custom popup, for example this is my Frameless popup in the User Interface section in the link below:

https://wiki.freepascal.org/Portal:HowTo_Demos#User_Interface
4
LCL / Re: Form scaling
« Last post by wp on Today at 06:22:43 pm »
I don't know how CodeTyphon handles form scaling. Maybe it is not compatible to the way Lazarus does it. Is the box "Use LCL Scaling" checked after opening the project in Lazarus? In Windows, you should also make sure that "Use manifest resource" is checked and one of the "on" options in the "DPI awareness" combobox is selected.

But in general: I don't think that it is a good idea to switch between Codetyphon and Lazarus. Either use CodeTyphon, then stay with it. Or use Lazarus, then stay with it, too.
5
Cocoa / Re: CocoaInt.CocoaIconUse no longer recognized?
« Last post by dsiders on Today at 06:22:10 pm »
Code: Pascal  [Select][+][-]
  1. CocoaInt.CocoaIconUse := True;
now gives error
Quote
Idenfier not found CocoaIconUse
Has this been deprecated since removed? (Using recent stable build as downloaded by FPCUpDeluxe)

In Lazarus trunk, it is located in lcl/interfaces/cocoa/cocoaconfig.pas not cocoaint.pas.
6
LCL / Form scaling
« Last post by fxeconomist on Today at 06:11:14 pm »
Hi,

I noticed that as I worked on my project in CodeTyphon at home on my FullHD monitor, there was practically no change when I moved the project on my other computer with UHD resolution.

However, after I migrated the project to Lazarus, I noticed the form Width and Height are in pixels, and the form did not scale.
Is there any property to restore this scaling feature ?
7
Good question. If you insist on including binutils in the flow one thing that seems to work on both new and older versions is to always use gas and ld:
Code: [Select]
fpc -XPx86_64-w64-mingw32- -Aas -n -O4 -Si -Sc -Sg -Xd -CX -XXs -Px86_64 -Rintel -Twin64 -Us system.pas
fpc -XPx86_64-w64-mingw32- -Aas -n -O4 -Si -Sc -Sg -Xd -CX -XXs -Px86_64 -Rintel -Twin64 uefimain.pas
x86_64-w64-mingw32-ld --gc-sections --oformat pei-x86-64 uefimain.o uefi.o system.o -e efi_main -o MAIN.EFI

That works here with -Cg and -r as well:
Code: [Select]
fpc -XPx86_64-w64-mingw32- -Aas -n -O4 -Si -Sc -Sg -Xd -CX -XXs -Px86_64 -Rintel -Twin64 -Cg -Us system.pas
fpc -XPx86_64-w64-mingw32- -Aas -n -O4 -Si -Sc -Sg -Xd -CX -XXs -Px86_64 -Rintel -Twin64 -Cg uefimain.pas
x86_64-w64-mingw32-ld --gc-sections -r --oformat pei-x86-64 uefimain.o uefi.o system.o -e efi_main -o MAIN.EFI
8
I get the error with 0-bit reloc when trying to compile with -shared
When just using "x86_64-w64-mingw32-ld  --gc-sections --oformat pei-x86-64 uefimain.o uefi.o system.o -e efi_main -o MAIN.EFI link.lds" it works fine

Why does it need to be relocatable? As far as I can tell the Win64 code generates position independent code by default, but I'm not an expert on Windows stuff
When I execute the shell code that x86_64-w64-mingw32-ld --gc-sections --oformat pei-x86-64 uefimain.o uefi.o system.o -e efi_main -o main.efi -Tlinker.lds,I got the error that:
x86_64-w64-mingw32-ld: error: 0-bit reloc in dll
uefimain.o:uefimain.pas:(.pdata.n_uefimain_$$_efi_main$pointer$pefi_system_table+0x0): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32NB against `.text.n_uefimain_$$_efi_main$pointer$pefi_system_table'
uefimain.o:uefimain.pas:(.pdata.n_uefimain_$$_efi_main$pointer$pefi_system_table+0x4): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32NB against `.text.n_uefimain_$$_efi_main$pointer$pefi_system_table'
uefimain.o:uefimain.pas:(.pdata.n_uefimain_$$_efi_main$pointer$pefi_system_table+0x8): relocation truncated to fit: IMAGE_REL_AMD64_ADDR32NB against `.xdata.n_uefimain_$$_efi_main$pointer$pefi_system_table'
So how to do to solve these error above,buddy?
9
@VisualLab, CCRDude
Despite I like the enumerators too, they are IMHO just a syntax sugar and much underdeveloped.

Consider the following loop:
Code: Pascal  [Select][+][-]
  1.   for I := Pred(C.Count) downto 0 do
  2.     if SomeCond(C[I]) then
  3.       C.Delete(i);

10
General / Re: pre-processor symbol when FPC symbol is defined/used
« Last post by paule32 on Today at 05:11:35 pm »
Thank you. This works like a charm  ;D
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018