i want to access a Resource file while Installation Process. I added a File as Resource into my Setup. Now i need to access this File while the Setup Porcess.
Is there a way to access the file during installation?
Resource files are extracted to the directory contained in the installer variable sys.resourceDir at startup.
If the name of the resource file is resource.txt, the full path at runtime is given by
${installer:sys.resourceDir}/resource.txt
Related
I am using Rundeck CLI. Where should I keep the resource.xml file so that it is available for the given project? Is there any specific location the file needs to be or it can be in any folder and one just point out to the location?
No specific place is needed for the resources.xml/resources.yaml files (also, you can use any name for that file btw, for example: project_test.xml). You can use any location reachable by the rundeck user (RPM/DEB-based installations) or reachable by the user that launches Rundeck (WAR-based installation). A good place to store these files could be the /var/lib/rundeck/ path.
I need to collect a property file from a remote machine for my software to be installed using Install4J. Does Install4J provide functionality to collect/transfer files from remote locations to the local environment to proceed through installation?
You can use a "Download file" action to download a file from a URL to
${installer:sys.resourceDir}/my.properties
which is the temporary directory of the installer. In further actions you can refer to the downloaded file with the above syntax.
I'm trying to implement a MSBuild/deployment script for a customized QBO3 installation. I can build and publish to a remote Dev machine with the script that I currently have. However, my msbuild script is copying my bin folder to C:/inetpub/wwwroot and I need them in a different directory (C:/inetpub/devqcc.quandis.net).
Within my script, is there a way for me to specify a different destination folder for the files to get copied into?
The qbo3 MSBuild targets are designed to support both a file system deployment, and deployment via WebDeploy.
File System Deployments
To target a custom folder for file system deployments, specify a PublishFolder parameter:
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"PublishFolder=c:\inetpub\devqcc.quandis.net"
WebDeploy
To target a custom folder with WebDeploy (which sounds like your use case), specify a SiteName parameter:
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"SiteName=devqcc.quandis.net,Server=1.2.3.4,User=myUserName,Pwd=secret"
WebDeploy does not write to a file path; instead, it communicates with IIS and IIS determines where to place the files. This implies that your target box must already have a website configured to use the folder you are targeting.
For example, assume you have the following file structure on disk:
c:\inetpub\wwwroot
c:\inetpub\devqcc.quandis.net
c:\inetpub\uatqcc
with cooresponding IIS websites:
Default Web Site: root folder is c:\inetpub\wwwroot
devqcc.quandis.net: root folder is c:\inetpub\devqcc.quandis.net
uatqcc: root folder is c:\inetpub\uatqcc.quandis.net
To deploy to the c:\inetpub\devqcc.quandis.net folder, tell WebDeploy to use the devqcc.quandis.net website:
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"SiteName=devqcc.quandis.net,Server=1.2.3.4,User=myUserName,Pwd=secret"
To deploy to the c:\inetpub\uatqcc.quandis.net folder, tell WebDeploy to use the uatqcc website (note this example the site name != the folder name):
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild' .\qbo3.Sample.proj /p:"SiteName=uatqcc,Server=1.2.3.4,User=myUserName,Pwd=secret"
If you review the qbo3.Sample.proj file, note that it provides defaults for both the PublishFolder (for file system deployments) and SiteName (for remote deployments via WebDeploy):
<PublishFolder Condition=" '$(PublishFolder)'==''">c:\inetpub\wwwroot</PublishFolder>
<SiteName Condition=" '$(SiteName)'==''">Default Web Site</SiteName>
"The configuration file C:\mywebapp\mydoamin.dll.config could not be found."
mywebapp domain is the originating code. mydomain is the executing code that references FileConfigurationSource and that is where the config file is located. I'm expecting it to look in mydomain... c:\mydomain\mydomain.dll.config instead. Am I missing something?
If you are using a relative path with FileConfigurationSource it is going to look for the file in the AppDomain.CurrentDomain.BaseDirectory directory. Actually, it will combine the BaseDirectory with the relative path given as the constructor argument to try to locate the file.
You either need to deploy the configuration file into the web root directory (based on your current code) or use an absolute path.
I am trying to automate deployments of a particular project and a bit lost as to who to handle config file as well as user assets.
(Application is based on Zend Framework based btw).
Main application folder is structured as follows:
./app
./config.ini <----- config file
./modules
./controllers
./models
./views
./libs
./public
That config file is where all the configs are stored.
So 'app' folder contains whole bunch of code in PHP and 'public' contains whole bunch of code in JavaScript, HTML/CSS and stuff like that(web accessible basically).
If I follow Capistrano's model, where each package is expanded into it's own folder that is then symlinked to, how do I handle that config.ini file?
What about all the user content that is uploaded into ./public folder?
Thanks!
The Capistrano approach to this is to have a structure like this on your remote server:
releases/
20100901172311/
20101001101232/
[...]
current/ (symlink to current release)
shared/
in the shared directory you include your config file and any user generated content (e.g. shared/files). Then on each deployment, once you've checked out the code you automatically create symlinks from the checkout into your relevant shared directories. E.g.:
releases/20101001101232/public/files -> shared/files
releases/20101001101232/application/configs/config.ini -> shared/config.ini
that way, when a user uploads a file to public/files it is actually being stored in shared/files.