PowerbuilderEnLinux (1)

Embed Size (px)

Citation preview

  • 8/13/2019 PowerbuilderEnLinux (1)

    1/20

  • 8/13/2019 PowerbuilderEnLinux (1)

    2/20

    3l resumen $ue el siguiente?

    Aplicacin Web For! "#ili$an%o opera &er!ion '()* b"il% ++, !obre lin"-

    .o $unciona el chec0bo' *os radiobuton $uncionan correctamente 3l dropdown listbo' no $unciona, no despliega nada *os edit mas0 no $uncionan 3l date pi0er no $unciona, recarga la pagina y no hace nada el verical scroll bar $unciona correctamente el hori#ontal scroll bar $unciona correctamente

    3l picture bitton, no muestra la imagen *os tab pages no $uncionan el list bo' no $unciona el derecho no $unciona

    Pens@ entonces que ese navegador no era el adecuado, entonces prob@ con un browsermas conocido para mi , use $ire$o' que yo uso bastante en windows :versin que utiliceen linu' $ue la !2!2!4 pero los resultados no $ueron tampoco nada alentadores,

    bsicamente las pantallas salen descon$iguradas, y ni siquiera los edit mas0 $uncionan,algunos te'tos salen cortados y algunos controles como los listbo' no $uncionan conclic :como debera sino con doble clic!

  • 8/13/2019 PowerbuilderEnLinux (1)

    3/20

    3l resumen de el uso de la aplicacin con $ire$o' es este

    Aplicacin Web For! "#ili$an%o ireo- &er!ion ).,.,.+ !obre lin"-

    no $unciona el chec0bo' los radiobuton aparecen sin te'tos, al hacer clic0 encima del radio button

    aparece el te'to cortado 3l dropdown listbo' no $unciona, no despliega nada *os edit mas0 no $uncionan 3l date pi0er no $unciona, recarga la pagina y no hace nada el vertical scroll bar no $unciona el hori#ontal scroll bar no $unciona 3l picture bitton, no muestra la imagen

    *os tab pages no $uncionan el list bo' no dea seleccionar con un clic0, $unciona con doble clic0 el derecho no dea seleccionar con un clic0, $unciona con doble clic

    Auy desmotivado por lo que vi, conclu que las aplicaciones web hechas enPowerBuilder con !.3 no sirven para otras plata$ormas di$erentes, a windows! Sinembargo no me di por vencido y busque la solucin que para mi $unciono muy bien

    LA SOLUCION

    3n vista que los navegadores %nativos& de *inu' no dan los resultados necesarios,entonces lo que se hacer es utili#ar el browser recomendado, es decir instalar el

  • 8/13/2019 PowerbuilderEnLinux (1)

    4/20

    In#erne# E-plorer sobre *inu'! Cl principio parece una locura pero despu@s deinvestigar un poco me encontr@ con un proyecto brasilero llamado IE! / Lin"- quehace bastante tiempo implemento el +nternet 3'plorer para *inu' con un script de $cilinstalacin :http?//www!tatan0a!com!br! Cl ver su descripcin lo que me di cuenta es laclave para poder eecutar +nternet 3'plorer era tener instalado (+.3! Cl averiguar que

    era (+.3 encontr@ que (ine is an 6pen Source implementation o$ the (indows CP+on top o$ D, 6penE*, and "ni'! (ine as a compatibility layer $or running (indows

    programs! (ine does not require Aicroso$t (indows, as it is a completely $reealternative implementation o$ the (indows CP+ consisting o$ 122F nonGAicroso$tcode, however (ine can optionally use native (indows 9**s i$ they are available!:http?//www!winehq!org/

    Para instalar +3 primero veri$ique desde una consola de comandos que este instalado(+.3 y cabe'tract as?

    rpm Hq wine

    rpm Hq cabe'tract

    Si estn instalados saldr la versin la cual tiene instalada! Si no tiene instalado wine,puede baarlo de http?//www!winehq!org/site/downloady el cabe'tract puede baarlo dehttp?//www!cabe'tract!org!u0/! 3n mi caso yo tenia cabe'tract pero no tenia instalado(ine entonces lo bae y lo instale instale as?

    )pm Hi wineG2!=!42G1!

    7a teniendo (ine instalado, lo que hice $ue instalar el +nternet e'plorer sobre *inu',inicialmente utilice +3s K *inu' , pero luego descubr que e'iste una herramienta gra$icaque permite hacer mas $cil aun esta instalacin y la de otros productos sobre *inu'0&er in!#alan%o !o#1are 1in%o1! en Lin"-2.Lale la pena aclarar que para instalar+nternet e'plorer se debe contar con una licencia de (indows :verhttp?//www!tatan0a!com!br/iesKlinu'/page/*egalMnotices!

    Para instalar el +3s K *inu' lo puede hacer desde una consola de comandos de *inu'asi?

    wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-

    latest.tar.gz

    tar zxvf ies4linux-latest.tar.gz

    cd ies4linux-*./ies4linux

    http://www.tatanka.com.br/http://www.winehq.org/http://www.winehq.org/site/downloadhttp://www.cabextract.org.uk/http://www.tatanka.com.br/ies4linux/page/Legal_noticeshttp://www.tatanka.com.br/http://www.winehq.org/http://www.winehq.org/site/downloadhttp://www.cabextract.org.uk/http://www.tatanka.com.br/ies4linux/page/Legal_notices
  • 8/13/2019 PowerbuilderEnLinux (1)

    5/20

    7 listo! .o es di$cil, ya quedo instalado y $uncionando el +nternet 3'plorer en *inu'!Chora lo que quedaba era ver mi aplicacin sobre *inu' corriendo con el Browser de

    Aicroso$t! Para eecutarlo lo hice desde una consola de comandos as?(ine ie'plorer!e'e

    6 desde el modo gra$ico busca en la seccin de +nternet el Ccceso directo al +nternet3'plorer asi?

  • 8/13/2019 PowerbuilderEnLinux (1)

    6/20

    *uego accedemos a nuestro sitio de trabao y vemos nuestra aplicacin correctamenteen una ventana como la siguiente?

  • 8/13/2019 PowerbuilderEnLinux (1)

    7/20

    Cll los controles como los edit mas0 , los calendarios, list bo' y demas controles$uncionaron correctamente! 3n conclusin para eecutar una aplicacin PB web ormscorrectamente desde *inu' todava no es posible utili#ando ire$o' o 6pera, pero si es

    posible utili#ando +nternet 3'plorer para *inu'!

    3n mi caso particular he instalado +3 4 en las estaciones *inu', que usan mi aplicaciny utili#arla correctamente, aunque todava e'istan peque8os detalles gr$icos la$uncionalidad se soluciono a un 122F pues ya todos los controles $uncionaroncorrectamente!

    Como ejecutar aplicaciones cliente servidor en Linux

    Chora entonces el reto es eecutar una aplicacin nativa clienteGservidor en *inu'! *agran mayora de aplicaciones desarrolladas estn en este grupo :e'cluyendo lasaplicaciones nuevas que se han migrado o se han hecho como !.3 (indows ormsque son un grupo di$erente de las cuales hablaremos al $inal de este articulo! Cqu nosre$erimos a las aplicaciones tpicas hechas como aplicacin PowerBuilder!

    Chora para poder probar todo tipo de controles y $uncionalidades as como veri$icar laconectividad con base de datos, que meor que la aplicacin de eemplo de PowerBuilder 11 accediendo a una base de datos SN* Cnywhere!

    .uevamente he tomado un *inu' open suse 12!< pero podemos hacer $uncionar nuestraaplicacin PB en cualquier sistema operativo que soporte wine : )ed Oat, ent6S,edora, suse, mandriva, Slac0ware, "buntu, 9ebian, reeBS9, PGBS9, Solarisnormalmente con la instalacin completa de 6pensuse se instala wine, pero veri$ique einstale (+.3 si no lo tiene como se indico previamente!

    Chora lo que necesitamos es instalar nuestra aplicacin! Para hacer esto piense en winecomo si $uera un (indows 222 o DP :lo podemos con$igurar seg>n nuestraconveniencia, all pues tendremos que hacer todo lo que normalmente hara parainstalar una aplicacin en PB 11, como copiar la aplicacin , eecutar el runtime de PB ytener instalados los controladores de la base de datos, en este caso los controladores

    69B para eecutar la base de datos de SN* Cnywhere ! 3sta instalacin se puedehacer solamente usando wine, pero es bien complicado!

    Instalando Software de Windows en Linux

    "na manera mas $cil es utili#ando una herramienta gra$ica que ayuda a instalarso$tware de (indows sobre wine, que se llama (ine doors! 3sta aplicacin inclusive yatiene unos paquetes precon$igurados, listos para instalar que son comunes para muchas

    personas que usan wine! Por eemplo solo con un clic0 podemos instalar +nternet3'plorer, o A9C, entre otros! Para instalar wine doors puede baarlo de

    http?//www!wineGdoors!org/wordpress/-pageMidQ

  • 8/13/2019 PowerbuilderEnLinux (1)

    8/20

    haci@ndole clic derecho encima del archivo wineGdoorsG2!1!G1!i

  • 8/13/2019 PowerbuilderEnLinux (1)

    9/20

    +nicialmente instalamos los componentes bsicos como el mdac, el internet e'plorer,

    para no tener luego dependencia $altantes a la hora de eecutar nuestro programa!*a instalacin de estos programas en (ine doors es muy sencilla, simplemente se haceclic encima del programa que se desea instalar, y se hace luego clic en el botn aplicar!7a con esto comien#a la instalacin del so$tware seleccionado! 3s por eso que es mas$cil con esta herramienta instalar el +nternet 3'plorer, y en general el so$tware paracorrer en (ine es mas $cil con esta herramienta!

    *uego desde PowerBuilder en una maquina (indows creamos un paquete para instalarlos runtimes de PowerBuilder, utili#ando la herramienta para esto en Program$iles/sybase/powerbuilder 11/PowerBuilder runtime pac0ager, esta herramienta generara

    un archivo de e'tensin msi para instalarlo, 3ste archivo lo copiamos al cd o memoriausb o medio electrnico con el cual vamos a instalar la aplicacin en las estacioneslinu'! *uego de haber generado el eecutable de nuestra aplicacin copiamos nuestraaplicacin :eecutable y dlls o pbds al medio magn@tico donde ya tenamos

    previamente el runtime de PB :yo lo hice a trav@s de una memoria "SB, peropodramos copiarlo directamente desde la red local!

    7a teniendo el runtime y el eecutable los lleve a el equipo linu' y cpielos en unacarpeta, por eemplo /home/myuser/e'amplepb!Primero instale los runtimes de PowerBuilder! Para en el wine doors en el men> $ile,haga clic en la opcin install $rom cd, y all haga clic en browse para buscar de la

    carpeta /home/myuser/ e'amplepb y seleccionamos y corremos el programa msi deinstalacin del runtime de PB11!

  • 8/13/2019 PowerbuilderEnLinux (1)

    10/20

    3l siguiente paso es instalar los controladores de la base de datos o en este caso instalar

    la base de datos que vamos a usar :Sql Cnywhere! Para esto insertamos el 9 dePowerBuilder en la maquina *inu' e instalamos el SN* anywhere, usando wine doors,

  • 8/13/2019 PowerbuilderEnLinux (1)

    11/20

    usando tambi@n la opcin instalar desde un cd! 3n mi caso instale una base de datos sqlanywhere =, como se ve enla i3"ra.

    *uego si es necesario podemos austar la con$iguracin del 69B en (+.3 usando el69B Cdministrador!

    inalmente como *inu' es case sensitive entonces debemos renombrar dos archivos queel busca a may>sculas, para ello puede correr el siguiente comando en la carpeta dondeinstalo el runtime de PB! .ormalmente es la misma carpeta del usuario:/home/myusr/!wine/driveMc/program $iles/sybase/shared/power builder?p Pbvm11!dll PBLA11!9**p Ctl51!dll C*51!9**

    *uego desde una consola de comando podemos eecutar nuestra aplicacin usando wineas;(ine /home/myuser/appe'ample!e'e7 all podremos ver nuestra aplicacin eecutando cobre *inu'Ras

  • 8/13/2019 PowerbuilderEnLinux (1)

    12/20

  • 8/13/2019 PowerbuilderEnLinux (1)

    13/20

  • 8/13/2019 PowerbuilderEnLinux (1)

    14/20

    EJECUTAR PB.NET WIN4OWS FORMS APLICATION

    EN LINUX9esa$ortunadamente las aplicaciones windows $orms de !.3 hechas con PB todava

    no $uncionan correctamente en *inu'! odava estoy haciendo pruebas y buscando elmotivo del error, pero para resumir la situacin, he instalado en wine el !.3amewor0 , para ello tuve en cuenta las recomendaciones dehttp?//wi0i!winehq!org/Aicroso$t9ot.ety lo instale $cilmente utili#ando un utilitariollamado winetric0s :http?//wi0i!winehq!org/winetric0s se puede baar e instalar as?

    wget http?//www!0egel!com/wine/winetric0swinetric0s dotnet2chmod 555 winetric0s

    Sin embargo al eecutar el programa me sale un error como el siguiente?

    Siguiere trabaando en esto pero, por ahora podemos trabaar en aplicaciones PB en*inu' sin problema!

    6scar

    http://wiki.winehq.org/MicrosoftDotNethttp://wiki.winehq.org/winetrickshttp://www.kegel.com/wine/winetrickshttp://wiki.winehq.org/MicrosoftDotNethttp://wiki.winehq.org/winetrickshttp://www.kegel.com/wine/winetricks
  • 8/13/2019 PowerbuilderEnLinux (1)

    15/20

    L3)S+. 3. +.E*3S

    How to Use Applications PowerBuilder.NET on Linux

    Sybase with PB11 gave us what we have long hoped $or developers, the possibility o$ta0ing an application created in client / server architecture, and turn it into a webapplication, almost without having to move the code, and it is best without using serversapplications! 6nce our application list (eb$orms thin0 the $irst thing is that we have ourapplication Tmultiplat$ormT and $rom any operating system can use our application! Buthappiness ends when we go to a *inu' bo' to see our system !!!! open web browser andthe (eb ")* digits !!!!! and we mourn with, because even though the sale window

    as0ing the user and password! +magine now run as an application windows in linu' !!!+mpossible- .o, this article aims to give indications point to run applications made inPowerBuilder 11 on *inu' operating system!

    o organi#e in$ormation more easily have divided the article into two parts, one is howto run an application in PowerBuilder web$orm linu' and the second part as anapplication running on *inu' PB client server!

    Executive PB.NET WEB APPLICATION FO!S IN LIN"#

    irst o$ all letUs assume that since we made a web application $rom PowerBuilder ormsand already is running properly on a server windows o$ the organi#ation! Cctually inthis article we will deal with how to ma0e the application, rather we will deal with howto run on *inu' or use it!

    T$e %ro&le'

    o run a web application and made with PowerBuilder! .et (eb $orms on *inu' wemust ta0e into account various aspects! irst o$ all we must bear in mind that asp' pages

    and others generated through the $ramewo0 !2 are basically designed to run onmicroso$t +nternet 3'plorer, pre$erably version 4 or 5! he problem then is to see theapplication correctly with browsers TnativeT *inu', such as ire$o' or 6pera! + did asmall application to test the compatibility environment in web controls most common,as 9atawindows, chec0bo', radiobuttons, edit mas0 among others :see picture, andobviously the conduct in (indows with +nternet 3'plorer 4 or 5 but i$ we thin0 o$ aweb application, one hopes that this is multiplat$orm and can use it in other operatingsystems such as *inu'! o see how it wor0s on *inu', access the application $rom a*inu' 6pensuse 12!< this time using the 6pera browser :version =!< build 442, wherethe results were surprising, but surprising $or the bad, because nothing wor0ed as itshould, only chec0s that were operated radiobuttons and vertical and hori#ontal scroll

    bar, the other controls have not wor0ed!

  • 8/13/2019 PowerbuilderEnLinux (1)

    16/20

    he summary was as $ollows?

    (eb applications using orms opera version =!< build 442 on linu'l does not wor0 chec0bo'l radiobuton wor0ing properlyl he dropdown listbo' does not wor0, does not display anythingl edit mas0 do not wor0l he date Pi0e does not wor0, reload the page and does nothingl verical the scroll bar wor0ing properlyl the hori#ontal scroll bar wor0ing properlyl he picture Bitton, not pictured

    l he tab pages do not wor0l the list bo' does not wor0l law does not wor0

    + thought then that this was not the proper browser, then tried a browser with more0nown $or my use $ire$o' that + use a lot in windows :version that was used in the *inu'!2!2!4 but results were not encouraging either nothing, basically decon$igurationscreens leave, and even edit mas0 wor0, leaving some cut and some te'ts as the listbo'controls do not wor0 with clic0s :as it should but with doubleGclic0!

    he summary o$ the use o$ this application is $ire$o'

    (eb applications using orms $ire$o' version !2!2!4 on *inu'l does not wor0 chec0bo'l radiobuton appear without the te'ts, by clic0ing the radio button appears above the te'tcutl he dropdown listbo' does not wor0, does not display anything

    l edit mas0 do not wor0l he date Pi0e does not wor0, reload the page and does nothingl the vertical scroll bar does not wor0l the hori#ontal scroll bar does not wor0l he picture Bitton, not picturedl he tab pages do not wor0l the select list bo' does not leave with a clic0, wor0s with doubleclic0l law leaves no selection with a clic0, wor0s with doubleGclic0

    Lery discouraged by what + saw, + concluded that web applications made withPowerBuilder! .3 is not used $or other plat$orms di$$erent to windows! But + do not

    up and $ind the solution that wor0ed very well $or me

  • 8/13/2019 PowerbuilderEnLinux (1)

    17/20

    T(E SOL"TION

    Eiven that browsers TnativeT *inu' does not give the necessary results, then what isdone is to use the browser recommended, namely install +nternet 3'plorer on *inu'! Ct

    $irst it seems cra#y but a$ter a little research + $ound a proect called Bra#ilian +3S K*inu' $or quite some time implement +nternet 3'plorer $or *inu' with an easyinstallation script :http?//www!tatan0a!com!br ! Seeing his description what + reali#ed isthe 0ey when you run +nternet 3'plorer was to have installed (in! Ct $ind out that winewas $ound that (ine is an 6pen Source implementation o$ the (indows CP+ on top o$D, 6penE*, and "ni'! (ine as a compatibility layer $or running (indows programs!(ine does not require Aicroso$t (indows, as it is a completely $ree alternativeimplementation o$ the (indows CP+ consisting o$ 122F nonGAicroso$t code, however(ine can optionally use native (indows 9**s i$ they are available!:http?//www!winehq!org/

    o install +3 $irst chec0 $rom a console command that this wine and cabe'tract installedas $ollows?

    rpmGq (inerpmGq cabe'tract

    +$ they are installed the version which will have installed! +$ wine is not installed, youcan download it $rom http?//www!winehq!org/site/download and cabe'tract candownload it $rom http?//www!cabe'tract!org!u0/! +n my case + had cabe'tract but hadnot installed (ine then download and install the install as $ollows?

    )pmGi wineG2!=!42G1!

    Since ta0ing (ine installed, what + did was install +nternet 3'plorer on *inu', initiallyusing *inu' +3S K, but then + discovered that there is a graphic tool that allows eveneasier this $acility and other products on *inu' :see installing windows so$tware *inu'!+t is worth clari$ying that to install +nternet 3'plorer should have a license $or (indows:see http?//www!tatan0a!com!br/iesKlinu'/page/*egalMnotices!

    o install the +3S K *inu' can do $rom a console *inu' command li0e this?

    wget http?//www!tatan0a!com!br/iesKlinu'/downloads/iesKlinu'Glatest!tar!g#tar #'v$ iesKlinu'Glatest!tar!g#V 9GiesKlinu'!/iesKlinu'

    Cnd ready! +t is not di$$icult, + am already installed and running +nternet 3'plorer on*inu'! .ow what remained was to see my application running on *inu' with the

    browser $rom Aicroso$t! o run + did $rom a console command?

    (ine ie'plorer!e'e

  • 8/13/2019 PowerbuilderEnLinux (1)

    18/20

    6r $rom loo0ing at how graphic section o$ the +nternet Cccess to the +nternet 3'plorerli0e this?

    hen agree to our wor0 site and see our application correctly in a window li0e this?

    here controls such as edit mas0, schedules, list bo'es and other controls $unctionedproperly! +n conclusion to launch an application PB (eb orms correctly $rom *inu' isnot yet possible using ire$o' or 6pera, but i$ possible using +nternet 3'plorer $or*inu'!

    +n my particular case + installed +3 4 on *inu' wor0stations, using my application anduse it properly, although there were still minor details graphics $unctionality is a 122F

    $i' it and all controls $unctioned properly!

    As client server applications running on Linux

    .ow the challenge then is to run an application native clientGserver on *inu'! he vastmaority o$ applications are developed in this group :e'cluding new applications thathave migrated or have become li0e! .3 (indows orms that are a di$$erent group o$whom spea0 at the end o$ this article! Oere we re$er to as typical applications made

    PowerBuilder application!

    .ow to try all sorts o$ chec0s and veri$y the $unctionality and connectivity withdatabase, better than the sample application Power Builder 11 by accessing a databaseSN* Cnywhere!

    Cgain + have ta0en a *inu' open suse 12!< but we can run our application PB in anyoperating system that supports wine :)ed Oat, ent, edora, suse, mandriva, Slac0ware,"buntu, 9ebian, reeBS9, PGBS9, Solaris normally the $ull installation o$ 6pensuseinstalls wine, but veri$y and install (in i$ you do not have as previously indicated!

    .ow what we need is to install our application! o do this thin0 o$ wine as i$ it were a(indows 222 or DP :what we set as our convenience, then there will have to doeverything they normally would to install an application on PB 11, such as copying theapplication, run the runtime PB and have installed the drivers $rom the database, in thiscase 69B drivers to run the database SN* Cnywhere! his installation can be doneonly using wine, but is well complicated!

    +nstalling (indows so$tware in *inu'Cn easier way is using a graphic tool that helps install (indows so$tware on wine,called (ine doors! his application already has some pac0ages including preGcon$igured, ready to install that are common to many people who use wine! ore'ample with a single clic0 can install +nternet 3'plorer, or A9C, among others! oinstall wine doors can download it $rom http?//www!wineGdoors!org/wordpress/-

  • 8/13/2019 PowerbuilderEnLinux (1)

    19/20

    pageMidQ

  • 8/13/2019 PowerbuilderEnLinux (1)

    20/20

    uppercase, $or it can run the $ollowing command in the $older where + install theruntime PB! +t is usually the same user $older :/ home / myusr / !wine / driveMc /

    program $iles / sybase / shared / builder power?p Pbvm11!dll PBLA11!9**p Ctl51!dll C*51!9**

    hen $rom a command console can run our application using wine as well;(ine / home / myuser / appe'ample!e'eCnd there we can see our application running *inu' copper wellR

    3'ecutive PB!.3 (+.96(S CPP*+C+6. 6)AS +. *+."D"n$ortunately windows applications $orms! .3 made with PB still do not wor0

    properly on *inu'! + am still doing tests and see0ing the cause o$ the error, but tosummari#e the situation, he installed in the wine! amewor0 .3 , $or that + too0 intoaccount the recommendations o$ http?//wi0i!winehq!org/Aicroso$t9ot.et and installeasily using a utility called winetric0s :http?//wi0i!winehq!org/winetric0s can bedownloaded and installed as $ollows?

    wget http?//www!0egel!com/wine/winetric0swinetric0s dotnet2chmod 555 winetric0s

    But when the program runs + get an error li0e this?

    continue wor0ing on this but $or now we can wor0 in PB applications on *inu' withoutproblem!

    6scar