I have finished a project that contains reports designed by Crystal Report, and now I want to deploy it, I found a lot of ways to do it (Install Shield,InnoSetup...)
But I am relieved to WIX (Windows Installer XML), and I want to know how to include some packages into it like Crystal report, .Net Framework...
Thank you all in advance
You could redistribute crystal reports runtime as separate msi, and include it in a bootstrapper for example.
Also there are merge modules for Crystal Reports. You can include these in wix using "Merge" element. This is more or less equivalent to checking corresponding checkbox in VS / Installshield.
You can find the merge modules in your CR VS installation folder. Also it looks you can find the latest ones here: http://scn.sap.com/docs/DOC-7824
.NET Framework cannot be included as msm package; you should use a bootstrapper. Take a look here for example:
http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html
Related
I used Visual Studio 2015 InstallShield Limited Edition Project to create my application setup.
My application must be installed api.msi, .net3.5 and .net4.5 to be exeuted.
In "Specify Application Data->Redistributables", I only can add .net3.5 and .net 4.5 to my setup. but i can't add api.msi to Redistributables.
How do i add api.msi to Redistributables?
this is my Redistributables
I hope the installation steps are as follows
run setup->set install path->install .net(3.5 and 4.5) & api.msi & application.
Best way to do it is by creating merge module and add it to your project for details refer the link
InstallShield can include either merge modules or prerequisites, but the Limited and Express editions do not include the capabilities to build either. Both options are available with the Professional and higher editions, and other tools may be able to create merge modules.
You can download an eval copy of InstallShield and throw it on a VM. Build your setup prereq file (.PRQ) for it. Copy the PRQ and api.msi to your machine with InstallShield LE and consume it.
You can read more about how to author a PRQ here: (Disclosure: My blog article from 11 years ago)
http://iswix.com/2006/11/21/using-installshield-12-to-install-net-framework-3-0/
I maintain an open source project called IsWiX that creates graphical UIs for managing XML documents. I thought about creating a tool to maintain PRQ files. It would only take me a day to write it but I was concerned Flexera might get really irritated. :)
I am trying to write a plugin (actually a visual studio template wizard that generates the plugin) for an existing application. As part of the plugin installation, I have to insert entries into a configuration database. Often there are multiple DLLs corresponding to different parts of the functionality, sometimes each requiring entries in the same tables, but usually with different combinations of table entries. I need to add those from my installer.
Everything is in C#, for policy reasons.
I'm currently using Visual Studio Installer (VS2010) to create the installer. I'd prefer to use something that is likely to be installed on the user's machine to keep the template / wizard installation simple, but I could (if necessary) bundle / chain-install an open-source (or at least freely redistributable) alternative installer.
For example, to add a menu entry to the application, I have to insert entries into a couple of tables. In the past, I've done this by using an installer helper (sometimes an application, sometimes an installer class) that is called from the installer application. In that design, I would embed the settings I need to add to configuration tables into the installer helper, then execute SQL (via C# :-)) to actually do the add.
The problem is that this leads to repeating the same information into two places, and it's not very maintainable or clean in a wizard environment. I'd really prefer to introspect this information from some attribute I can set on the plugin assemblies.
However I've stumbled at the first step - how can my Installer class find out which assemblies were installed (or will be installed) by this installation?
I did consider trying to embed the list of DLLs into a custom installer property, but that will be hard to generate from my plugin wizard too. Ideally there would be some existing event I can register for, or an existing property I can read, but I haven't discovered it yet.
What you can do is use the Windows Installer API to dump all the DLLs contained in a given MSI package.
In C#, there are various libraries or sample code available to do this.
Here, I will use the open source Wix toolset project's DLLs. So, you just need to download the binaries (not the wix installer), create a project and add references to Microsoft.Deployment.WindowsInstaller.dll and Microsoft.Deployment.WindowsInstaller.Package.dll in this binaries directory
Here is a sample program that writes out all DLL files part of the package.
class Program
{
static void Main(string[] args)
{
string path = #"... myfile.msi";
using (InstallPackage package = new InstallPackage(path, DatabaseOpenMode.ReadOnly))
{
foreach (var kvp in package.Files.Where(f => Path.GetExtension(f.Value.TargetName) == ".dll"))
{
Console.WriteLine(kvp.Value.TargetName);
}
}
}
}
}
I'm not clear on what happens between running the wizard and seeing the .msi. (Is the output of the wizard a VS project or the .msi itself [in which case, end-user wouldn't need VS at all]?) But, let's get started...
It seems like your bottleneck is Visual Studio Installer. It is also a timebomb because it will die with VS2010. Many projects (e.g. Visual Studio itself) use the WiX Toolset instead. For Visual Studio and SharpDevelop users, WiX is "is likely to be installed on the user's machine" and is "open-source." It is available as binaries you can include in your wizard, or the full product can be installed (including a VS extension) from NuGet, Chocolatey or exe by or for the user.
With WiX, you write or generate XML files that describe the contents, UI and action sequence of a Windows Installer package. WiX executables are invoked to do the actual build. If you install WiX's MSBuild files, you can use an MSBuild project to orchestrate the build. If you install WiX's VS extension, you can use VS to edit the project. (A modern VS project is an MSBuild project.) MSBuild comes with .NET (until the next version, where it will be a separate addon).
So, the wizard can generate files for WiX based on user input and data from the plugins. It can also build the MSI. You could still use your Install Helper but it would be better to use WiX's SQL Server custom actions (if they apply in your case) to reliably support uninstallation and upgrading.
Since at least some of the plugin installation and configuration data comes from the plugins, you can have the plugin projects generate it so it can installed with your wizard. WiX supports placing information for separate components in separate files so you wouldn't need to maintain a combined file for your wizard. If the informations is simple, the plugin author could maintain it manually. Otherwise, it can be generated at plugin edit-time or plugin build-time. At edit-time, you could use a T4 template (content mixed with C# code). At build-time, you could use an inline or compiled custom MSBuild task (written in C#). [.csproj files are MSBuild projects.] Again, your wizard installer would grab the generated files along with the plugin DLL to install on the machine where the wizard runs.
You can also use WiX to install your wizard. If your wizard is a VSIX package, use WiX's VSIX custom action. Heck, you could probably use the Wix files for the plugins for both the wizard installer and the installer generated for the user.
I've created a bunch of RPT files and we've been using Business Objects to run them against our sql db using a different param's for each rpt file to generate a pdf.
Is there an api I can use to run these reports?
I've downloaded and installed crystal reports for visual studio, but (1) I'm not sure which dll's I need to add to accomplish this and (2) I can't find any documentation or sample code -- can anyone point me in the right direction?
I'm not quite sure what you are trying to accomplish, your question is not very clear. If you are looking for a program to view the reports in, SAP has a free version of the Crystal Reports Viewer available here. If you want to create applications to run your reports in, you will need something like Visual Studio, which lets you create Windows Forms or Web Applications to embed your Crystal Reports in.
EDIT: To add Crystal Reports to Visual Studio you will first need to download the runtime from SAP. Most commom runtimes can be found here. Then you will have to add the CR to your toolbox in VS by choosing Tools -> choose Toolbox items. Make sure the .NET Frameworks Components tab is selected and scroll to the CrystalReport items. Check the items you want to add (CrystalReportViewer for sure) and click OK. After that the CR Viewer should be available to you in the Reporting section of your toolbox.
My OS is Windows 7 x64. Running VS Professional 2012. I'm working in a software written in C# and developed for .NET Framework 4.0 that uses Crystal Report. I've installed Crystal Report for developers version 13.0.5 on the machine.
I want to copy the required DLLs of Crystal Report to the output folder of the project. The purpose is to pack them with the installer so that the PC where the software will be installed won't be required to install Crystal Report.
I created a folder called DLLs and put the required Crystal Report DLLs in that folder. Then in the C# project's References node in solution explorer, I've added the DLLs located in DLLs folder. When I look in the added DLL's Property > Path, surprisingly I find that the path holds the path of the DLL from where I copied (C:\Program Files... instead of D:\Work...).
Why is this happening? How can I add reference to the copied DLL, not the original DLL?
Short Answer: Crystal Reports wont work without installing on client machines.
What you can do is doing some research about what does the Crystal Reports Installer does and doit yourself whithin you application. See here
Other sources: here and here, or google it.
Regards
I have worked on a desktop application in .net and it uses crystal report for generating report in pdf/ms word. However, I am now trying to deploying this app with visual studio setup project. Now, finding a way to bundle the crystal report assemblies in some way so that they can also install automatically on a pc where crystal report isn't installed. How can I achieve this please?
Regards
There is a folder called Microsoft Visual Studio 9.0\Crystal Reports\CRRedist\IA64 in your Programs folder. There you will find a redistributable package. Just add this file to your setup project - user defined actions - and install it.
edit: As you mentioned setupProject CustomActions only allows exe/dll files
I found another solution. Hope this ones satisfies your needs.
Add a mergeModul to your setupProject (right-click solution explorer on setupProject, add mergeModul). A folder called C:\Program Files (x86)\Common Files\Merge Modules should automatically show up. There you may find a file called CrystallReportsRedistxxx.msm. Add this to your project and it should install too.
To find the right MergeModul for your version have a look at: BusinessObjects_CrystallReports
Adding MergeModul to setupProjects look at: SetupMergeModul
What kind of CrystalReport package to use, look at: MS CrystalReport I and MS CrystalReport II
hth