Recent

Author Topic: LazPaint (alpha-blending, antialiasing, filters)  (Read 526902 times)

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #765 on: June 06, 2015, 12:52:09 pm »
Ok.

We will test it when we apply it to LazPaint  8-)
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #766 on: June 06, 2015, 12:52:31 pm »
Ok seems that this never ends... fixed to really work on OS newer than Windows 7. (sorry, I just tested on Win XP and Win 7, I don't have 8, 8.1 or 10 preview).

Code: [Select]
  { 6.0 vista, 6.1 win 7, 6.2 win 8, 6.3 win 8.1, 10 win 10 }

  Win7 := False;
  if (Win32MajorVersion = dword(6)) and (Win32MinorVersion >= dword(1)) then // Win7, Win8, Win8.1
   Win7 := True;
  if (Win32MajorVersion > dword(6)) then // Newer (windows 10)
   Win7 := True;

Edit: seems that is the same as doing

Win7 := CheckWin32Version(6,1);
« Last Edit: June 06, 2015, 12:56:36 pm by 007 »

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #767 on: June 06, 2015, 02:40:07 pm »
Oh I get it. It was ">=" instead of "=" for Win32MinorVersion.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #768 on: June 06, 2015, 09:00:46 pm »
That is.

One thing left is determine why keys are not deleted (I mean the folders created at registry).

I thing that I removed that key deleting because if you don't do it carefully you can remove stuff from registry that you don't want. (Like all items in Default Programs, yeah, it happened to me.)

Inno Setup has a special way: uninsdeletekeyifempty

If I'm not wrong I removed that from here:
Code: [Select]
function TFileAssociation.DeleteValue(SubKey: string; ValueName: string): boolean;
begin
  Result := FRegistry.OpenKey(SubKey, True);
  if Result then
  begin
    FRegistry.DeleteValue(ValueName);
    FRegistry.DeleteKey(ValueName);
    FRegistry.CloseKey;
  end;
end;

We must add

Code: [Select]
FRegistry.DeleteKey(SubKey) if empty

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #769 on: June 27, 2015, 02:03:33 pm »
Hi,

I just noticed that Inno Setup has the same functionality to handle registry from [ Code ] section. The same as using [Registry].

So you can use RegWriteStringValue and RegDeleteKeyIfEmpty and others with Pascal Script inside an Inno Setup application.

Combined with the capability of Inno Setup of adding custom forms, reading from INI files and other stuff you can create a file association tool that the user can run as administrator from your application (https://support.microsoft.com/en-us/kb/981778) that installs nothing and just is a setup of registry settings.

Another alternative at least.

BTW I still think that keep using Inno Setup is the right one, at least you will not have to deal with user premissions and elevation. You can create a custom form when the user installs LazPaint and then can choose what they want to add or not to right click menu.

But if you want it more flexible, this new option is a good one and the other is just doing it from your lazarus application.

I'm out of options :)
« Last Edit: June 29, 2015, 07:02:17 pm by 007 »

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #770 on: June 27, 2015, 03:23:42 pm »
Thanks. Don't think too much about it though  ;)
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #771 on: June 27, 2015, 07:22:53 pm »
I just remember that because I was changing one of my setup scripts. I know how to use the command line :)

Also I'm making my own 'setup system', already working, is not advanced at all and not to be like inno setup (IMHO the most powerful one), just for fun. It can install and uninstall. Is interesting at least.

Because all that, I posted here.

LOL I just noticed that the forum replaced my [ code ] with the forum tag of the same name in my last post, I mean 'code section' from iss script.
« Last Edit: June 27, 2015, 07:32:19 pm by 007 »

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #772 on: June 28, 2015, 12:39:08 am »
Quote
Also I'm making my own 'setup system', already working, is not advanced at all and not to be like inno setup (IMHO the most powerful one), just for fun. It can install and uninstall. Is interesting at least.
Wow, that's great!

Quote
LOL I just noticed that the forum replaced my [ code ] with the forum tag of the same name in my last post, I mean 'code section' from iss script.
Yes, I figured it out. I suppose you can still edit your message so that it would appear as you intended.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #773 on: July 19, 2015, 10:10:07 pm »
Hi

What about using this http://forum.lazarus.freepascal.org/index.php/topic,29104.msg183145.html#msg183145

instead of lnet? It will remove a dependency at least. It comes with FPC already :)

synapse is good too .. really I'm using synapse, but i'll try this now.

Is just for the update checker, right? And downloading translations.. Hopefully sourceforge get restored soon. With github also you have web space too, maybe works the same for this purpose.

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #774 on: July 20, 2015, 07:48:52 pm »
That's right 007. We could have one less dependency.

Indeed, the online connection is just used to check for the version and download language files. It is a simple HTTP request.

However it is in a thread. I suppose it would be possible to do the query in a thread.

Regards
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #775 on: July 20, 2015, 08:18:04 pm »
That's right 007. We could have one less dependency.

Indeed, the online connection is just used to check for the version and download language files. It is a simple HTTP request.

However it is in a thread. I suppose it would be possible to do the query in a thread.

Regards

I know. I do the same. Without a thread the application gets frozen.

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #776 on: July 20, 2015, 08:46:32 pm »
So we have our solution. I take a note on my todo list.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #777 on: July 21, 2015, 12:58:51 am »
Thankyou!

circular

  • Hero Member
  • *****
  • Posts: 3648
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #778 on: July 21, 2015, 07:33:33 pm »
Thank you for bringing this up!  :)
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 3931
  • Leandro Diaz

 

TinyPortal © 2005-2018