jcaillon / 3P

3P (short for Progress Programmers Pal), is a notepad++ plugin designed to help writing progress 4GL (OpenEdge ABL) code. It transforms notepad++ into a full featured IDE for openedge code editor, providing syntax checking, compilation, auto-completion, tool-tips and much more!
https://jcaillon.github.io/3P/
GNU General Public License v3.0
80 stars 35 forks source link

Encrypted Compile Mode #264

Open ScarTheSilent opened 5 years ago

ScarTheSilent commented 5 years ago

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.

jcaillon commented 5 years ago

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,

ScarTheSilent commented 5 years ago

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\\AppData\Local\Temp\3P\exec_073625592_c2heh0qq.stz\run_073625602.p. (473) Then OK on that gives: ** Unable to run startup procedure C:\Users\\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\\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 commented 5 years ago

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

jcaillon commented 5 years ago

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

ScarTheSilent commented 5 years ago

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.