How to precompile a ColdFusion application under Websphere/Solaris 10 - coldfusion

I am in the process of installing a ColdFusion application on Solaris 10 64-bit (Sparc) running with WebSphere 6.1. The cfcompile script that comes with CF makes a reference to jrun.jar however this library is not available when CF is installed as an ear file. An abstract of cfcompile.sh is the following:
su $cfuser -c "${_JAVACMD} -cp $CLASSES -Dcoldfusion.classPath=$CFUSION_HOME/lib/updates,$CFUSION_HOME/lib -Dcoldfusion.libPath=$CFUSION_HOME/lib coldfusion.tools.CommandLineInvoker Compiler -cfroot $CFUSION_HOME -webinf $WEBINF -webroot $webroot $dir"
Do you see ways to solve this problem (that is to precompile an application), besides installing CF as a standalone running on JRUN server?

Have you checked the contents of the EAR file? There should be a WAR file, in which you'll find WEB-INF/lib. It may be in there. If so, extract it and place it on the classpath.
EAR/WAR file are just zip compressed archives.
This is just a "best guess" on my part.
HTH

Can you install in stand-alone mode on some other temporary location (preferably the same OS & version), and copy jrun.jar to where you want it to be, on the permanent home of the application?

I created my own version of cfcompile.sh on-site to work on the client's infrastructure. The most important part is to have a correct reference to j2ee.jar (found in WAS distribution).

Related

MSI Build uninstall- Installed directory not removing

I created the MSI build package for our application. After this installation, we triggered another dependent driver software in the separate process in a committed event of Installer class like below,
Process.Start (" Path of driver software ")
We are facing an issue, installed directory ( It's empty ) folder is not removing while un-installing the same. Actually like installation, we triggered the un-installation of dependent driver software in the separate process by overriding the Uninstall method of installer class.
Anyone, please help me to overcome this issue? How could I remove the installed directory?
I can't change the installation procedure, since we are aware that we can't process another installation/un-installation when another one is going.
You are running a non-MSI driver install EXE from within your MSI? Correct? Or maybe it is an MSI wrapped in an EXE?
Do you have Installshield Premier? Could you use a suite project and install the EXE via the bootstrapper before (or after) the MSI install? I have honestly never used this feature, but running setups in sequence is what it is for. Embedded custom actions in MSI files kicking off EXE files are notoriously unreliable. This is - in my opinion - especially true if you are running with managed code as well (which I think you are).
In the long run managed code may yield safer custom action code (security-wise based on CAS), but for now it seems to cause unwanted runtime dependencies - especially for very large-scale distribution (global distribution) targeting diverse Windows versions (Vista, 7, 8, 10).
I am told it takes a while to get used to Installshield's suite feature, but maybe it is better for you? You can run EXE files, MSI files, patches and zips in sequence. Some fiddling to define uninstall and upgrade behavior I guess and lots of testing. I am pretty sure corporate application packagers would be happy to see a suite rather than an MSI with lots of strange stuff embedded in it.
UPDATE: Once you have compiled a suite setup.exe file it can be extracted as described here: Regarding silent installation using Setup.exe generated using Installshield 2013 (.issuite) project file
Alternatively you could try to extract the setup.exe files for the driver setup and install the drivers as regular MSI components and run DPinst.exe to install / uninstall the drivers (tool from DIFx). Also quite clunky - especially when you need to include uninstall.
Your driver setup likely uses DPInst.exe already. I would check if you can extract an MSI from the EXE and use it instead of the EXE to include in the suite project. Some hints for how to deal with setup.exe files (extraction, runtime paramenters etc...): Extract MSI from EXE.
WiX has the Driver element in one of its extensions to deal with driver installs. I have never had the chance to test it.

How can I protect my source code when deploying on different computers

I have a program I just finish writing in CFML (.cfm files) for my client, but I don't want my client to see the source code. I will install the software on his computer. I tried using the compile.bat but when I install it on the other computer, it gives an error (java language...). What are my options?
#Bardware is correct: the target machine needs to have the same major version of Java as that which you compiled the code with, and probably for good measure the minor version should be the same or greater.
You can - of course - confront this from the other direction: find out what version of Java they have running, and compile to that version. However they will still need to be running at least the minimum Java version that is supported for the intended version of ColdFusion.
Also it's vital to note #Bardware's comment against the question itself:
cfcompile.bat calls findjava.bat. There a variable JAVACMD is set.
Coldfusion prefers the JAVA that resides within the CF installation
folder. That is an issue, since CF came with JAVA 7 but might be set
to run with JAVA 8 in the jvm.config. You might resolve the variables
from the command afterdeploycompdir and compile without using the bat
file.

Qt C++ application: self autostart installation in Linux

I'm porting some Qt Windows/VC++ code to Linux/GCC. The application can add it's own shortcut to the Windows Autostart folder so the application starts after login.
I want to do the same in Linux. I'm using Kubuntu 15.10 but the solution should work for virtually all (or at least most) Linux variants out there. And it should work without super user rights (or it should request the rights automatically).
I searched the web and found two solutions:
Add a desktop entry file to $HOME/.config/autostart
Add a symbolic link to /etc/init.d/
Will they both work in all Linux distributions? What are the differences? Which is to be preferred?
Also I would like to know if I should do that by programmatically running a shell command or if there is some native API I could use in C/C++ (including easy error detection).
I have put project in GitHub for managing auto-start feature in different OS. It's written in Qt.
Please check it and let me know if you have any problem using it:
https://github.com/b00f/qautostart
You can add application in various ways.
Via linux init system. For newest linux OS systemd is a standard. In this case your need to create systemd unit for your application
Via desktop manager, such as gnome, kde and possible others. In this case you need also create specification for autostarting your app.
Via bash files
I think, prefered way via systemd unit, because now this is standard way for starting process at boot time and for special user, if need.

Inno Setup - Setup.exe works locally, but not as a download

I compiled my first program this with Inno setup for a python 2.7 script with connections to opencv and numpy. The setup.exe works perfectly on my computer locally. It installs, it runs, there are no detectable errors.
When i go to make the setup.exe available through github:
https://github.com/bw4sz/OpenCV_HummingbirdsMotion/tree/master/Installer/Output
I can download the setup.exe, but on the SAME computer, it won't install: Error reads, the Windows version of the software is not compatible with the version you are running, check with the system if you need a x86 (64) or 32 bit version.
This is confusing to me, since the program was designed on this machine, and i just need to distribute it. Do i fundamentally not understand what Inno Setup does, i.e that a user needs to do more than download the setup.exe. I can provide scripts if needed.
Can someone point me in the right direction.
Thanks,
Ben
It depends on github. In a quick way I found this link, hope it help.

is it possible to have a C/C++ GUI application in linux bare-bone server?

I am very disappointed with my school linux server when doing the homework on it.
The reason is: my homework requires to make GUI application.
All the tool that I have is:
- ssh from my local machine to school machine
- gcc/g++ in my school machine
I have been thinking and tried out different solutions for a week.
I still can't be able to figure out how to bring GUI to my application.
Here is some solutions I tried:
- Install some graphical library (sdl,ncurses...) but school computer does not allow to install because i'm not the root user
- Try to compile with /X11/ to produce X-GUI application. Then running it throgh ssh (tunneling). This does not work either because school computer does not have headers file located in X11.
So, What CAN I DO? Anybody has suggestion?
I will thank you million times if you could help for a solution.
Thanks you much.
tsubasa
It should be possible to install most things, like ncurses or even X11, in user space (in your home directory), if you install them from source. With a Gnu package, you just use --prefix= as an argument to configure, like this:
./configure --prefix=/name/of/directory/to/install/into
I'm not sure about the other packages.
Without a GUI library to link against, you won't be able to develop a C/C++ app on that server. It seems to me that you have a few options:
1) Develop this GUI app someplace else. If it has to be in Linux, and you're a Windows/Mac user, you can install Ubuntu (or some other Linux Distro) on a Virtual Machine and get a full featured environment.
2) Contact the Linux administrator to explain the homework assignment and convince them to install a GUI package for you. (It may help to have your professor also contact the Linux Administrator) (If you don't know who the linux admin is, try emailing root#linuxbox
3) Bend the rules on what a "GUI" environment is. For example, can your C/C++ app output HTML files for a GUI-like experience through a web-browser?
4) Try to install some sort of GUI package inside your account on the server. This will likely fail unless you are very, very good at administering a linux box, and you've hand-built packages before.
Could do it with ncurses
Perhaps you could ditch the school server and use Virtualbox to run a linux VM locally on your machine and develop on that. It's free.
From "INSTALL" file in ncurses source archive:
The package gets installed beneath the --prefix directory as follows:
In $(prefix)/bin: tic, infocmp, captoinfo, tset,
reset, clear, tput, toe
In $(prefix)/lib: libncurses*.* libcurses.a
In $(prefix)/share/terminfo: compiled terminal descriptions
In $(prefix)/include: C header files
Under $(prefix)/man: the manual pages
Note that the configure script attempts to locate previous
installation of
ncurses, and will set the default prefix according to where it finds the
ncurses headers.
Do not use commands such as
make install prefix=XXX
to change the prefix after configuration, since the prefix value
is used
for some absolute pathnames such as TERMINFO. Instead do this
make install DESTDIR=XXX
So I'd recommend using "make install DESTDIR=XXX" where XXX is the location where you have write persmissions.
HTH