Delphi RAD Studio Deployment Manager Remote Path for Appx Deployment - deployment

I'm searching for some documentation of the Delphi RAD Studio deployment manager, that describes in detail available remote path settings, if I like to include additional files, that have to be deployed to the HomePath (AppData Sub-Folders on Windows) or to HomePath for other platforms?
Are there any variables for special folders like homepath?
Is it possible to include additional files for AppData subfolders on Windows for an appx Windows Store deployment (for example some SQLite database to AppData\Roaming\examplefoldername\data\name.db or some config file to AppData\Roaming\examplefoldername\config.cfg)

Related

Collect resources (ie. properties files) for Install4J from remote machines

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.

QBO3 deployments targeting a custom folder

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>

There is no GAC folder on my clients PC

I've created an installer for my vb.net application and given it to a client to install, but it's getting a series of errors. I appear to have fixed most of them, but the one that's really causing an issue is one saying
Unable to install or run the application. The application requires that assembly CrystalDecisions.ReportAppServer.XmlSerialize Version 12.0.1100.0 to be installed in the Global Assembly Cache (GAC) first.
However, there is no GAC folder on the clients PC when looking in Windows\assembly
I've even searched the Local Disk for GAC, and the only folder results are GAC_MSIL, GAC_32 and GAC_64...
Where do I put this file to make the application work? Why is there not a GAC folder in the Windows\Assembly root?
The GAC folder for .NET 4.5 (and anything after 4.0) is here:
C:\Windows\Microsoft.NET\assembly
There are three folders beneath that (as you've found):
C:\Windows\Microsoft.NET\assembly\GAC_32
C:\Windows\Microsoft.NET\assembly\GAC_64
C:\Windows\Microsoft.NET\assembly\GAC_MSIL
Where the assemblies should reside depend on which type of CPU(x86 or x64) they target. You shouldn't put assemblies in those folders yourself; they should be installed there by your deployment mechanism.

How to avoid mixed output files with MSBuild?

I have a C# big project in Visual Studio 2013 that is formed by:
3 Web projects
2 Windows Services project
14 Dlls projects
2 Test projects
1 Database Project (.sqlproj)
As you can guess the final files are:
3 Web Projects
2 Windows Services
Database
I build it with msbuild.exe invoked from PowerShell.
$msbuild="C:\windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe"
$option0 = 'FOO.sln /t:Clean,Rebuild /p:Configuration=Debug /p:Outdir=$outputdir'
iex "$msbuild $option0" | tee C:\TFS\Oscar\Build\oscar.txt
The project builds and in the output folder I have a nice directory called _PublishedWebsites that contains the three websites, one in each directory. From here it wouldn't be complicated to deploy to servers using PowerShell.
In outputdir I have my FooDB.dacpac so I can easily use sqlpackage to deploy it to SQL Server.
My problem is with Windows Services. Instead of being in a folder they are in output folder, mixed with all DLLs, sqlproj files, test files.
Is there any way of having them in a folder similar to "_PublishedWebsites"?
I can copy all files to each windows service folder on deploy and will work... but feels wrong...
YES! You can actually use MSDeploy which is the underlying technology for WebDeploy to create a similar deployment package for a Windows service or scheduled task.
The basic steps are
extend MSBuild to zip up the files into a package
add pre/post sync commands
create a deploy cmd to execute the package
https://dotnetcatch.com/2016/03/18/deploy-non-web-apps-with-msdeploy/
We've been using the nuget package PublishedApplications in in our Windows Service projects (which are actually just Console Apps using TopShelf ).
As a result, we get a nicely packaged app in the output folder {OutDir}/_PublishedApplications/{appName} (next to {OutDir}/PublishedWebSites) for those services.
I'm still looking for a way to get a similar behavior for *.sqlproj projects ...

Microsoft Robotics Studio and absolute path problems

I have just installed Microsoft Robotics Studio 2008 R2, and I must admit that I'm shocked to discover how paths are handled.
First of the studio wants to install itself into my personal profile (this is on Vista):
C:\Users\MyUserName\Microsoft Robotics Dev Studio 2008 R2
I assume this is because during development I have to write files to the robotics studio folder making C:\Program Files a no go.
Then when I create a new robotics project a lot of absolute paths pointing to the robotics studio is added to the project. If I check my project into source control and another developer checks it out onto his machine the absolute paths will not resolve and the project will not compile.
Also, since all services are collected into a single folder in the robotics studio folder developing multiple independent services on a single computer appears to be at least confusing.
Do you have any good strategies for handling this mess?
I have now figured out a way to change a Microsoft Robotics DSS Service visual studio project into something that you can compile and run in you own source tree independent of the installation path of the robotics studio. Here is a description of what you need to do to modify the project:
Add the robotics studio bin path to you PATH environment variable to be able to execute dssproxy.exe without supplying a full path. I have installed robotics studio into the program files folder to avoid accidentially writing files to the robotics studio folders.
Open the Properties page for the project and select the Build tab. In the Output section change the Output path to Debug\bin. For .NET projects it is customary to compile into folders bin\Debug and bin\Release but the robotics hosting service expects to live in a folder named bin and will store data in the folder above the bin folder.
Go to the Signing tab and select a new key in the Choose a strong name key file box. You can either generate your own key at that point or use the sn.exe utility to generate a new key. Or if you have your own policy for creating keys follow that. The sn.exe utility can be found in the tools folder of robotics studio.
In the Build Events tab edit Post-build event command line:
dssproxy.exe /dll:"$(TargetPath)" /proxyprojectpath:"$(ProjectDir)Proxy" /keyfile:"$(SolutionDir)Key.snk" $(ProxyDelaySign) $(CompactFrameworkProxyGen) /binpath:"." #(ReferencePath->'/referencepath:"%(RootDir)%(Directory) "', ' ')
Pay attention to the argument to /keyfile. Enter an expression that locates the strong name key file created in the previous step.
Copy the files DssHost.exe and DssHost.exe.config (or DssHost32.exe and DssHost32.exe.config for the 32 bit hosting service) from the robotics studio bin folder into the project folder and add these files to the project. Set the Build Action to Content and Copy to Output Directory to Copy if newer. Do the same for the manifest file for your service. Actually, the manifest file doesn't have to be in the same folder as the service, but copying it to the output folder enables you to do XCOPY deployment.
In the Debug tab change the Start external program to the DssHost.exe in the output folder of your project. You will have to build the project once to copy the file to the output folder. Clear the Working directory. Set the Command line arguments to
/p:50000 /t:50001 /m:DSSService1.manifest.xml
Change the manifest file name to the proper name in your project. You can modify the port numbers used either here or in the DssHost.exe.config file. If you are running in a protected Windows environment (UAC) you will have to use the httpreserve command to give yourself access to a particular port. You have to run this command as administrator.
Debug settings are not stored in the project file and each developer will have to create personal settings.
You should also update the Release configuration accordingly.
Since I was only interested in the CCR of MS Robotics, I just add these assemblies as a reference to any project I use it with and just be done with it.
This works without any problems. So if you are also only interested in the CCR and DSS part of the studio then this could be your solution
Reinier
we see this problem a lot. The absolute easiest solution is to specify the install directory when installing robotics studio to be "C:\program files\microsoft robotics studio". That way moving code between machines, checking out of source control, etc becomes a lot less problematic.
The other option is to use dssprojectmigration, which is included with RDS. Just run dssprojectmigration against your project directory, and it will correct all the hardcoded paths.