Answer the question
In order to leave comments, you need to log in
What is the best way to store the assembly bat file in VCS, because there are local paths?
We have a compilation batch file. Let's say run QMake, then build JOM, then sign, build installer, upload to DropBox...
The problem is that each step requires something machine dependent. JOM requires you to specify the number of cores in the processor, and the paths depend on a lot of things:
• developer positions: programmer, webist, release engineer and "mimocodil" who undertook to run tests instead of an engineer will have completely different paths;
• hard drive partitioning method;
• this is his personal laptop, a machine made up of actual iron or rubbish found in a warehouse;
• how many DropBox storages it has.
How do you solve this issue?
Answer the question
In order to leave comments, you need to log in
Output the necessary parameters in the batch file into variables, assign values to the variables somewhere at the very beginning, comment on the variables right there.
Then each one assigns a value to the necessary variables.
Even better - bring the settings to a separate batch file and run this batch file from the main one.
By the way, the number of cores is in the system variable: %NUMBER_OF_PROCESSORS%
More precisely, this is the number of logical processors.
Many other parameters can be obtained from the registry (using reg query) or from wmic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question