MPC icon indicating copy to clipboard operation
MPC copied to clipboard

There is no longer a default project type

Open LukeMouse opened this issue 1 year ago • 5 comments

I usually crate my project with :"mwc.pl -type vc14" under windows, it will generate vs2015 project successfully. But recently I don't kow what happened, when I execute the above scipt I got: Using C:/MPC/config/MPC.cfg ERROR: There is no longer a default project type. Please specify one in MPC.cfg or use the -type option.

But if I execute" C:\Perl64\bin\perl.exe C:\MPC\mwc.pl -type vc14" It generate vs2015 project successful again, does anybody know what happend for my MPC env

many thanks!

LukeMouse avatar Aug 25 '24 06:08 LukeMouse

Probably something with how *.pl files are handled in the command prompt. Are you using cmd.exe or something else? Which version of Perl?

mitza-oci avatar Aug 26 '24 13:08 mitza-oci

Probably something with how *.pl files are handled in the command prompt. Are you using cmd.exe or something else? Which version of Perl?

yes, I run these script under cmd.exe, and my perl version is 5.26. many thank for you answer.

LukeMouse avatar Aug 29 '24 14:08 LukeMouse

I tried with Strawberry Perl version 5.36.3.1 From a cmd.exe command prompt, I ran mwc.pl -type vs2022 ...other arguments...

Using Sysinternals Process Monitor (download from Microsoft if you don't already have it) we can see the full command line used to start the perl interpreter.

In this case it was "C:\Strawberry\perl\bin\perl.exe" "C:\oci\ACE_TAO\ACE\bin\mwc.pl" -type vs2022 -value_template platforms=x64 DDS_TAOv2_all.mwc

For this to happen, we know that the location of mwc.pl was found using %PATH% and the perl.exe interpreter was found using the *.pl file type association.

C:\>assoc .pl
.pl=Perl_program_file

mitza-oci avatar Aug 29 '24 20:08 mitza-oci

I tried with Strawberry Perl version 5.36.3.1 From a cmd.exe command prompt, I ran mwc.pl -type vs2022 ...other arguments...

Using Sysinternals Process Monitor (download from Microsoft if you don't already have it) we can see the full command line used to start the perl interpreter.

In this case it was "C:\Strawberry\perl\bin\perl.exe" "C:\oci\ACE_TAO\ACE\bin\mwc.pl" -type vs2022 -value_template platforms=x64 DDS_TAOv2_all.mwc

For this to happen, we know that the location of mwc.pl was found using %PATH% and the perl.exe interpreter was found using the *.pl file type association.

C:\>assoc .pl
.pl=Perl_program_file

I use Sysinternals Process Monitor to check my Command line, when I enter mwc.pl -type vc14 under Windows cmd.exe I got PID: 5416, Command line: "C:\Perl64\bin\perl.exe" "C:\MPC\mwc.pl" but when I enter "C:\Perl64\bin\perl.exe" "C:\MPC\mwc.pl" -type vc14 I got PID: 8472, Command line: "C:\Perl64\bin\perl.exe" "C:\MPC\mwc.pl" -type vc14, Is there something wrong with my environment?

C:\>assoc .pl
.pl=Perl

LukeMouse avatar Sep 01 '24 16:09 LukeMouse

I'm not sure. I suggest trying the latest Strawberry Perl installer. Strawberry Perl sets up the .pl=Perl_program_file association and adds a registry key that runs Perl (but this doesn't show up in ftype because it's not named "Open")

Key Name:          HKEY_CLASSES_ROOT\Perl_program_file\shell\Execute Perl Program\command
Class Name:        <NO CLASS>
Value 0
  Name:            <NO NAME>
  Type:            REG_SZ
  Data:            C:\Strawberry\perl\bin\perl.exe "%1" %*

mitza-oci avatar Sep 03 '24 13:09 mitza-oci