can we use ${baseDir} placeholder in .Install4j file to replace the files path in entries tag - install4j

<entries>
<fileEntry mountPoint="135" file="D:/Project/SampleProject/src/main/resources/SampleFiles/Driver/Driver.xls" overwriteMode="4" shared="false" fileMode="644" uninstallMode="0" overrideFileMode="false" overrideOverwriteMode="false" overrideUninstallMode="false" />
</entries>
Here the path D:/Project/SampleProject is project's base directory , so is it possible to replace this path with the ${basedir} ?
I am Using install4j-maven-plugin.

You can use compiler variables for that purpose.
On General Settings->Compiler variables, define a variable "baseDir", then you can use it with the syntax
${compiler:baseDir}
Note that if you select the "Make all paths relative" on General Settings->Project options, all files are made relative with respect to the project file and you may not need the variable if the project file is sinside the baseDir directory.

Related

bitbake BBPATH confusion

In the bitbake manual (https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html) it says:
3.3.1. Locating Include and Class Files
BitBake uses the BBPATH variable to locate needed include and class files. The BBPATH variable is analogous to the environment variable PATH.
3.3.3. include Directive
BitBake understands the include directive. This directive causes BitBake to parse whatever file you specify, and to insert that file at that location. The directive is much like its equivalent in Make except that if the path specified on the include line is a relative path, BitBake locates the first file it can find within BBPATH.
As an example, suppose you needed a recipe to include some self-test definitions:
include test_defs.inc
However, I see many openembedded-core recipes that include files that seem to be relative to the file they are being included from rather than being in a directory in BBPATH, i.e.
Assume we have this directory structure:
mything.bb
mything.inc
include/mything.inc
And mything.bb contains:
require mything.inc
require include/mything2.inc
However, these files are not in the BBPATH. I run bitbake -e mything.bb and BBPATH clearly does not contain the directory containing mything.inc or include/mything2.inc.
So the question is, is it true that include/require directives first search for the file relative to the file the directive appears in? Then and the falls back to searching for it in the BBPATH? If so, is this feature just missing from the bitbake user manual documentation?

How to set source path entries in order to resolve bindings in eclipse jdt ast

I want to resolve bindings in one separated project. For example, the file system looks like this:
./
projects/
PPP/
src/
...
A.java
B.java
In A we have a method returns B type.
So I just set the unit name /PPP/src/A.java and set the sourcepathEntries to { "/home/user/projects/PPP" }
However, this doesn't work when I call to resolve method return types. Do u know what source path entries should I pass under this situation?
I finally succeeded. The reason is that I'm parsing a maven project.
The correct path I guess must be the root path of your packages.
e.g.
project/
src/
main/
java/
edu/
student/
Code.java
Under this context, your Code.java will have a declared packgae edu.student;
So, the Unit name should be /project/src/main/java/edu/student/Code.java, and the source path should be /home/..../project/src/main/java/, remember the last "/" and the absolute path.
Therefore, the source path should be the just outer the package declaration.

How can I make ExtUtils::Manifest include empty directories?

I am trying to build a Perl module for distribution. The directory structure looks like this:
demo
demo/files
demo/examples/example1.pl
demo/scripts
lib
I used this command to generate the MANIFEST file:
perl -e "use ExtUtils::Manifest qw(mkmanifest); mkmanifest();"
The file is created but all of the empty folders are ignored, so demo/files and demo/scripts are not in the MANIFEST.
How can I tell ExtUtils::Manifest to include empty folders?
Create a zero byte file called .exists in the otherwise empty directories.

CodeAssassin.ConfigTransform for of arbitrarily named config files

NuGet packages such as CodeAssassin.ConfigTransform tranform web.*.config or app.*.config to web.*.config.transformed or app.*.config.transformed upon a VS build.
However, what if you have config files of form {arbitrary-name}.config ?
For example, MyAssembly.dll.config and its transform rulesets MyAssembly.dll.debug.config & MyAssembly.dll.release.config
CodeAssassin.ConfigTransform does not appear to work for these file patterns.
If you look at the target source code it looks quite simple to modify it to allow any .config file to be transformed. Actually I think that transforming any XML file should be possible.
I will fork that repository tomorrow for and experiment with this.
Disclaimer: In this example I modified CodeAssassin.ConfigTransform.targets directly. But you should create a separate .targets file and reference that in your .csproj.
Add a ConnectionString.config (as an example) and then add the transforms.
Add this to the .targets file (your config name just has to match the regex expression - (?i)^ConnectionString\. in this case):
<Target Name="TransformAllConnectionStringConfigTransformFiles"
Condition="'$(WebProjectOutputDir)'!=''"
BeforeTargets="Compile">
<ItemGroup>
<ConnectionStringConfigTransformFile Include="#(None);#(Content)" Condition="'$([System.Text.RegularExpressions.Regex]::IsMatch(%(Filename),"(?i)^ConnectionString\."))' == true and '%(Extension)'=='.config'" />
</ItemGroup>
<TransformXml Source="ConnectionString.config" Destination="%(ConnectionStringConfigTransformFile.Identity).transformed" Transform="#(ConnectionStringConfigTransformFile)"
Condition="'#(ConnectionStringConfigTransformFile)'!=''" />
<CreateItem Include="%(ConnectionStringConfigTransformFile.Identity).transformed"
AdditionalMetadata="CopyToOutputDirectory=Always">
<Output TaskParameter="Include" ItemName="Content"/>
</CreateItem>
</Target>
Build, and your .transformed files are created.

Defining modules in GWT with non-default source directories

Let's say that I want to define a module "Pair" in com.mycompany.common such that the source is located in com.mycompany.common (and not com.mycompany.common.client). How would I do this? Alternatively, let's say that I have the flexibility of defining the module "Pair" in com.mycompany instead while still having the source in com.mycompany.common.
Thanks to a quick search on google, I found the answer myself. One can add a source path tag to the module xml file to define the source directory instead of leaving it to the default "client." For example, Pair.gwt.xml would look something like this:
<module>
...
<source path="."/>
...
</module>
... if we wanted the gwt.xml file to be in the same directory as the source.
But when compiling this module, we get a "Non-canonical source package: ./" warning. Is this ok to ignore?