V17 R5 ClientLocal Folder

It looks like V17 R5 has a bug where if you are using 4D remote the ClientLocal folder is being ignored.

In V16 R6 and V17 R4

$vt4dfolder:=Get 4D folder(4D Client database folder)

returns

E:\4D V16 Dashboard - V16 R6\ClientLocal\

or

C:\4D Clients\4D V17 R4 Pet\ClientLocal\

ie the clientlocal folder next to the 4d.exe

In V17 R5 it uses the default path and ignores clientlocal.

C:\Users\Paul.COMPLETEPICTURE\AppData\Local\4D\Back Office_10_10_1_17_19814_037\WebFolder

Anyone else seen this ?

This appears to have broken the ability to set the path to the web folder on 4D Remote to something other than the automatically generated folder in users profile. This makes web development impossible.

Is is no longer necessary to create a ClientLocal folder to specify a local client cache.

Note that since v17 64-bit on Windows, it is possible to launch multiple instances of 4D.
(On Mac this was always possible, by the CLI open -n)

The ClientLocal feature was originally used to let multiple instances of 4D connect to the same server.

Starting with 17 R5, the client local cache folder has a suffix,

derived from a hash value of the full path to the application; 3 decimal digits, incremented until there is no collision. a client local in use has a file named inuse.txt and uuid.txt. the former contains the process ID and full path to the application separated by LF, the latter contains a UUID.

so instead of the default client local folder in R4

\AppData\Local{ApplicationName}{DBName}{ServerIP}{ServerPort}

we now have

\AppData\Local{ApplicationName}{DBName}{ServerIP}{ServerPort}_{hash}

Get 4D folder(4D Client database folder) returns this path.

By default a built client app on Windows is blocked from launching a second instance,
but this can be over-ridden by the build key

Preferences4D/BuildApp/CS/ClientWinSingleInstance

https://blog.4d.com/concurrent-merged-clients-from-the-same-computer/

I worked that out saw the uuid.txt file however is a very bad solution if you are developing and also deployment.

For development I have the default webfolder next to the application ie /webfolder and this is all located on the server for raid backup purposes etc. It would be a nightmare trying to develop using the path to the users profile AppData folder defined for the web folder the same applies to resources. Developing using a path in the users profile is ridiculous From a practical perspective and also running things like Git which we use for our web development. We have a complete workflow set up for the HTML and CSS PHP etc.

The same for deployment. In testing we use the Web server on 4D client. Using the path to the logged on users profile is ridiculous. We need to be able to define where the web folder is and this impacts the resources folder because we have our PHP scripts etc all relative to the location of the web folder which is at the same level as the resources folder.

This would not be a problem if client local folder was no no longer ignored And the correct path returned as before ie Get 4D folder(4D Client database folder). The issue is that this has been removed from R5. There is no reason why this cannot remain in place and the uuid.txt file is created in the client local folder.

Also the blog post refers to merged clients. However the issue is not a merged client this is a development problem with 4D remote. This solution pretty much rules out webserving with 4D client.

I understand that you have concerns - but please try to make a difference for deployment - and development/testing.

It might not be a difference for you personally, but we have customers deploying to thousands of sites and this needs to be fully automatic. It was a major request.

For your description of internal development/testing concerning a web folder location outside of user profile folder, to have a “fixed” folder location to sync with git:
I always thought this is why we have WEB SET ROOT FOLDER (https://doc.4d.com/4Dv14/4D/14.4/WEB-SET-ROOT-FOLDER.301-2512070.en.html)
Doesn’t that answer your need?

You want to make sure it is outside/not controlled by 4D’s automatic client update mechanism, so set a folder somewhere else.