Skip to Content
author's profile photo Former Member
Former Member

Automated deployment with PowerBuilder and TFS

Hi,

We have an application which sits on a shared network drive and users within the company run it using a desktop short-cut.

This means that currently when we make a change to the application, we have to wait until everyone logs off at the end of the day before we can manually copy/paste the required application files and replace the old application.

We have recently (last week) set-up a Team Foundation Server 2012 and are using it as the PowerBuilder source control system. Which adds a .sr* file for every object within the application. (the application development directory went from 75 files to over 600)

Our current process is as follows:

1. Get the latest version from TFS

2. Make the changes in PowerBuilder

3. Complete Tests

4. Build application within PowerBuilder

5. Check all changed files into TFS (including .exe, pbl's etc)

6. Wait until after hours

7. Get latest built version (once final daily build has been approved)

8. Manually select the ~45 (.exe, pbls, pbds, dlls etc) required application files from local machine

9. Copy/replace application files with those on the shared network drive

We are looking for an automated process, so that once the final build has been completed for the day, and automated process kicks in that copies the files from preferably TFS to the shared network folder.

Has anyone had any experience with this? it is just way to time consuming to have to manually build and deploy the software.

Alternatively is there a way within PowerBuilder to deploy the software to a different folder location, so that the required .exe, pbls etc get placed in a separate folder when built meaning we no longer have to filter them out of the folder with the .pbw and 600+ sr* files?

What is the best method for automated deployment of PowerBuilder applications?

its a PB 12.5. Classic application

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 01:02 PM

    Here is a real simple way to fix your problem of deploying new versions during the day.

    We have a folder on the network:

    K:\PBApps\<appname>

    Under that are two folders, Version1 and Version2. In the K:\PBApps\<appname> folder is a file <appname>.bat which looks like this:

    @echo off

    k:

    cd \PBApps\<appname>\Version1

    start <appname>.exe

    Everyone has a shortcut that runs the .bat file. When I deploy a new version during the day, I copy it to K:\PBApps\<appname>\Version2 and then edit the .bat file and change it to point at Version2. If the change is really important, I then send out an email telling everyone to exit the app and immediately go back in to pick up a new version.

    We have been doing this for over 10 years and it works great.

    An alternate method would be instead of a .bat file, you could have a small PB app with the same name of the current exe that checked a .ini file to see which version was current and then launched it. If you used this method, you wouldn't have to change the users shortcut.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 06, 2014 at 08:32 AM

    Hello,

    If your standard PB application can be converted to a .NET Windows Forms application, you can use the Smart Client deployment feature which allows to publish a new version of your application for end-users as soon as you make changes to it.

    I'm attaching some links for this feature:

    http://johnstrano.sys-con.com/node/347987/mobile

    Lesson 12: Converting the PowerBuilder Tutorial to a Windows Forms Application

    Hope this helps

    Jacob

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 04:21 AM

    Hi JA,

    We have configured our powerbuilder 12.5.1 classic code with TFS, we have only maintaining the version controlling part of this ALM product. But you may get some help with the following link.

    http://www.microsoft.com/en-in/download/details.aspx?id=24337

    http://geekdeck.com/installing-configuring-team-foundation-server-2010-step-by-step/

    Thanks

    Avishek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 01:45 PM

    You can create a batch file (or .cmd file) to do the replacing for you. Not sure if there's a way to interface with TFS from the command line, but if the newly built files end up in a directory somewhere, this will work.

    The following batch file will replace all files that exist in the destination directory, and add any new ones that only exist in the source directory. You'll need to change the SRC and DEST environment variables at the top of the file to point to your real directories. By using full directory pathing, it won't matter where this gets run from.

    The "replace.exe" program comes with windows, but has problems with large numbers of files in the source directory, so it needs to be run on smaller sets of files instead of *.*. It's also easy to add new file types by adding a new "call :do_replace" line.

    For initial testing purposes, I suggest you start with a copy of the shared folder and see how it works in updating it.

    @echo off

    set src=c:\wherever newly built files are

    set dest=c:\shared public folder for users

    call :do_replace *.exe

    call :do_replace *.pbl

    call :do_replace *.pbd

    call :do_replace *.dll

    set src=

    set dest=

    goto eof

    :do_replace

    Echo Replacing %* to public folder

    replace "%src%\%*" "%dest%" /u

    Echo Adding %* to public folder

    replace "%src%\%*" "%dest%" /a

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 03:39 PM

    I can't speak to the automation of GLVing and building using TFS but as far as deploying the app to a network we have traditionally used the syncrt.exe program that has shipped with PowerBuilder for ages. It reads a config file with a "syc" extension that allows you to specify various options. We configure it to copy the build from the network to the users local drive, launch the application, specify what parameters to pass in when launched and to log errors to a local log file. Instead of creating a link directly to your application's exe point the link to syncrt.exe and pass it the syc file like so: L:\myapps\syncrt.exe L:\myapps\app1.syc.

    We use VSS for source control for our PB apps. I've written some Orcascripts to automate the GLVing and building for that environment. I'd be very surprised if TFS doesn't have something very similar.

    hth,

    Mark


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 05:16 PM

    I've used a system similar to Roland's except that the applications files were copied to a local folder from the 'master' network location and then launched off the user's machine. We used a small app we called 'launcher' which checked the master location for a newer version, downloaded it to the local pc, and then launched the executable. All anyone had to do if there was an emergency update was to close the app and then relaunch it from the 'launcher' application.

    - Matt

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.