Page 1 of 1

Command-line problem

Posted: Mon Mar 15, 2021 12:59 am
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?

Re: Command-line problem

Posted: Fri Mar 19, 2021 10:04 am
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 ?

Re: Command-line problem

Posted: Fri Mar 19, 2021 10:13 am
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"

Re: Command-line problem

Posted: Thu Mar 25, 2021 12:03 pm
by Wanderer
Created new issue here

Re: Command-line problem

Posted: Thu Apr 08, 2021 9:13 pm
by Wanderer
Hey Eric. Have you had the time to take a look at this issue?

Re: Command-line problem

Posted: Fri Apr 09, 2021 7:03 am
by RomCenter
Hi Wanderer
No, not yet, but I'm currently looking for tickets. This will be my next one.

Re: Command-line problem

Posted: Fri Apr 09, 2021 3:24 pm
by RomCenter
Just tried on a regular installation and it's working.
I will try from a batch located in another folder...

Re: Command-line problem

Posted: Fri Apr 09, 2021 3:32 pm
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 ?

Re: Command-line problem

Posted: Fri Apr 09, 2021 7:36 pm
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!

Re: Command-line problem

Posted: Sat Apr 10, 2021 7:32 am
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.

Re: Command-line problem

Posted: Sat Apr 10, 2021 1:12 pm
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?

Re: Command-line problem

Posted: Sun Apr 11, 2021 8:38 am
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.

Re: Command-line problem

Posted: Sun Apr 11, 2021 9:22 am
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.

Re: Command-line problem

Posted: Tue Apr 13, 2021 8:45 pm
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.

Re: Command-line problem

Posted: Mon May 03, 2021 5:12 pm
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?

Re: Command-line problem

Posted: Tue Jun 01, 2021 1:29 pm
by RomCenter
Hi Wanderer

I have fixed the problem.

Re: Command-line problem

Posted: Tue Jun 01, 2021 2:22 pm
by Wanderer
Hi Eric.

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

Re: Command-line problem

Posted: Wed Jun 02, 2021 8:23 am
by RomCenter
I can produce a test version for you. But I still have some tests to do before building it.

Re: Command-line problem

Posted: Wed Jun 02, 2021 9:36 am
by Wanderer
OK, no problem. As long as the command-line parameters remain the same, it's not necessary.

Re: Command-line problem

Posted: Wed Jun 02, 2021 10:17 am
by RomCenter
Here it is.
romcenter32_4.2.0.beta1.7z
(12.27 MiB) Downloaded 6419 times

Re: Command-line problem

Posted: Sat Jun 05, 2021 9:26 am
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???