aggregate target + target paths - xcode6

For one of my schemes I want to copy 2 folders into the final app bundle. For that I created an aggregate target with a copy build phase and added that target to the scheme where it should be triggered. That works fine, except for the target paths.
I appears something with the target paths is wrong however. In the copy build phase I can select whatever pre defined path exists in the drop down, the folder always end up in the same place ("Myproject/DerivedData/Myproject/Build/Products/Debug") instead of the app bundle. Is there something special to consider for aggregate targets?
I also tried to set a subpath with one of the build variables. They don't seem to be set however and have no effect. Setting a manual path works however. Though, I don't want to hard code my apps bundle name + Contents etc. if the normal way is usually to use an env var.
Btw. I also tried a script phase and checked the env vars printed in the build log. None contains the path to my app bundle (or parts of it below the Debug folder).

Maybe it has to do with the target type (aggregate target), I don't know. I couldn't get the predefined paths to work, they always seem to be empty. So, I ended up by hard coding the relative path (which rarely changes). But that is of course asking for trouble if I ever change the project's name.

Related

How to use pre-defined variable in CLion when setting environment variable

According to CLion, there are two pre-defined variable: $PROJECT_DIR$ and $USER_HOME$.
I would like to define an environment variable ASAN_OPTIONS, so that when I run sanity check, it will ignore the external libraries. There are two ways to set it, either from Preferences/Build, Execution, Deployment/CMake and set it in the specific cmake profile for sanity check , or from the Run/Build configurations.
I put the suppression file at the project root, and the executables will be in CMAKE_BINARY_DIR, either cmake-build-debug/tests/ or cmake-build-debug/tests/SubFolder.
So I set
ASAN_OPTIONS=detect_container_overflow=0 suppressions=$PROJECT_DIR$/MyASan.supp
However, $PROJECT_DIR$ is not parsed. What is the proper way to write it, and if this is possible?

Dynamic path creation

While developing transformations on local I set my transformation path to the target folders that are presented in Local PC and Once testing is completed on local I am moving our transformation to server repository to schedule it from server environments but every time I require to change the path set to the server folders. I believe it can be done by creating dynamic path or creating any variable but I am unable to resolve it. Is this option available in Pentaho? if Yes, Can you please help me for setting the dynamic path?
In This answer there is a link to a described solution, and in the answer i have a sample KTR that should help.
You can also use the pentaho properties file in different environments, meaning, you can utilize the same variable in both environments, say ${path}, but in each environment this has a different value.
kettle.properties can be found in your user folder .. C:\Users\YourUser.kettle
The standard way to handle environments in Kettleis with variables.
In the home directory there is a (hidden) folder named .kettle which contains every thing that should be local : your preferences, your shared connections, your cache, and, most of all, THE kettle.property file.
You can define variables in it, like a ${myPath}. To do this, use the menu Edit/Edit the Kettle.properties and add a variable named myPath and give it for value your prefered path, with an optional description.
Then, when you see a blue diamond with a $ on the right of a field in a step window (which means almost any field you'll need), you can press Crtl+Enter in the field and choose any variable defined in your kettle.properties. Alternatively, you may type or copy/paste ${your-variable-name} in the field.
Then, when launching spoon, it will not use the hard-coded path, but the content of the variable in the kettle.properties.
And nothing prevent you from having a different kettle.properties on your dev PC and on the prod server.
While we are there, three usefull tricks.
There is a predefined ${Internal.Job.Filename.Directory} variable contaning the path of the current transformation which by used for relative path. For example, ${Internal.Job.Filename.Directory}/../myDir/myFile.ext.
If you right-click anywhere on the screen, and go to the Properties/Parameters, you may also define your variable here.
You may also redefine these variables in the Run Option window that anoys you each time you rune a transformation (yes, there was a reason).
Finally, you can send these variables from job to jobs and transfos.

Visual Studio Unit Test Data Path and Source Control

I have a unit test project for my VB.NET solution that takes a very large data set (multiple Gigabytes). The data set is static, outside of source control (developers unzip a big .zip file somewhere on their machine)
I'm trying to figure out how to reference this data set inside my project and I'm having trouble because of the following constraints:
The data set may be in a different location on each developer's machine e:\dev\MySolution\TestProject\ vs. c:\MySolution\TestProject\data. We can require it to be in the project folder but I can't require that the project folder be in the same place. This means I can't store the path in source control or I need some way to override it.
Because of its size I don't want to have to copy or deploy the test data at runtime because this will slow things down a lot and I don't want to have two copies of it.
My hack-y solution is to use a project property called DataPath and reference this inside each test. Then users would just change the property and I'd instruct them not to commit this change.... feels like an anti-pattern though.
My initial thoughts were to somehow store the path in the project.suo file which is outside of source control but I can't figure out how to make that work.
Anyone have experience with this?

Intellij 11.1.5 - Project specific path variable

I am using the Intellij 11.1.5. We are a large team, and have a pretty complex project setup. so we've made a template and when someone needs a new project set up, we just clone it and she is pretty much ready to go. One other thing i would like to automate is the creation of run configurations. One such configuration starts a custom bat file that requires a parameter representing a path that is user specific. I wanted to know if can store that value as a path variable specific to each project. Maybe somewhere in the .idea folder in my project. I know that Intellij stores it in its .IntelliJIdea11\config\options\path.macros.xml file, but is there a way to tweak that?
Any other idea that would allow me to locally store a parameter passed to the run config script would be usefull.
Thanks
I'm afraid you can't do it in IDEA, but you can use some environment variable directly in the .bat file instead of using the parameter (or rewrite the batch script to detect this value automatically, if possible). Instruct your users to define this environment variable.
IDEA Path variables are global and cannot be made project specific.

iOS, detect ad-hoc from code

I want to use a different API url for my iPhone app when I'm debugging or doing an ad-hoc deployment. Is there any way to detect from code (if adhoc) use this Url rather than the default one?
There are two ways I can think of:
1.) Conditional Compilation
Since you have to "Archive" the product to distribute the adhoc build, you might as well setup a new config for Archive and leverage the preprocessor.
2.) Alternate default .settings files based on Release/Debug/AdHoc.
Same suggestion as above, but using a .settings file instead of compilation. Personally, I'd recommend this over the conditional compilation because it can be changed (and saved) after deployment if you want to test other environments without redeploying.
EDIT
Conditional Compilation refers to using "ifdef" blocks right? I tried this once but couldn't get it to check for AD-HOC, only DEBUG seemed to work
Correct.
There is not an "ADHOC" macro defined by default. But you can easily add one.
Here's how you might go about setting up an additional configuration with a new preprocessor macro for your ADHOC builds:
Step 1: Setup a new Config (optional... you might just use Release... up to you).
Step 2: Add the preprocessor macro for that config. In my screenshot it only shows Debug and Release because I didn't actually add a new config. If you added a new Config (and called it something like "AdHoc", it should show up here as well:
Add ADHOC=1 just like the DEBUG=1 macro for the debug config.
Step 3: Either modify your current Scheme, or duplicate it, such that the "Archive" step uses your new configuration: