3P icon indicating copy to clipboard operation
3P copied to clipboard

Encrypted Compile Mode

Open ScarTheSilent opened this issue 4 years ago • 5 comments

I don't know if this is something that's built in at all already, but I can't seem to find an option for it.

Basically the license I have only allows for encrypted p code to be compiled (using the -rx parameter). So for my code I go onto my Linux box and use xcode to encrypt the p code and then bring it back and compile.

For this reason I can't set up 3P properly. I can't connect it to the database due to it trying to compile and run unencrypted p code. I also would like to be able to compile through 3P, but even just being able to attach the database would be a great help.

ScarTheSilent avatar Aug 21 '19 12:08 ScarTheSilent

Hello,

I'm very dubitative concerning that statement :

Basically the license I have only allows for encrypted p code to be compiled

Could you give me the error and error number message you get from prowin.exe when you try to compile or analyse the database please? (you can copy/paste the content of bottom right popup of 3P)

What would make sense, is that you only have a runtime licence installed on windows. But you seem to be able to compile procedures on windows after a xcode, is that correct? In that case, can't you simply remove the -rx arguments in your windows environment during the development?

Can you please provide the content of %DLC%\startup.pf?

best regards,

jcaillon avatar Aug 21 '19 13:08 jcaillon

Hi there,

Thanks for the reply. We use a program called Accord which connects to an OpenEdge database. We use ABL for advanced data interrogation, so they provided a license which allows for runtime code, but will actually also allow for xcoded p code to be compiled. Because of this I can't run prowin32 for compiling without the -rx.

So if I try and use 3P with just the prowin32.exe and no -rx, I get this error popup: This version of PROGRESS does not allow compiles. (471) Clicking OK on that gives the error: R-code file not located for "C:\Users<username>\AppData\Local\Temp\3P\exec_073625592_c2heh0qq.stz\run_073625602.p. (473) Then OK on that gives: ** Unable to run startup procedure C:\Users<username>\AppData\Local\Temp\3P\exec_073625592_c2heh0qq.stz\run_073625602.p (492)

If I use it with the -rx parameter I get: This version of PROGRESS compiles only encrypted programs. (1086) Then: ** Unable to run startup procedure C:\Users<username>\AppData\Local\Temp\3P\exec_073029261_zb1avrfe.2by\run_074029266.p. (492)

Attached is the error I get from 3P regardless of how I run it. 3Perror

Kind Regards, Chris

ScarTheSilent avatar Aug 22 '19 06:08 ScarTheSilent

This is the startup.pf for the application we use: -d dmy -numsep 44 -numdec 46 -D 500 -s 1024 -TB 31 -TM 31 -Bt 10000 -nb 255 -mmax 51200 -q -l 640 -nocandodomain -p accord.w

ScarTheSilent avatar Aug 22 '19 06:08 ScarTheSilent

Thank you for the clarification, I understood it right the first time but I didn't want to believe it! This sounds crazy to me... You have a runtime version which still allows to compile code but only if encrypted first : progress is pure madness lol!

Can you also please confirm that when you say this:

So for my code I go onto my Linux box and use xcode to encrypt the p code and then bring it back and compile.

You compile with an external tool, not with 3P right?

You have no immediate workaround because 3P always runs a intermediate program (run_xxxx.p) which then does the actual job of compiling/fetching database info and so on.... Nevertheless, this is a feature that is doable. Especially since I have my own implementation of xcode in pure Csharp in https://github.com/jcaillon/Oetools.Sakoe. Meanwhile, if this simplifies thing a bit for you, you can use an unreleased version (and pretty old) of sakoe which includes the xcode command : https://ci.appveyor.com/api/buildjobs/vsyab03i6yhdlcr2/artifacts/Oetools.Sakoe%2Fbin%2Fsakoe.zip. This will allow you to compile on your windows machine without having to transfer and xcode on linux first.

best regards

jcaillon avatar Aug 22 '19 09:08 jcaillon

Aha, tell me about it, lol.

Currently I write the code with 3P just for autocompletion etc., then transfer the code to Linux (where our database runs), xcode it, transfer it back, run prowin32 in rx mode, compile the code and transfer it back over to the linux box.

At the moment I just have a bunch of batch files that automate the process as much as possible that just does all the copying of files and uses ssh to the Linux box to run xcode. It works for what I do, it would just be nice to be able to use 3P.

I would love to see it as a feature and fantastic news that you have a way of implementing it. When you get round to it, if you want me to do some testing I'm more than happy to help out.

Thanks for your help.

ScarTheSilent avatar Aug 22 '19 09:08 ScarTheSilent