News:

;) This forum is the property of Proton software developers

Main Menu

Positron - Compile via command line

Started by Gabi, Apr 08, 2021, 02:46 PM

Previous topic - Next topic

Gabi

Could we compile a program via command line ?
GL & 73
YO4WM

top204

#1
Hello Gabi.

C:\Program Files (x86)\ProtonIDE\PDS\PrPlus.exe "Filename"

or

C:\Program Files\ProtonIDE\PDS\PrPlus.exe "Filename" If using a 32-bit Windows OS.


The command line is simple because all of the compiler's requirements are in a single directory "C:\ProtonIDE\PDS\", unlike other, extremely messy Windows programs that have files here, there, and everywhere, and all the information the compiler needs about what device to use is in the BASIC program itself. :-)


Note that the "PrPlus.exe" will be named "Loader.exe" in the next upgrade to the compiler.

Gabi

Hello Les,
Thank you for writing Positron, your help and guidance, much appreciated.

Cheers.
GL & 73
YO4WM

TimB


Hi,

If using windows 10 is there another command line address that is needed?

top204

#4
I don't understand the question Tim?

The only difference is the location of the compilers if using a 64-bit or 32-bit operating system. If using a 64-bit operating system,the compiler is placed in "Program Files (x86)" by the installer, otherwise it is in "Program Files". I know this does not make sense, but it is what Micro$oft did with its 64-bit operating systems, and they are "obsessed" with having bits and pieces of a single program all over the hard drive, which is extremely stupid IMO. It should be like other operating systems, and older versions of Windows, where everything to do with a particular program resides in the program's directory ("folder" for people who cannot remember directories), and nowhere else on the drive.

That is why Windows gets bloated beyond belief even after uninstalls, because not all files are removed that were installed for the program. The same with the registry.... It should have been the operating system only that accessed the registry, otherwise, as now happens, it gets bloated beyond belief with thousands of bits and pieces placed in it that cannot be removed because they are unknown to be there!

TimB


Its not me directly doing the command line calls. Over my head :) I was talking to Gabi about it.

To rephrase what I was told

On the win7 machine, 32bit systems the command line works as described

On a win10 64bit, installed positron from fresh and tested the command line and it does not go further then generating a ,pbe file which inside has a text saying it could not find the prprc.exe

In other words
In the folder where "code.bas" is located, a "code.pbe" file is produced and its contents says it could not find the path to PrPrc.exe

top204

#6
The paths must be used for the compiler's location and the program's location, and any path or file names that have spaces in them must be wrapped in quotes, otherwise, the command line will not recognise them as full and will give an error message because it found a space, so it assumes that is the whole path or filename and will see the characters after the space as possible commands, which will fail because they are not. :-) Remember, the console and command lines are from the good old days of DOS, where no spaces were allowed in path and file names.

For example, I have just created a .bat file to compile a program in the samples folder:

"C:\Program Files (x86)\ProtonIDE\PDS\PrPlus.exe" "C:\Users\Les\PDS\Samples\3_Buttons.bas"

Pause

The .bat file was sitting in the root directory of C:, and I also tried it from the Samples directory. It will work from anywhere on the machine, because it is telling the console and the program exactly where it is.

Notice the paths and the quotes. Paths are standard in command lines, unless the .bat file is sitting in the same directory as the file being called from it, then the default path passed to the program being run is correct. The Pause command is placed there so I could see what was happening with the command line on the console window because it then needs a key press to close it. Over the years, I've gotten into the habit of placing all path and file names in quotes, just in case the console recognises a character in them as a terminator or identifier for another command, which often happens, and I still use an underscore instead of a space in file and path names wherever possible.

I am also running Windows 10 64-bit.

TimB


Thanks Les

The " "'s were the issue.

Tim