1. James Beck
  2. PowerBuilder
  3. Tuesday, 19 March 2019 19:23 PM UTC

Was messing with the Powerbuilder Complier and using the params that were provided when i do a build.  We also use topWiz for source control, and when i ran the pbc170 with the parameters, i didn't realize topWiz would go and get latest of all of the objects for the compile / rebuild.   we had a handful of objects checked out and were overwritten with from the last time they were checked out.    we have a build from a week ago that has the most recent code in the pbd's.   we were able to put together a procedure to get the syntax of the datawindows from the build from a week ago and that solved the issue of getting the latest datawindows that were overwritten, but was wondering if there is anyway to access the source code from the PBD's (window functions, events, etc...).   we were able to get a reference to the window and source with the FindClassDefinition and looking at the scriptList.source object, but that only seemed to work while running the application from within the powerbuilder environment.   we need to be able to reference the objects when running the exe so we could access the PBD files from a week ago.   anyone have any suggestions.  we almost need to reverse engineer our pbd files from a week ago.

 

Thanks in advance

Jim Beck

Roland Smith Accepted Answer Pending Moderation
  1. Friday, 22 March 2019 02:24 AM UTC
  2. PowerBuilder
  3. # 1

You should create a workspace in another folder that is only for building your executable. That way it won't overwrite your checked-out work.

 

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 21 March 2019 19:51 PM UTC
  2. PowerBuilder
  3. # 2

Hi Jim;

   You can recover any object class definition and its source code from a PBD (but not a DLL) in various PB versions. However, this is not straight-forward. I would suggest contacting Mr Don Clayton at InterTech (one of Appeon's premier consulting partners). Don has had experience doing this for various PB customers.

FYI: https://www.appeon.com/consultants/consulting-partners/intertech-consulting-inc.html

HTH

Regards ... Chris

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 21 March 2019 19:18 PM UTC
  2. PowerBuilder
  3. # 3

The only object you can reproduce source code from a PBD is the DataWindow.

There is a decompiler available that was written by someone in China. I actually have a copy of it. It doesn't work with PB 10 and higher.

Jeremy Lakeman has also done some work on a decompiler. I haven't emailed him in a year or two so I don't know what the status of it is.

To extract DataWindows, create an app adding the pbd files into the library list. On the window have a DataWindow that shows the result of the LibraryDirectory function.

In the rowfocuschanged event, assign the datawindow object to a datawindow control. In a button use the DataWindow.Syntax property to get the source code and write it to a file. Don't forget to add the object header as the first line.

 

Comment
There are no comments made yet.
James Beck Accepted Answer Pending Moderation
  1. Thursday, 21 March 2019 13:22 PM UTC
  2. PowerBuilder
  3. # 4

Thanks Kevin,  The issue is that we never checked the files back in prior to running the automated PB Compiler (pbc170.exe), so when the compiler ran, it got latest from topWiz and overwrote a handful of windows that were already checked out with code changes.   

so was thinking the really option we had to get those changes was to see if there was a way to reverse engineer a couple PBDs to get the code changes.

Thanks
Jim

Comment
  1. Roland Smith
  2. Friday, 22 March 2019 02:23 AM UTC
You can pull back prior versions from the Show History window.
  1. Helpful
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 21 March 2019 12:59 PM UTC
  2. PowerBuilder
  3. # 5

According to the WizSource documentation on Roland's site, you should be able to restore a prior version of any object to the IDE using the GET function.

 

If that doesn't work for you, I seem to recall someone offering this service, basically reverse engineering PBD's.  I believe the name was Jeremy Lakeman or something similar.  Pretty sure the first name was Jeremy.  Not sure if someone else here knows how to get in touch with him, or maybe try LinkedIN. 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.