GithubHelp home page GithubHelp logo

corneliusdavid / autogetit Goto Github PK

View Code? Open in Web Editor NEW
65.0 16.0 18.0 1.84 MB

automate the GetIt package manager for RAD Studio (Delphi) by calling the command-line tool

License: MIT License

Pascal 96.61% Batchfile 3.39%
delphi getit

autogetit's Introduction

AutoGetIt

The idea with this small Delphi program is to automate the GetIt package manager for RAD Studio (Delphi) by calling the GetIt command-line tool that comes with Delphi. Every time there's an update or a need to reinstall, it's a pain to tediously and manually go through all the GetIt packages and reinstall them. Wouldn't it be nice if there was a saved checklist?

Now there is!

This Delphi program uses the DosCommand component (available on GetIt) to shell out to the GetItCmd.exe and show all the packages in a CheckListBox. You then simply check off all the packages you want to install, click the Install button, and sit back and watch them all get installed (some require authorization so it's not completely unattended). You can also right+click on this list to select all or none, or uninstall the checked packages instead, or install/uninstall just one package at a time.

Originally Written in Delphi 10.4.1, tested on the update to Delphi 10.4.2: installed over 75 packages in less than 30 minutes!

Build

This code, as stated above, was originally written in Delphi 10.4 Sydney; it was upgraded to Delphi 11 Alexandria and now is maintained in Delphi 12 Athens. It uses an ImageCollection componet which was introduced in Delphi 10.3 Rio, so is not compatible with versions of Delphi before that. However, the compiled application is available here (click on Releases) which supports the GetIt command-line tool back to Delphi 10.2 Tokyo.

The only add-on package needed to compile this code is the DOSCommand library, available either on GitHub or on GetIt.

Batch files

If you don't want to run the GUI, I also wrote a bunch of batch files that do the same thing but with pre-selected groups of packages. I basically dumped all the packages into a text file then prepended the GetIt command line to install them and separated them into variously grouped batch files, some duplicated among a couple of groups. If you haven't already done this for your install, this will help get you started.

To run the batch files, start a DOS Prompt as Administrator, run the rsvars.bat batch file from your Delphi folder, then run any of the batch files in the batch folder. You will want to modify the batch files and comment out the packages you don't want.

Links

Screenshot

Screenshot

autogetit's People

Contributors

corneliusdavid avatar developpeurpascal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autogetit's Issues

Remove extra linefeeds from list

Hi, thanks for this very helpful und easy to use tool!
When I download the list of packages for D11/Alexandria there are currently 6 extra entries with only text, that seem to come from extra linefeeds in the package description. Here's an example:
"VirtualTreeView-2021.09-11 2021.09 Delphi and CBuilder treeview control. It is one of the most flexible and advanced tree controls available today. Supported on platforms: Windows."
"Please, ensure that previous versions of VirtualTree are not installed before installing this library."
It's pretty easy to avoid that with adding just another condition to the procedure DosCommandNewLine():
"else if not FFinished and (Trim(ANewLine).Length > 0) then"
->
"else if ((not FFinished) and (Trim(ANewLine).Length > 0) and (ANewLine.Contains(' '))) then"
Then only entries are added if they contain a double space as separator for the different columns.

Deleted several packages in 10.3.3

Hi.

I've compiled with sucess in Delphi 10.3.3 CE and the GUI does not give any error when running.

However, after selected the packages to install via GetIt the first thing that happens is the deletion of a large number of files. Those files are related to TeeVCL....

cannot install

Hi,
This package wont install, it tells me I am missing TDosCommand?

Best Wishes
Phil

Access Violation

Compiled in 32-bit Windows platform using Delphi 10.4 (Version 27.0.38860.1461) and running in Admin mode, I'm getting the following error in the Demo2 application when I click the "Refresh Package List" button:

"Access violation at address 0040A35A in module 'AutoGetItVCL.exe', Write of address 00000044."

I'm probably missing something here but any suggestion outside of the likes of "get a life" and "learn to code" would be appreciated.

TIA!

API third party components

Hi David,

I am testing the API version but I was hoping that you avoid using third part components. I need Doscommand, raize components for a url label ?

And what are Beyond.Bind.Json, Beyond.Bind.StrUtils belong to ? I can not find results from google.

List index out of bounds

image

If I type something as filter text and refresh package list, then there is no row selected (as expected - results might be empty anyway)

This will cause a list index out of bounds though if I right click in the empty space and then click again in it (outside of the popup / context menu). Probably tries to restore previously selected row and doesn't handle case where there was no selected row

A little change needed

Now it works for 10.2.3
However, how do you filter for free paid and more?
Trying once more DOS COMMAND still running !!!
Compiling with D10.2.3

OK on the run button I added
if DosCommand.IsRunning then DosCommand.Stop;

And one more running under IDE can only see the installed
otherwise running a program without ide is OK.

Another one if the line is long of the component it goes to next line then you have a check box
which is not supposed to see
See Ribbon
Add print feature

Getit problem on my 10.2.3

Get it does not work on my 10.2.3 since day 1.
Using 10.2.1 (on my backup) it worked somehow
I was expecting to see getit in you're program the getit components
so I will finally use it.
Pressing the refresh button a few times gets an error doscmnd as expected.
However, waiting for 1/2 an hour did nothing except the error (refresh).

I wander AFTER running your program pressing getit on the IDE did not bring
an error but it turns endlessly.

P.S on line if StartsText('--', ANewLine) then
ANewLine='GetIt Package Manager - Version 6.0'
Making this line // it brings back as though the getit program does not work
Is it possible that getit on 10.2 works differently?
Screenshot - 27_02_2021 , 19_36_04

DEMOSDIR not defined

When installing some demo or template projects (e.g. AppSettingsScreens), it uses the DEMOSDIR environment variable for the install path. This is defined when running within the Delphi IDE but not otherwise. Need to read the DEMOSDIR path from the registry and add it to the environment variables before installation.

List all packages that have updates

How can I list all packages that have updates?

Not sure if possible, there is some lengthy info here that might be helpful but seems too long an article to bother:
https://blogs.embarcadero.com/streamlining-rad-studio-upgrades-with-getit

Update all packages using the GetIt Package Manager from the command line (haven't tried if accurate): https://sl.bing.net/h1O77QAKlbw

If using GetIt command line tool under the hood probably it can return list of available updates so that one can opt to try to update all or uncheck some and proceed to update?

Does not compile

No way to compile the source.

Compiling is required as every Delphi Version has to be included into the source. Even Delphi 12 is already in the code, the code isn't working. Even if you create a new project with just the code it always gives the error of "AutogetitVCL.dres" not found. This file (Delphi graphic compiles ressource) is missing.

Pressing refresh twice

Pressing the refresh button twice gave "DosCommand still running"
so I added

DosCommand.Execute;
repeat
Application.ProcessMessages;
until FFinished;
DosCommand.Stop;<<<<<<<<<<<<<<<<<<<<
CleanPackageList;

DOSCommand install fails

While installing DOSCommand 2021.09-D11, it tries to compile the package but gets an MSBuild Error (unkown switch). It compiles and installs fine when run from Delphi's GetIt Package Manager.

D10.2

D10.2.3
Can you return to the old ver that worked on my Delphi? with the new modifications
It does not even load
The main page does not load

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.