47 lines
1.4 KiB
Markdown
47 lines
1.4 KiB
Markdown
# pwn-compile
|
|
|
|
Compile.ps1 repository.
|
|
|
|
## Installation
|
|
First copy [compile.ps1](compile.ps1) to your maps directory and unblock the script with ```Unblock-File```:
|
|
|
|
```powershell
|
|
Unblock-File compile.ps1
|
|
```
|
|
|
|
Then open an _Administrative_ powershell prompt and update your powershell execution policy to allow unsigned scripts from remote sources:
|
|
```powershell
|
|
Set-ExecutionPolicy RemoteSigned
|
|
```
|
|
And answer with A:
|
|
|
|

|
|
|
|
## Usage
|
|
|
|
### All-Cores mode
|
|
To run this script with all available cores, either double-click it or open a powershell terminal, cd to this directory and run:
|
|
|
|
```powershell
|
|
.\compile.ps1
|
|
```
|
|
|
|
### X Cores mode
|
|
To override the number of cores used to compile, set the Cores param when calling the script:
|
|
```powershell
|
|
.\compile.ps1 -Cores 2
|
|
```
|
|
|
|
### Enable Logging
|
|
To have the script log to ```compile.txt``` in the maps directory, set the ```$Logs``` param to ```$True```:
|
|
```powershell
|
|
.\compile.ps1 -Logs $True
|
|
```
|
|
Or update the default Parameter on line 4 to ```$True```
|
|
|
|
#### Performance Note
|
|
When logging is enabled, although the files compile just as fast, the script takes longer to finish as it writes the file. All you need to know is that as soon as the red text starts rushing past, all the files have finished compiling.
|
|
|
|
## Credits
|
|
Don't we all use [stackoverflow](https://stackoverflow.com/questions/43685522/running-tasks-parallel-in-powershell)?
|