What is the best procedure to Coup up for the above mentioned subject? 30+ Users are working in day and night shift and there is no room for me to compile if the users are active.
If I understand you correctly, the best solution is to use what's called a loader program. A loader is a program you create, and which ideally never changes. This program has only a few responsibilities:
1. Check the size and CRC of the local main exe and other listed files and compare them to the versions on the server. If the versions on the server are different, copy them to the local machine, overwriting the local files.
2. Start the main exe
Sometimes the loader has more responsibilities, but not always. As you see, running the programs from local files is essential, never run from remote files.
If you update something, or if you want to go back to a previous version because you have some difficulties, all you have to do is update the files on the server and ask the users to restart their program.
Yes, and one way to do that is to use Robocopy mirror mode. It mirrors what you put in a server side update "repository" to a local application folder, so you always know how user clients look like by looking and maintaining the server side repository directory.
That said this has nothing to do whatever with "online compiling". Compilation is a thing you do in your source code project and you don't deploy that to users at all, you only deploy your EXEcutable and runtimes. Even if you'd deploy something to a webserver (there is for example FoxWeb and I don't know if you talk about a web application built with VFP), even then you compile on your development machine locally, there is no online compiling. You may have your PJX in the LAN, you may compile the EXE right into the folder users use them, I wouldn't do that, development, testing and deploying are separate steps and therefore don't share folders.
I also don't know, if that's really your question, you already have been shown what tbleken answered in thread184-1758946. Either you forgot that or didn't get the gist of it.
Alisaif, could you please clarify if any of our answers is of any help or what you really want to know?
Just about the english: Compiling online means to do the compilation online. VFP is no online tool or IDE, so we guessed you meant on the LAN, where pjx is in the LAN, your EXE is on the LAN. Maybe you want to run your EXE in the internet? That's a totally different story and the simple answer is: you can't compile something for running on the Web, just by making some setting. VFP user interface is winforms, that's desktop Forms, not HTML a browser renders. This is a totally different way to produce output to the user and let him interact, get the feedback of his interactivity.
Can you make a vfp application runnable somehow in the web? FoxInCloud offers that, it has some preconditions and also doesn't simply run 1:1 as is EXEcutables, there are simple OS things needing a new equivalent, eg MessageBox(), so you have to adapt at least a bit towards a web usable interface. Even if manage to get over all the little hurdles with this tool, it's just not the Web, the Web should work with a totally web oriented development stack and so you'd for example create an ASP.NET website or PHP, use some framework. A "native" web application has to have a webserver acting on requests and answering with a set of HTML, CSS, Javascript, Images, which in turn can do further requests, a good interface uses Ajax as client side intelligence. What works some server side and serves the userinterface is also doing the data access and serves data with the HTML/CSS/Javascript interface as already mentioned.
Lots of the things you do on a simple normal VFP form are locating another record, doing SQL Queries etc. This is not so simple within a HTML form, The client only has the browser interface, data has to be sent to the client and fetched from the server, you have to o calls for this to happen, you can't simply do a SQL-Select, you'll have to make a server request making that query and returning something client side javascript can use to update the HTML, for example. Much more work to do in detail.
Thanks Mr.Olaf for the explanation. I don't want to run EXE in the internet. My EXE in in the LAN and I cannot build EXE after some changes in the FORMS or VCX.
And, I could not understand how to create loader file.
In short, a loader program is a small program whose only function is to look for the latest version of your application, and then to execute it. The loader would normally have the same name as your application, and would be launched directly by the user from a desktop shortcut or from the Start menu.
For example, suppose you have an application called "SaifAccounts". Your loader would be called SaifAccount.EXE. When you create a new version of your application, you might give it a name like SaifAccountsNNN.EXE, where NNN is the version number (or just a consecutive integer). The user launches SaifAccounts.EXE, which looks in a designated directory for all programs whose names are like SaifAccountsNNN.EXE. It then determines which is the most recent of these (which might be the one with the highest value of NNN, or the most recent date stamp).
Having identified the correct EXE file, the loader executes it, usually with ShellExecute(). The loader program then terminates.
This means that you can build a new version of your application and place it in the relevant directory at any time that is convenient to you. You don't have to worry about whether the previous version is currently in use. The next time each user runs the application, they will automatically get the latest version.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
>My EXE in in the LAN and I cannot build EXE after some changes in the FORMS or VCX.
You have to go into the server and cut off users, users shouldn't use the EXE in that server folder, it should just be there for a loader to update clients as per your question and solution in thread184-1758946
Either you didn't apply the solution provided in that thread, or some user created a shortcut to the EXE in the LAN anyway. This hinders you to update the EXE as any file open by anyone, even only for execution, hinders you to replace it. Even as admin. This exe is not meant to start, it's only meant to be copied to a clients local disk drive and be started there afterwards. Then you don't have that problem. That's the whole reason for that loader concept and that is the core thing I would have expected you not only to understand, but you should want this. Not being able to update a server share file is the reason you use that solution to not start there but load to a local drive.
If you go to the link which you have been given twice above, you will find information about the "Loader" program.
An Application starter (with auto copy from server into local station).
faq184-4492
Yes, that program may need to be modified to meet your exact situation, but it will give you basically what you need.
You then compile that "Loader" into its own EXE file.
Now your users desktop shortcuts will need to 'point' to the Loader executable.
When they launch the Loader it will compare the Modified Date/Time of the local copy (on the separate user's workstation) of your primary VFP application EXE's with the Modified Date/Time of the server copy (on the central server).
NOTE - some of the modification you might need to make to the Loader involves its 'knowing' where to find the local copy and the server copy of the application.
If these Date/Time's do match, then the local copy is launched 'as is"
If these Date/Time's do Not match, the server copy is copied onto the user's workstation and then launched from there.
Since the users are running their own local copies of your primary application and not the central one, you can modify the Server copy whenever needed.
And the Loader ensures that the user's will always get the latest version when they launch the application from their desktop shortcut.
I also gave ou a very simple loader via the code, you save that text as a file with cmd file extension, it makes use of Robocopy, which is part of the OS at least since Vista.
There is only the need to adapt it to your file locations. Users then start this cmd file (via a shortcut) and not the EXE, the cmd robocopy only copies the server share EXE (and other files you may need), when they need to be mirrored, ie when they are newer (update) or older (downgrade).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.