[Advanced Installer]How to add a default directory after selecting a new directory? - advanced-installer

When I select a new directory, how can I add a default directory to the selected directory. For example: defult path is C:\Program Files\myFile, alter select d:\ the directory is d:. i want to add the default path like d:\myFile?

The default installation path can be configured in Install Parameters view of your setup project. Just set the default path in Application Folder field.

Related

How to integrate Hybris Custom and Config folder to local installation?

I installed Hybris 1905 out of the box locally on my machine and I would like to include the custom code which our project stores on bitbucket.
To track the progress of the commits, I installed earlier Sourcetree and have integrated the repository. The repo is stored locally in directory
C:\git\projectname
How can I now get the folders custom and config into my local installation to be able to run always the latest code in my local machine? Thanks!
You can create a symlink or directory junction.
Assuming your custom config is stored in C:\git\projectname\config and your custom code is stored in C:\git\projectname\bin\custom
In hybrisHomeDirectory, open command prompt then type :
mklink /J config C:\git\projectname\config
this will create a directory junction that link your config to hybris installation folder.
In hybrisHomeDirectory/bin, open command prompt then type :
mklink /J custom C:\git\projectname\bin\custom
This will create a directory junction that link your custom code.
If you want to create a symlink instead of directory junction (requires admin), then open cmd as administrator and type mklink /D instead of mlink /J
Config folder
In order to refer a config folder(other than the default one) you can edit your hybris\bin\platform\setantenv.bat. For example please have a look at my setantenv.bat that I used in the past:
#echo off
set ANT_OPTS=-Xmx2g -Dfile.encoding=UTF-8 -Djdk.util.jar.enableMultiRelease=force
set ANT_HOME=%~dp0apache-ant
set PATH=%ANT_HOME%\bin;%PATH%
rem deleting CLASSPATH as a workaround for PLA-8702
set CLASSPATH=
Rem Custom zone start
set HYBRIS_RUNTIME_PROPERTIES=%~dp0local_custom.properties
chcp 65001
set HYBRIS_CONFIG_DIR=%~dp0..\..\..\gitrepo\config
echo -------CustomChanges--------
echo CustomChanges: configFolder: %HYBRIS_CONFIG_DIR%
echo CustomChanges: runTimeProperties: %HYBRIS_RUNTIME_PROPERTIES%
echo -------CustomChanges--------
Rem Custom zone end
echo ant home: %ANT_HOME%
echo ant opts: %ANT_OPTS%
ant -version
Between Rem Custom zone start and Rem Custom zone end there is the Custom section that, among other things, sets the path to the config folder.
In my case, hybris folder and gitrepo folder are right next to eachother(in the same parent folder) and that is why the following path(also mentioned above) works:
set HYBRIS_CONFIG_DIR=%~dp0..\..\..\gitrepo\config
Keeping these two folders next to each other makes it easier to use relatives paths in order to easily use resources from git Repo into Hybris.
Custom folder
In order for Hybris to take into consideration the custom extensions, their folder needs to be specified in the localextensions.xml as exemplified below:
<path autoload="true" dir="${HYBRIS_BIN_DIR}/../../gitRepo/extensions"/>
Again, above relative path works for me because hybris and gitrepo folders are next to each other.

Using Atom with Hydrogen. The working directory for Atom is one folder up from the current file's location. How do i change it to the current folder?

In both Hydrogen and using a plug-in terminal platform, the default directory is one folder up from where my code file resides.
E.g., I’ll be working on a file with path, say, parent/code/file.py. When I run pwd in the plug-in's terminal or the equivalent via Hydrogen in the python script I get parent/, but I need it to be parent/code/ to import files etc.
Perhaps the default directory for Atom is the project that is folder of the project that is open?
Any ideas how to change the default current directory for Atom (or is it package specific) to the file i’m working on/executing in Hydrogen?
In the hydrogen settings you can choose the location where the kernel should be started.
The default is the 'First started project's directory'. You can choose 'Current directory of the file' there, which should give you what you want.

yeoman creates project in Desktop even though I CD into directory

I am having a issue creating a yeoman project. I cd in the directory type yo and it says:
Here is it suppose to asked me project name etc and it wants to throw everything on my desktop not the file I cd into. It defaults to mvn and I want gradle. I even npm uninstall -g generator-jhipster
and reinstalled it and got the same issue.
If you have a .yo-rc.json file in a parent directory, Yeoman will load that configuration and generate from that file instead of prompting. This allows developers to run a yo command from any folder in the project and have it apply to the correct files.
To solve this, remove the .yo-rc.json from the parent directory, in your case /Users/drew/Desktop.
For example, if you are in the directory /Users/drew/Desktop/new-project but /Users/drew/Desktop has a .yo-rc.json inside, Yeoman will change to the parent directory (Desktop), load the configuration, and generate the files from that folder instead of the child folder.
Based on your log it's looks like you are running yo in a folder where a .yo-rc.json is already existing. Careful under windows the .yo-rc.json can be that is of type hidden and you can't see it in explorer. Because of an existing .yo-rc.json you are not asked anymore for info e.g. project name, build tool etc. My recommendation will be to create a new folder run inside yo command

Why does signtool in command-prompt return "Windows cannot find 'signtool'. Make sure you typed the name correctly..."

I do have that file. (In "...\Program Files\Microsoft SDKs..."). And I went to installed-programs (in Control Panel) and "reinstalled" it.
So why doesn't the command prompt recognize it?
Because the folder isn't in the system PATH. (From the command prompt, type PATH and hit enter to see what the current PATH contains.)
You can add the folder by adding the folder to the existing PATH from the command prompt (of course, replace the folder with the proper location for the SDK version and location on your system):
set PATH="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin";%PATH%
Signtool should work now from any folder (until you close the command prompt).
You can also create a batch file that sets the PATH properly for you to save typing, if you need it often:
; Save this as something like SDKEnv.bat in a folder on the current PATH
#SET FrameworkDir=C:\Windows\Microsoft.NET\Framework\v2.0.50727
#SET PATH=%FrameworkDir%;%PATH%
Now you can run the batch file just before running SignTool:
SDKEnv
Signtool <parameters>

hibernate.cfg.xml path

I have a java project and I am using hibernate.The thing here is I want to place the hibernate.cfg.xml file outside "src" folder, but when I am configuring this file it is showing FileNotFoundException. If I put it inside src folder its ok. But I want to separate the java src and all config file in separate folder.
root
|____src
|____conf
|____mapping
|____(all xml file with hibernate.cfg.xml)
SessionFactory _sessionFactory = (new Configuration()).configure("./conf/mapping/hibernate.cfg.xml").buildSessionFactory();
Its showing exception......
Add conf/mapping directory to your CLASSPATH and load the configuration file
new Configuration().configure("/hibernate.cfg.xml").buildSessionFactory();
or just
new Configuration().buildSessionFactory();
as this is the standard name.
Regardless there would be no ./ at the beginning of the resource path.
What you want to do is
include conf/mapping in your project build path(With Eclipse properties->javabuild path->source->add Folder)
then no need to precise the hibernate config file in your code
new Configuration().buildSessionFactory(); is enough
This manipulation is simple and works like a charm.

Resources