Print
Category: PowerBuilder
Hits: 31919

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

 

From Windows to Linux 

Did you know that Powerbuilder 2019 could run on Linux ?

Since Powerbuilder 2019 is now in 64 bit, it is now a lot easier to run on Linux using wine64

 

Here are the main steps to make generated Powerbuilder 2019 apps run on Linux.

 

What do you need ?

You will need :

  1. A valid Powerbuilder 2019 installed somewhere on a Windows machine
  2. A Linux desktop with a graphical environment installed
  3. your PowerBuilder 2019 app
  4. A JDBC driver as a .jar library
  5. An Open JDK distribution for Windows 64 bits
  6. Wine64



Use JDBC Driver

In Powerbuilder environment

Your Powerbuilder app has to use JDBC, it is much simpler than ODBC under Linux (Wine supports it though). Refer to JDBC section of this part of the documentation

JDBC needs a JDK to be used, part of the following actions is about installing a JDK under wine.

 

Generate code in 64 bits

In Powerbuilder environment

In the project painter , select "64 bit" in the "Platform" drop down list

 

Deploy your Powerbuilder app under Linux

On Linux.

Copy your .pbd and .exe files on Linux in c:\my_app_dir

Copy the needed 64bits DLL in the same directory c:\my_app_dir.

All your DLLs must be 64bits (otherwise you get an error c000007b ) . Pick them from a windows10 install of Powerbuilder from C:\Program (X86)\Appeon\Shared\Powerbuilder\x64

Here is the DLL list I needed to connect to ODBC, JDBC, Mysql, Native Sybase and Oracle (our app can handle all of them)

theme190 (the directory containing new 2019 themes, despite they are not rendered under Linux)

atl100.dll
ATL80.dll
libjcc.dll
libjutils.dll
msvcp100.dll
msvcp80.dll
msvcr100.dll
msvcr120.dll
msvcr80.dll
nlwnsck.dll
pbdpl190.DLL
PBDWE190.DLL
PBDWM190.DLL
pbdwr190.pbd
PBJDB190.DLL
pbjdbc12190.jar
PBJDC190.DLL
PBjvm190.DLL
pblab190.ini
pbo10190.DLL
pbo90190.DLL
PBODB190.DLL
pbodb190.ini
PBODW190.DLL
PBRTC190.DLL
PBSHR190.DLL
PBSNC190.DLL
PBSYC190.DLL
pbtheme190.dll
pbtra190.DLL
PBUIS190.dll
PBVM190.DLL

 

Install wine64 

On Linux.

Run as su under the user who will use wine:

apt-get update

apt-get install wine wine32 wine64

disconnect from root and go back to the normal user.

Run it one to create the ~/.wine directory in your HOME.

wine64 --version

 

Create 2 directories under wine

On Linux.

the  ~/.wine directory simulates the disk organization under windows. Create 2 directories there: 

mkdir -p ~/.wine/drive_c/Software/Java

mkdir -p ~/.wine/drive_c/Software/Mysql

 

Copy your JDBC driver under wine

On Linux.

copy your jar file (Mysql for me) under wine

cp mydir_somewhere/mysql-connector-java-5.1.47.jar ~/.wine/drive_c/Software/Mysql

 

Copy the OpenJDK under wine

On Linux.

Download JDK from https://openjdk.java.net/ . Pick the Windows 64 bits version of the distribution, as a zip file.

Unzip the file and copy the OpenJDK distribution (the directory right above the bin directory) under wine

cp mydir_somewhere/jdk-13.0.1 ~/.wine/drive_c/Software/Java

 

 

Setup Windows environment variables on Linux

On Linux.

Your jar file has to be in the CLASSPATH variable, your JVM dll has to be in the PATH variable. 

For this use regedit and edit the 2 keys under HKEY_CURRENT_USER/Environment :

wine regedit

CLASSPATH=C:\Software\Mysql\mysql-connector-java-5.1.47.jar

PATH=C:\Software\Java\jdk-13.0.1\bin\server

 

Create alias to launch your app

Add these lines to your .bashrc

alias myapp='cd the_directory_where_my_.exe_file_is ; wine64 myapp.exe &'

Launch your app

use the alias that you just created

myapp

You should see the first window of your app.

 

 

Something wrong ?

 

 

Summary

Here is how to install a Powerbuilder 2019 generated app.

It is not very difficult for a regular unix fellow.

You will see that your app runs surprisingly well under Linux, even on a less powerful desktop.

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.