Recent

Author Topic: What version of Powershell  (Read 7201 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: What version of Powershell
« Reply #15 on: October 14, 2019, 10:51:49 am »
You can check out just the newer ssl sources from trunk: no new features are used, so it will work in 3.0.4 too.
I do that quite often if and when I need to support 3.0.4.

Note it is basically your own responsibility to check for the use of new language features, but those are documented.
In this case it is safe.
« Last Edit: October 14, 2019, 10:53:52 am by Thaddy »
Specialize a type, not a var.

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: What version of Powershell
« Reply #16 on: October 14, 2019, 10:52:02 am »
'cos windows users don't have the necessary ssl available, at least when using FPC 3.0.4.
In that case I would have preferred downloading via IE.
(UrlDownloadToFile api or InternetOpenUrl/InternetReadFile if you need more control)

You can also do that without anything visible and you're also sure it is up to date if they use the computer. And should work the same back to XP (assuming they updated ssl but if not, powershell won't work either).

Patching 3.0.4 like Thaddy suggested is of course the best way.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: What version of Powershell
« Reply #17 on: October 14, 2019, 12:39:23 pm »
You can check out just the newer ssl sources from trunk: no new features are used, so it will work in 3.0.4 too.
I do that quite often if and when I need to support 3.0.4.

Note it is basically your own responsibility to check for the use of new language features, but those are documented.
In this case it is safe.

OK, I don't really understand the process. I have an fpc default install using deb packages from source forge. It look to me like you mean I should replace -

Code: Pascal  [Select][+][-]
  1. /usr/lib/x86_64-linux-gnu/fpc/3.0.4/units/x86_64-linux/openssl/fpopenssl.ppu
  2. /usr/lib/x86_64-linux-gnu/fpc/3.0.4/units/x86_64-linux/openssl/openssl.ppu

and rebuild them into the relevent .o files ?   How ?

What about -
Code: Pascal  [Select][+][-]
  1. /usr/share/fpcsrc/3.0.4/packages/openssl
  2. /usr/share/fpcsrc/3.0.4/packages/openssl/src/openssl.pas
  3. /usr/share/fpcsrc/3.0.4/packages/openssl/src/fpopenssl.pp
  4. /usr/share/fpcsrc/3.0.4/packages/winunits-jedi/src/jwarpcssl.pas
  5. /usr/share/fpcsrc/3.0.4/packages/fcl-net/src/sslsockets.pp

David

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: What version of Powershell
« Reply #18 on: October 17, 2019, 07:21:10 am »
Thaddy, any suggestions ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: What version of Powershell
« Reply #19 on: October 17, 2019, 07:53:18 am »
I suggest you do not rebuild, but simply have the newer units in the path. That should be enough.
Specialize a type, not a var.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: What version of Powershell
« Reply #20 on: October 17, 2019, 08:50:25 am »
I suggest you do not rebuild, but simply have the newer units in the path. That should be enough.

The "newer units", you mean the .pp and .pas files from fpc 3.2 ?   To the src tree or the lib tree ?
They will have to be compiled at some stage won't they ?  The originals are in the /usr/ tree so the compiler (running as me) cannot make the *.o files. 

In my fpc320 src tree, the openssl src files are in a subdir structure similar to whats installed in my /usr/share/fpc/3.0.4/packages/ so thats probably where they need to go.   However, I cannot build them there.

Ah, got it, I need to run "make all" up a level but this particular fpc install was done from Ubuntu's repo and does not include the necessary make infrastructure.  I'll move over to my build machine, it should be able to rebuild all we like because I have previously build cross compilers from there.

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: What version of Powershell
« Reply #21 on: October 17, 2019, 09:15:30 am »
Be careful: only the units I mentioned, not all of it! The units I mentioned do not break things because the use no new features.
The simplest is just to include the path to the new units in your project(s). Seems to me you are over-complicating things.
Specialize a type, not a var.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: What version of Powershell
« Reply #22 on: October 17, 2019, 12:14:10 pm »
Hmm, maybe I am over thinking it. I was trying to insert the extra units into the FPC trees, not my project.

However, just adding to my project ? no go.

Firstly, restored my FPC trees and CleanUp and Build. My test code again compiles.

Now, add the  fpc320 files, fpopenssl.pp  openssl.pas  opensslsockets.pp to my test project, cleanup and build.  It fails complaining -

"Fatal: Cannot find sslsockets used by fphttpclient. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/usr/lib/x86_64-linux-gnu/fpc/3.0.4/units/x86_64-linux/fcl-net/sslsockets.ppu.."

fcl-net/sslsockets.ppu is where is should be and untouched since installation.

I can manually add fcl-net/sslsockets.pas to the project but that just leads to another unit not being found ....

Thaddy, your comment about only the units you mentioned ?  Please mention them again, I cannot find where you mentioned them.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: What version of Powershell
« Reply #23 on: October 17, 2019, 01:21:05 pm »
You can only put the source somewhere if no other units depend on those units. Otherwise they also need to be recompiled.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: What version of Powershell
« Reply #24 on: October 17, 2019, 02:07:31 pm »
Thanks Marcov.  I am afraid it does not sound like a very practical solution. I also had a go at installing fpc320 "on the side" so as to not affect my 3.0.4 install but ran into issues there too.

I think I would be better keeping away from these type of solutions, I'll wait for 3.2.0 to be released !

Thanks for your help.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018