obfuscar / obfuscar

Open source obfuscation tool for .NET assemblies
https://www.obfuscar.com
MIT License
2.42k stars 393 forks source link

Usage of environment variables in config xml #500

Closed lextudio-support closed 5 hours ago

lextudio-support commented 5 hours ago

I would like to specify "InPath" and "OutPath" using environment variables, e.g.:

The reason is that this config file is in SVN and then should be used by people having their projects locally in different locations where the environment variable points to.

This could easily be done by adding these two lines in Obfuscar.Settings Constructor to expand environment variable:

public Settings (Variables vars)
{
   inPath = vars.GetValue ("InPath", ".");
   inPath = Environment.ExpandEnvironmentVariables(inPath);    // <==
   outPath = vars.GetValue ("OutPath", ".");
   outPath = Environment.ExpandEnvironmentVariables(outPath);   // <==

Could someone please review this and make a release if appropriate? Thanks!

Cheers, Matmok

Original Reported Date: 2014-08-27T02:11:28.063-07:00 Planned For Release: Original CodePlex ID: 20

lextudio-support commented 5 hours ago

Copied from CodePlex without authors:

Fixed in latest revision in master. Environment variables are supported in InPath, OutPath, LogFile, and KeyFile options.

Original Posted Date: 2014-09-03T06:50:29.817-07:00

lextudio-support commented 5 hours ago

Original Closed Date: 2014-09-03T06:50:44.287-07:00