Recent

Author Topic: Online Package Manager  (Read 836050 times)

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #450 on: December 07, 2016, 12:11:45 am »
Hi GetMem, seems that is working really well. I hope you can talk with the lazarus developers (well, with the others, you are one of them now) and include this package as one of the pre-installed with Lazarus, so with that it will become more visible to all developers that open the package menu in the IDE, and more people will use it.

Edit:
@minesadorada

Hi, when you have time remove the AutoAdjustLayout from OnCreate and just check the option Scaled in the object inspector for the form, now is working really well and is the best from now using Lazarus 1.7 to get HighDPI working well.
« Last Edit: December 07, 2016, 12:35:58 am by lainz »

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #451 on: December 07, 2016, 07:50:03 am »
@minesadorada

Hi, when you have time remove the AutoAdjustLayout from OnCreate and just check the option Scaled in the object inspector for the form, now is working really well and is the best from now using Lazarus 1.7 to get HighDPI working well.
@lainz: On my Laz 1.7 Rev 52081M I don't see a Scaled property in the OI - only a PixelsPerInch property
or.. can Scaled:=True be set in Form.Create inside an {$IFDEF} version check, and if so, what is the fallback?
P.S. If I set the form.Autosize=True, and form.Borderwidth=8 the form looks OK on my system.

re trunk: I'm reluctant to mess with my cross-compiling dev environment, unless you can suggest a way to upgrade to trunk in a simple way. (not fpcup)  I have the latest source of trunk - can it be patched in by simply merging with my existing setup somehow?

@GetMem: Just installed latest OPM and the updating goes flawlessly.  Thank you!
1. CryptINI updated OK√
2. I tried to install bgracontrols.  It flagged the dependency OK√ and started the install, but compilation errored out, and OPM correctly offered to cancel OK√

GUI suggestions for future:
I find that what is missing in OPM is an 'UnInstall' button for (an) installed package(s). I know the IDE can do this, but OPM would look better for it.
It would be nice if, in the uncollapsed treeview, the 'Installed' column indicated 'Installed' (or not) for single packages. (some other text for partly-installed multi-packages like bgraBitmap)  It can be a bit of a fiddle expanding/collapsing the treeview all the time for simple info.

This project already exceeds early expectations..
« Last Edit: December 07, 2016, 10:13:01 am by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #452 on: December 07, 2016, 10:26:34 am »
Quote
re trunk: I'm reluctant to mess with my cross-compiling dev environment, unless you can suggest a way to upgrade to trunk in a simple way. (not fpcup)  I have the latest source of trunk - can it be patched in by simply merging with my existing setup somehow?
Since you're under windows, just download Tortoise SVN. To upgrade to trunk just press the "Update" button. Initially you have to do a SVN checkout though. This is why version control was introduced in the first place.

Quote
@GetMem: Just installed latest OPM and the updating goes flawlessly.  Thank you!
1. CryptINI updated OK√
2. I tried to install bgracontrols.  It flagged the dependency OK√ and started the install, but compilation errored out, and OPM correctly offered to cancel OK√
I'm glad it works. I need to fix a few bugs though.

Quote
I find that what is missing in OPM is an 'UnInstall' button for (an) installed package(s). I know the IDE can do this, but OPM would look better for it.
First of all there is no interface implemented yet for uninstalling packages, somebody has to do it first. Secondly OPM was not meant to replace all the functionality of "Install/Uninstall packages" dialog, just a quick way to (re)install your favorite packages.
Quote
It would be nice if, in the uncollapsed treeview, the 'Installed' column indicated 'Installed' (or not) for single packages. (some other text for partly-installed multi-packages like bgraBitmap)  It can be a bit of a fiddle expanding/collapsing the treeview all the time for simple info
Ok. This is a good idea. I will implement it today.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #453 on: December 07, 2016, 11:02:03 am »
Since you're under windows, just download Tortoise SVN. To upgrade to trunk just press the "Update" button. Initially you have to do a SVN checkout though. This is why version control was introduced in the first place.
A quick follow-up (I have Tortoise svn)
1. What is the best svn repository URL for trunk?
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #454 on: December 07, 2016, 11:13:25 am »
Quote
1. What is the best svn repository URL for trunk?
http://svn.freepascal.org/svn/lazarus/trunk

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #455 on: December 07, 2016, 01:04:43 pm »
All good now.
JsonEditor to V0.1.18.0
- Compiled with Trunk (form.scaled=true)
- .po files are now bundled into the exe as resources and unpack on first run. 2 methods of packing them at compile time depending on Laz version.
  - Only the executable needs to be deployed, and it goes to any folder with write access
  - Bugfix from V0.1.17.0 - Linux locale creation fixed
- Updated Windows installer (https://sourceforge.net/projects/lazautoupdate/files/otherpackages/setup_jsoneditor.exe)
« Last Edit: December 07, 2016, 04:07:43 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #456 on: December 07, 2016, 04:33:48 pm »
@lainz I need an enormous favour.
When learning about i8n I committed the cardinal error of editing the .po files in Windows Notepad.  This messed up the .po files so they could no longer be edited in my BetterPo editor.  Lesson learned!

Since then, I have installed PoEdit, and rebuilt the jsoneditor.en.po and jsoneditor.es.po but using the machine translation to Spanish (which is less than ideal)

Now the .po files are correct, and POChecker also validates them.  I also found a way to include and unpack them as resources in Windows and Linux (which was a bonus)

The enormous favour is.. can you fix my awful Spanish translations in (attached) jsonedit.es.po just one last time please?   I would totally understand if you refused, as it was totally my fault your previous work was lost.  If it's any comfort, I've spent hours trying to fix my own mistake already.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #457 on: December 07, 2016, 04:59:06 pm »
Sure, I can translate that.

Edit: here it is. An awesome feature of Poedit is that it remembers the translations you did before, so I was just clicking on the already translated stuff I did before and it get's done in a few minutes. Of course there was new translations but these was easy too.

There is something not translated automatically and these are the headers of the TStringGrid. "lpk filename" and "version (n.n.n.n)". You maybe want to assign the translations by code.
« Last Edit: December 07, 2016, 05:25:19 pm by lainz »

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #458 on: December 07, 2016, 05:43:17 pm »
Sure, I can translate that.

Edit: here it is. An awesome feature of Poedit is that it remembers the translations you did before, so I was just clicking on the already translated stuff I did before and it get's done in a few minutes. Of course there was new translations but these was easy too.

There is something not translated automatically and these are the headers of the TStringGrid. "lpk filename" and "version (n.n.n.n)". You maybe want to assign the translations by code.
@lainz  Thanks a million!
I feel suitably stupid for making unnecessary work for you.  I curse Bill Gates's stupid 'NotePad/SaveAs UTF8'!

In the meantime, I've learned a lot about Lazarus i8n deployment, including embedding .po files in the executable, using portable CFG files and and also using poedit and POChecker to ensure things are 'right' for deploying different languages with a runtime menu.

@all
Now I'm looking for German, French and Mandarin translations :)   Anyone?

If you are a package maintainer, I think jsoneditor is a good, user-friendly utility to make OPM-compliant update jsons.  How can I spread the word, now that I've put a disproportionate effort into making it?
Windows: https://sourceforge.net/projects/lazautoupdate/files/otherpackages/setup_jsoneditor.exe
« Last Edit: December 07, 2016, 06:43:34 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #459 on: December 07, 2016, 07:35:39 pm »
Quote
@lainz
I hope you can talk with the lazarus developers (well, with the others, you are one of them now) and include this package as one of the pre-installed with Lazarus, so with that it will become more visible to all developers that open the package menu in the IDE, and more people will use it.
I don't think is possible since OPM depends on VirtualStringTree and third party components are not added to the pre-installed packages.

1. I implemented @minesadorada's request(screenshot)
Quote
It would be nice if, in the uncollapsed treeview, the 'Installed' column indicated 'Installed' (or not) for single packages. (some other text for partly-installed multi-packages like bgraBitmap)  It can be a bit of a fiddle expanding/collapsing the treeview all the time for simple info
2. The update is only visible if the package is installed. I hide it because a direct update, without install, although possible is not recommended. The update may fail if dependencies are not found.
3. Added Help button which points to OPM wikipage
4. Fixed a few bugs.

Please test(r 53591)!

We should add the LastNotifyDate(TDateTime) to the JSON + remove name.zip because it's not needed, just the name:
Quote
{
  "UpdatePackageData" : {
    "DownloadURL" : "https://sourceforge.net/projects/lazautoupdate/files/otherpackages/cryptini.zip",
    "ForceNotify" : false,
   "LastNotifyDate" : 4.2689000000000000E+004, <--add this
    "Name" : "cryptini"                         <--cryptini instead of cryptini.zip
  },
  "UpdatePackageFiles" : [
    {
      "Name" : "cryptini.lpk",
      "Version" : "0.1.1.0"
    }
  ]

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #460 on: December 07, 2016, 09:04:52 pm »
@GetMem
Don't worry, maybe there's another way of making it popular. Do you have any kind of statistics of the downloads of each package? Or that need to be implemented in the server?

Rayvenhaus

  • Jr. Member
  • **
  • Posts: 70
Re: Online Package Manager
« Reply #461 on: December 07, 2016, 10:41:24 pm »
Has this package moved? The link in the first message gives me a 404 error at github.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #462 on: December 07, 2016, 10:51:55 pm »
Yes it has been moved to Lazarus svn. See the wiki for the links.
http://wiki.freepascal.org/Online_Package_Manager

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Online Package Manager
« Reply #463 on: December 08, 2016, 09:26:57 am »
@GetMem: I am currently converting some more components of the jvcllaz project in ccr (JVCL components). For easier conversion I'll stick to the package structure of the JVCL Delphi version. This results in a multitude of packages which have to be compiled/installed in a given order.

How does OPM know the order in which packages must be compiled/installed?
Does OPM "know" that runtime packages only have to be compiled, while designtime packages must be installed?

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #464 on: December 08, 2016, 09:57:07 am »
@lainz
Quote
Don't worry, maybe there's another way of making it popular
I'm not worried at all. OPM it's just a tool, so nothing to worry about.

Quote
Do you have any kind of statistics of the downloads of each package? Or that need to be implemented in the server?
I have to ask @Marc. He maintains the server on which the repository is stored.

@wp
Quote
How does OPM know the order in which packages must be compiled/installed?
Recursively checks for dependencies both in central repository and  locally installed packages.  It will warn you before install if an unresolved dependency is found(see screenshot). The install order is decided up on the dependencies. If you are interested about the details, please check:
 - procedure GetPackageDependencies(unit opkman_serializablepackages)
 - procedure StartInstall(unit opkman_installer)

Quote
Does OPM "know" that runtime packages only have to be compiled, while designtime packages must be installed?
Yes. Runtime packages are only compiled, designtime packages compiled, installed then the IDE is rebuild.

I'm almost finished the update feature. After that I need a link to an external json file. When a new update is available, all you have to do is increase the version number and update the source zip.

 

TinyPortal © 2005-2018