Cameyo

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Packaged app trying to use relative path - not working


Newbie

Status: Offline
Posts: 2
Date:
Packaged app trying to use relative path - not working
Permalink   
 


I have an app that I have packaged within Cameyo (app is just a collection of .dll files and a .exe). The app itself is expecting a .conf file to be in the same directory as where the app is executing. I do not want to package the .conf file inside the Cameyo package because I need users to be able to edit the file.

The app.cameyo.exe package is placed out on a network share where people can execute the package. When they execute the package, the app is looking for the .conf file to be in the same directory. The problem is that the app is looking in the %appdata%\VOS\app\PROG directory as its working directory instead of where the app.cameyo.exe package is placed.

How can I get the packaged app to see its working directory as the location where the app.cameyo.exe was launched rather than the VOS directory? Ideally, I would like for the users to take the app.cameyo.exe and the .conf file and copy them locally to run the application if they want to, so hard coding the location of the .conf file is not idea. The app packaged in cameyo needs to be able to determine where the app.cameyo.exe was launched from to access files using relative paths.

Any ideas?



__________________


Guru

Status: Offline
Posts: 912
Date:
Permalink   
 

Running the package with the parameter "-Properties:StartingDir=[location]" will define the starting directory for that session.  To make it persistent, use Cameyo.exe "-SetProperties:StartingDir=[location]" appname.cameyo.exe

You can take a more manual or scripting approach by using a virtualized Command Prompt, i.e. appname.cameyo.exe -exec cmd



__________________


Newbie

Status: Offline
Posts: 2
Date:
Permalink   
 

Thank you for the information. I think I have some work to do within my application because setting the StartingDir causes other issues. For example, the real app.exe packaged within the cameyo.app.exe is depending on some .dll files that are also sitting in the directory with the app.exe. So when I set the StartingDir parameter, my app can find my app.config file now, but it cannot locate the .dll files.

So it would appear that parts of the app need to see the "StartingDir" as the location in the VOS folder where the app.exe is, and to make my app reference the app.config file outside of the VOS folder I'll need to do some custom code. I'm testing with using the environment variable CAMEYO_RO_CARRIERDIR within my application code to reference the directory from where the app.cameyo.exe was launched. That seems to work fine so far.

I guess you can't have it both ways. I need my code to find DLLs in the VOS folder, but also to find files in the carrier directory as well.



__________________


Veteran Member

Status: Offline
Posts: 56
Date:
Permalink   
 

Have you tried running your cameyo.app.exe and all the related files from a USB drive? Alternately, you can edit your cameyo.app.exe to change the disk storage location. Either way, no files would go to a VOS folder, and you may be able to work with all your files in a single location.

__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard