DelphiPackageManager / DPM

A Package Manager for Delphi
Apache License 2.0
96 stars 21 forks source link

Needs manually editing the config file to work #28

Closed voger closed 7 months ago

voger commented 9 months ago

I am brand new to Delphi so maybe this is not an issue but I thought maybe it is helpful so here is my experience with the installation.

My Delphi version is Embarcadero® Delphi 11 Version 28.0.48361.3236 community edition.

I installed with the steps from here https://docs.delphi.dev/getting-started/installing.html

and then


C:\Users\voger>dpm sources add -name=local -source=d:\Github\DelphiPackages
Unable to load the default config  file : %APPDATA%\.dpm\dpm.config

and when I open the IDE I first got this window

bds_R7hx9jVQE4

and when I right clicked in the project and selected "Manage DPM Packages" I got this error

bds_WtaVJ2Jljl

The fix was to edit manually the %AppData%\Roaming\.dpm\dpm.config file and change it from

{
    "packageCacheLocation": "C:\\Users\\voger\\AppData\\Roaming\\.dpm\\packages"
}

to


{
    "packageCacheLocation": "C:\\Users\\voger\\AppData\\Roaming\\.dpm\\packages",
    "packageSources": [
    {
      "name": "local",
      "source": "D:\\Github\\DelphiPackages",
      "enabled": true
    }
  ]
}

and now

C:\Users\voger>dpm sources add -name=local -source=d:\Github\DelphiPackages

Source with name [local] already exists

and the package manager in the IDE seems to work fine and I believe I managed to install a package.

I hope this is useful.

vincentparrett commented 9 months ago

Thanks for the report, I'll take a look.

You can also add a package source

Name : dpm source : https://delphi.dev/api/v1/index.json

this is the package server (also a work in progress) - you can see it at https://delphi.dev

Please note that this package manager is still a work in progress - so some things might not work well and there will be bugs. Thanks for testing it though.

vincentparrett commented 9 months ago

Fixed, if no config file exists it will generate the default one with a default source.

voger commented 9 months ago

I tested it and it works much better now. Also just a mention that the source for the package server was already added by itself. In the previous version it was added after I opened the IDE. In v0.2.59-alpha I didn't notice if it was already there before I open the IDE or not. I don't know if this is intended. I considered reporting this as well.

vincentparrett commented 9 months ago

That was intentional - makes it easier for people to get started.