Skip to Content
Author's profile photo Former Member

Application bootstrapping and deployment using PB.Net

This is an attempt at showing how to publish a PB.net app to a web server with click once deployment that will check for and install prerequisites. I found that the bootstrapper that comes with PB works fine for installing the PB runtime but fails for the .Net framework. Rather than deploying a “Hello World” app to illustrate this I’ve created an app with a simple WPF window with a media element that can play videos by dragging and dropping them onto the window. It has three buttons to play, pause and stop the video as well as volume and seek sliders. I found a C# example on the internet that does this and wanted to see if I could do it with PB. The two prerequisites required for this app are the .Net 4.0 framework and the PB.net runtime. I will show you how to configure the bootstrapper to install these.

Here are the prerequisites you’ll need…

1.      PB.Net 12.5.1

2.      The source code for this project (https://skydrive.live.com/#cid=D13D80A62EA55460&id=D13D80A62EA55460%21108 videodemo.pbl.zip)

3.      An MSI of the PB.net runtime components (Can be made with PB Runtime packager that comes with PB). You should call it PBRuntime.msi for this example.

4.      DotNetInstaller open source program. Can be found at http://dblock.github.io/dotnetinstaller/

5.      A copy of the web installer exe from Microsoft. Can be found here: http://www.microsoft.com/en-us/download/confirmation.aspx?id=17851 . You should download and rename it to dotnetfx.exe.

Here’s a quick rundown of the steps I’m going to describe…

1.      Configure the PB WPF project for deployment

2.      Publish it to a server running Windows Server 2008 and IIS

3.      Create the bootstrapper program that will install the prerequisites

4.      Test the install

1.      Configure the project for deployment

a.      General Tab

                                                              i.      GeneralTab.PNG 

                                                                                                                                    ii.      I hope this was helpful.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Helpful for sure, I didn't know that you could customize the prerequisites installer.

      Is it possible to have a full installer (Inno Setup or InstallShield for example) as a replacement for the Setup.exe ?

      The html generated page would have to be customized too, it's not very beautiful, and on the first link, it's not clear if you are installing the prerequisites or the app itself.

      Thanks for sharing.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Guillaume,

                             

      Helpful for sure, I didn't know that you could customize the prerequisites installer.

                         

      Neither did I until I started investigating why my setup failed on a clean machine. Then I just got curious and well you know how that goes.

      Is it possible to have a full installer (Inno Setup or InstallShield for example) as a replacement for the Setup.exe ?

      I don't think you would want to do that. From what I've read so far the dotNetInstaller is purely for creating a bootstrapper to install prerequisites not to replace installers.

      The html generated page would have to be customized too, it's not very beautiful, and on the first link, it's not clear if you are installing the prerequisites or the app itself.

      Yeah the publish.htm is pretty bare bones but could certainly be improved upon.

      I'm curious why the bootstrapper PB created didn't work in the first place for the .Net 4.0 Framework. The configuration.xml files that shipped with PB 12.5 were from an earlier version of dotNetInstaller. Could that be the reason? Who knows. Maybe others can shed some light on it for us.

      Author's profile photo Former Member
      Former Member

      Hi Mark,

      Neither did I until I started investigating why my setup failed on a clean machine. Then I just got curious and well you know how that goes.

      Well known process indeed, so called Bug Driven Development 😉

      I don't think you would want to do that. From what I've read so far the dotNetInstaller is purely for creating a bootstrapper to install prerequisites not to replace installers.                

      Maybe it's possible to add a third prerequisite, which will be in fact a customized MSI to do what clickonce can't do, like register COM components, RegAsm, Fonts, proper uninstall...

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      I think you can have countless prerequisites. If the PB bootstrapper worked you would just need to add them each as a separate folder under C:\Program Files\Sybase\PowerBuilder 12.5\DotNET\pbiu\BootStrapper\Packages. Since it doesn't, just make sure you add the correct component to the install tree using the dotNetInstaller program when you create your setup.exe file. The only two I've used so far are Msi and Exe.

      Fyi The component add wizard has an option to install 4.0 framework from Microsoft's web site (among other things). I haven't tested it though.