Command-line problem

Romcenter 4 support discussion. Please do not post roms requests or illegal links, posts will be deleted. After discussion in this forum, please report any new bugs here.

Moderator: Wanderer

Forum rules
No roms requests or illegal links
User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Command-line problem

Post by Wanderer »

Hi Eric.

I have manually placed (not installed, i'm using the portable RC version) RC 4.1.1 in its current folder. I tried executing rc.exe with certain parameters from RCDBManager. Before that, i had to change the current dir to romcenter's dir because rc.exe complained it could not find Rc_nlog.config. So after that, the result was the following:

Code: Select all

    RomCenter.Global.BaseLog/Error : Unable to determine the DbProviderFactory type for connection of type 'FirebirdSql.Data.FirebirdClient.FbConnection'. Make sure that the ADO.NET provider is installed or registered in the application config.

    Unhandled Exception: System.NotSupportedException: Unable to determine the DbProviderFactory type for connection of type 'FirebirdSql.Data.FirebirdClient.FbConnection'. Make sure that the ADO.NET provider is installed or registered in the application config.
         at System.Data.Entity.Infrastructure.Net40DefaultDbProviderFactoryResolver.<>c__DisplayClass5_0.<GetProviderFactory>b__0(Type t)
         at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
         at System.Data.Entity.Infrastructure.Net40DefaultDbProviderFactoryResolver.GetProviderFactory(DbConnection connection, IEnumerable`1 dataRows)
         at System.Data.Entity.Infrastructure.Net40DefaultDbProviderFactoryResolver.ResolveProviderFactory(DbConnection connection)
         at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderFactory(DbConnection connection)
         at System.Data.Entity.Core.Common.DbProviderServices.GetProviderFactory(DbConnection connection)
         at System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInvariantName(DbConnection connection)
         at System.Data.Entity.Internal.InternalConnection.get_ProviderName()
         at System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName()
         at System.Data.Entity.Internal.LazyInternalContext.get_ProviderName()
         at System.Data.Entity.Internal.DefaultModelCacheKeyFactory.Create(DbContext context)
         at System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
         at System.Data.Entity.Internal.InternalContext.Initialize()
         at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
         at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
         at System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator()
         at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()
         at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
         at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
         at RomCenter.DataAccess.Firebird.EF5.Ef.GetCurrentConfig(IRdtConfig config)
         at RomCenter.DataAccess.Firebird.EF5.Ef..ctor(String fileName, IProgressTracking progressPack, IPauseAndCancellationToken pauseAndCancellationToken, Boolean validatedb)
         at RomCenter.DataAccess.Dal..ctor(IConfiguration config)
         at CommandLine.romcenter.CreateRomcenterEnv()
         at CommandLine.Program.RunCreateAndReturnExitCode(CreateOptions createOptions)
         at CommandLine.Program.<>c.<Main>b__11_1(CreateOptions options)
         at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
         at CommandLine.Program.Main(String[] args)
Is there something that should be done at my end?

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

hmm, I had this error in the next version I'm working on for windows 10.
Not sure why it works with romcenter gui and not with command line...

Can you post the command you used ?
Eric - RomCenter developer
Report bugs here.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

RomCenter wrote:
Fri Mar 19, 2021 10:04 am
Can you post the command you used ?

Code: Select all

rc create -d "C:\Apps\RCDBManager\RCDBManager\TOSECDats\DATs\TOSEC - DAT Pack - Complete (3036) (TOSEC-v2020-07-29)\TOSEC\Amstrad CPC - Applications - [BIN] (TOSEC-v2014-10-28_CM).dat" -o "C:\RomCenter\datas\Amstrad CPC - Applications - [BIN] (TOSEC-v2014-10-28_CM).rdt"

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

Created new issue here

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

Hey Eric. Have you had the time to take a look at this issue?

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

Hi Wanderer
No, not yet, but I'm currently looking for tickets. This will be my next one.
Eric - RomCenter developer
Report bugs here.

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

Just tried on a regular installation and it's working.
I will try from a batch located in another folder...
Eric - RomCenter developer
Report bugs here.

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

I can't reproduce the problem.
I have created a batch in another folder and did a cd romcenter\ as first command, and it works.
Then I remove this command, create a shortcut of the batch and set 'start in' to romcenter\ in shortcut properties, and it's still working.

How do you change your working folder ?
Eric - RomCenter developer
Report bugs here.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

OK, i think i have found the cause of the problem. I compared the contents of rc.exe.config and RomCenter.exe.config, and i noticed the following part missing from rc.exe.config:

Code: Select all

  <system.data>
    <DbProviderFactories>
      <remove invariant="FirebirdSql.Data.FirebirdClient" />
      <add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".NET Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient" />
    </DbProviderFactories>
  </system.data>
I added it and that solved it!

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

Nice work! :super:
I don't know why it works on my station, probably the db full installation provides some default settings...
Anyway, I added it for next version.
Eric - RomCenter developer
Report bugs here.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

RomCenter wrote:
Sat Apr 10, 2021 7:32 am
Anyway, I added it for next version.
Great. From what you said, the next RC version will use a .NET version greater than 4.0, so it won't be XP compatible. For those few that may still be using XP, it might be nice to release a 4.1.2 version on the site (same files, just include this minor change in the zip) stating that this will be the last XP-compatible version.

Just an idea.

And a question. I'm guessing the "fix" parameter performs a fix of the database with some default fixing parameters, right? Are they retrieved from somewhere (RC's config perhaps)? Is there a way (or a plan) for the user to define them in the command-line version?

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

Yes, the xp version will remain. I have upgraded the win10 branch to be ready for .net 4.7 and up, and I reports changes to the xp branch.
Now I'm fixing issues reported in xp branch, and I will merge them in win10.
The goal is to maintain xp with functionnal issues, and keep win10 up to date with components and new technologies.

About config in command line version, the goal is to allow loading config from a text file. For now, it uses default settings.
Eric - RomCenter developer
Report bugs here.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

RomCenter wrote:
Sun Apr 11, 2021 8:38 am
The goal is to maintain xp with functionnal issues, and keep win10 up to date with components and new technologies.
:super: I'm sure some users will appreciate this.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

OK, i have managed to make almost everything work. create, add rom path and fix. The only command i have issues with, is update. It just says Success and does not change the database. Of course it works fine from within RC GUI, only command-line behaves like that.

I have used the following two TOSEC dat packs:
  • TOSEC - DAT Pack - Complete (2974) (TOSEC-v2019-05-10)
  • TOSEC - DAT Pack - Complete (3036) (TOSEC-v2020-07-29)
From the first one, i have created a DB using Amstrad CPC - Games - [DSK] (TOSEC-v2015-05-07_CM).dat and then i tried to update it using Amstrad CPC - Games - [DSK] (TOSEC-v2020-07-12_CM).dat from the other dat pack.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

Hi Eric. Have you had a chance to check if the "update" function works the way i'm trying it? Does it have a problem or it's my fault?

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

Hi Wanderer

I have fixed the problem.
Eric - RomCenter developer
Report bugs here.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

Hi Eric.

Should i expect a fix in the next version or there is something i can download (a test version perhaps)?

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

I can produce a test version for you. But I still have some tests to do before building it.
Eric - RomCenter developer
Report bugs here.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

OK, no problem. As long as the command-line parameters remain the same, it's not necessary.

User avatar
RomCenter
Author
Author
Posts: 1480
Joined: Fri Sep 28, 2001 12:34 pm
Location: France
Contact:

Re: Command-line problem

Post by RomCenter »

Here it is.
romcenter32_4.2.0.beta1.7z
(12.27 MiB) Downloaded 119 times
Eric - RomCenter developer
Report bugs here.

User avatar
Wanderer
Board master
Board master
Posts: 763
Joined: Wed Oct 03, 2001 10:37 am
Location: Milky way

Re: Command-line problem

Post by Wanderer »

Hi Eric.

Don't know why, but it took about 1-2 minutes to download and the file was corrupted. I tried it twice in two different days. It seems that the download is not completed normally. The two files i downloaded had the same contents, but one of them had more data than the other.

EDIT: OK, third time was a charm. :) Now it unpacks fine.
Hmmm... Web provider issues???

Post Reply