Right now the Release build just makes the files necessary for the install. But I want to create the CD structure automatically with InstallShield, so that when I go to Tools, Open Release Folder
it has
\Install
\Tools
\Help
autorun.inf
I've looked at the execute batch file or copy to folder options for a Release, I was hoping there was something more friendly within InstallShield.
using version 12.
I created a feature / component called CDOnly which is not visible, selected, and doesn't copy, but does put the files in the Disk Images / Disk1 folder.
So by changing the default directories of features and putting special things in CDOnly I was able to create the structure I wanted.
Related
I have a Visual C++ for Linux project in VS2017 that I'm building on a Raspberry Pi running Raspbian. This project consists of a single source file (main.c) and an image (test.jpg). When building the project, I want the image file to also be deployed to the pi, so that the code in main.c can do something with it locally. However, I can't figure out how to do this
The image file's Content property is set to True, as is Included in Project. In the project properties, under Copy Sources, Sources to Copy is set to "#(SourcesToCopyRemotely)" and Copy Sources is set to "Yes". However, when I build, only main.c is copied to the Pi, and the compiler output is just a single .out file. I hoped to also see test.jpg there, but alas.
This article mentions that #(SourcesToCopyRemotely) defaults to all files in the project. However, when I evaluate the value of #(SourcesToCopyRemotely, it evaluates to just "main.c".
How do I make sure content files in my projects also end up in the build directory, along with the .out file? Preferably without having to manually enter each filename in a post-build step.
It turns out this is a bug in VC++ for Linux. A workaround, currently, is to use Additional Sources to copy. There's a caveat though: it doesn't work with remote paths that start with ~. So you can't use $(RemoteRootDir) if the Remote Build Root Directory setting is set to the default of "~/projects".
I've currently got Remote Build Root Directory set to "/home/pi/projects" and for each file I want to copy to the build directory I set Additional Sources to Copy to "[filename]:=$(RemoteRootDir)/$(ProjectName)/bin/$(Platform)/$Configuration)/[filename]". For instance:
firstimage.png:=$(RemoteRootDir)/$(ProjectName)/bin/$(Platform)/$(Configuration)/firstimage.png;secondimage.png:=$(RemoteRootDir)/$(ProjectName)/bin/$(Platform)/$(Configuration)/secondimage.png
Right-clicking on the non-source code file to open it's properties page and flagging as Content in the General tab will cause the file to be copied to the remote. There is no need to add anything to the Copy Sources tab. The Copy Sources page of the project properties must show the default of #(SourcesToCopyRemotely). And when you edit this setting the macro should show an expansion with the additional files included.
I have found that it necessary to refresh the macro by clearing Source to Copy and then restoring it to the default after you have marked the additional files as content.
I have encountered problems when the additional files are not in the same folder as the C++ source files on the Windows host and/or you want to put them somewhere else on the remote. There are several open issues on the VCLinux GitHub site like this one so it will be worth reporting any problems you have on there.
[VCLinux 1.0.6 on VS Pro 2017 + Debian Jessie remote]
The "Pre-Build Event" section of the project properties offers "Additional Files To Copy". Addressing my file there (relative to the solution) showed following in the output when building:
Copying file 'C:\myfilepath\resource.png' to '/home/pi/projects/myproject/resource.png'
It is possible to move the files to the final destination then with Remote Post-Build Events (mv source destination). Not the most elegant way, but the first thing I got working..
I am using VC++4LD and I have set everything to work, it works perfectly, I like the extension, but I have 2 places in the project settings that can be improved.
1st place is Debugging->Program, I have something like "$(RemoteProjectDir)/subfolder/another_subfolder/gcc.cmake/OUTPUTNAME" there and it works, but I want it to be in a more correct way. By default, there was "$(RemoteBuildOutputs)" and that was incorrect. I can't even figure out, what is stored in that string => I tried to echo it in Pre-Launch Command with both "echo $(RemoteBuildOutputs)" and "$(RemoteBuildOutputs)", but nothing was shown. The project is built with a script that jumps into the "/subfolder/another_subfolder/" first.
So how to find, what is stored in $(RemoteBuildOutputs) and how to set the Debugging->Program dynamically so I can reuse it in other projects?
2nd place is Sources->Additional sources to copy, there is a lot of "CMakeLists.txt" files in the project and all are added to the project via "Include In Project", but they aren't copied to the remote machine during the build, I fixed it by specifying all the separate "CMakeLists.txt" files in "Copy Sources->Additional sources to copy", but it was a hard work to list them all.
How to automatically copy all CMakeLists.txt to the remote machine without specifying them separately so I can again reuse it in other projects containing any CMakeLists.txt?
EDIT: 1 more thing => I include linux project into VS with "Show All Files", then I select all folders and remaining files outside of them and choose "Include In Project" from the context menu, but all CMakeLists.txt remain unincluded in project, how to solve it, so I don't have to go through all of them and include them 1 by 1?
$(RemoteProjectDir) etc. are Visual Studio build macros that are expanded from pre-defined information like the project name and information entered into the project properties. They're not stored in environment variables. I don't know if there's a simple way to print the value of a macro but you can get VS to list the substitutions it makes by turning up the MSBuild verbosity : goto Tools/Options , Projects and Solutions / Build and Run page and set the MSBuild project build logfile verbosity to diagnostic (you probably want to use the log file 'cos it can spit out a lot of stuff).
As for CMake, various issues around it have been raised on the VClinux GitHub site . That would be the place to ask for enhancements. You might also look at VCLinux unoffical scripts to see whether any of Marc's scripts can help you automate the project creation.
You can open the Dropdown menu on that setting and click on <Edit>:
In the opening Window you'll see the expanded Macros:
In case anyone stumbles onto this because of the Edited supplemental question, I had the same problem in visual studio not adding every file after "Show all files" and hitting "Include in Project." Certain files like "makefile.am" and configure scripts were not getting included and therefore, were not getting copied over to the Linux system during build. My solution was to edit the .vcproj file and add a line that will include everything in a specified directory. This can be done for a specific folder or recursively.
For instance, if I wanted to add everything in folder "A" I would add,
<ItemGroup>
<None Include="A\*" />
</ItemGroup>
If I wanted to add everything in folder "A" and well as all sub-folders and sub-folder contents,
<ItemGroup>
<None Include="A\**" />
</ItemGroup>
Care should be taken not to double included items. Also, this should only apply to non-source items that will not be compiled. Otherwise the "None" indicator should be appropriately changed (CLInclude for headers, CLCompile for c/cpp, etc).
we actually build an InstallShield project for our application with the functionality to include files dynamic into a component. All files will be taken which are in a specific place.
Because of problems, which are not part of this question, we want to change this to components where we add files explicit to custom separated components.
The question is, is there a best practice for this? We have the small fear that we easily can forget to add files to the component we new created. These can be dll files, .config files, pdfs or just xml.
(We build the installer every night using TFS.)
We found a solution for the problem.
What we wanted to solve:
During the build we want to be informed if files got removed
During the build we want to be informed if new files are missing
we solved this by two more or less easy things.
1. Information if a file is removed
This is easy sone, we have all files added explicitly, each single file is an own component now, if one file is missing the whole project does not build with the exact error message.
2. Information for missing files
For this we wrote a small tool which runs by a prebuild event of the installshield project.
There it opens the *.ism file as an xml file and searches for the "Files" table.
Than it takes all files from the drop folder and looks if all files are in there.
If there are files missing but we don't expect them, like pdb files or test dlls, we have an additional text file we just called "IgnoreList".
The tool skips these files by the check.
Now we are on a very good state to get informed directly on the next morning if the project was able to build or not, and if not what happened, so we can be sure that in the final target application are files are there :-)
I setup preconditions to make sure that I have adobe reader 9 or 10 installed. How to I copy the plugin to the correct location? The user might have 9,10 or both installed and I need to copy it to the right location.
I think the search might help me but not sure how to accomplish it. i am using installshield 2013
The basic plan is something like this, pretty simple:
create folder searches for both versions
now create two custom folders in your Files view, based on the searches
add in the newly created folders your plug-ins
now you need to set a condition on the components of the created folders and files from within, so they install only if the search finds the corespondent Adobe version
I seem to have received the privilege of picking up some install shield projects. I've used install anywhere in the past and I was wondering if there was an equivalent of speedfolder in installshield. A speedfolder is a way of blindly copying an entire folder into the project without explicitly selecting each file.
There are a couple of ways you can do this.
Dynamic File Linking or using the Files and Folders view.
With Dynamic File linking you can point your project to a directory or directories and IS will refresh the list of files at build time and add them to your install.
The files and folder view can be used to drag and drop a whole load of files and folders in to your project in one go.
If you choose to use Dynamic File Linking be sure to read up on the implications first. Check out the Installshield help file