Scripting with PowerShell - part II
In my last entry I showed you some ways to get data from the user in different ways. We are now going to use this data to ready the environment for Qt programming. To be able to build with Qt, or any other programming library, Windows needs to know the whereabouts of all libraries and tools that will be used. This is included in the environment variables. To list all the environment settings in PS type: Get-ChildItem env: In the section below I will include the complete script and comment the code inside the script. When you comment your code in PS you prefix the lines with #. This will cause PS to ignore this line while running. Also note that I am organizing my code in three functions. One to clean the environment, one to set the environment and one main function that calls the other classes. # We fetch the input $firstArg = $args[0] # Clean any QTDIR from the path function cleanPath(){ # We use the net function split() to split the Windows # path into an array using the ; cha...