-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Extract units for installer into a separate file
- Loading branch information
1 parent
0676208
commit 90bc1fd
Showing
6 changed files
with
49 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# paths to files | ||
$inputFilePath = $args[0] | ||
$outputFilePath = $args[1] | ||
|
||
# read the list of units from the input file | ||
$units = Get-Content -Path $inputFilePath | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" } | ||
|
||
# initialize the output content | ||
$outputContent = @() | ||
# add comments | ||
$outputContent += "; This file was generated by the Installer project." | ||
$outputContent += "; All manual changes will be reverted after the next project build." | ||
# add header | ||
$outputContent += "#dim UnitsDll[$($units.Count)]" | ||
# iterate through units | ||
for ($i = 0; $i -lt $units.Count; $i++) { | ||
$outputContent += "#define UnitsDll[$i] `"$($units[$i])`"" | ||
} | ||
# add footer | ||
$outputContent += "#define I" | ||
|
||
# write the content to the output file | ||
Set-Content -Path $outputFilePath -Value $outputContent -Encoding UTF8 | ||
|
||
Write-Host $outputFilePath " file generated successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
powershell -executionpolicy bypass -File %~dp0\generate_units_list.ps1 %1 %2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Agglomerator | ||
Bunker | ||
Crusher | ||
CrusherPBMTM | ||
CycloneMuschelknautz | ||
Granulator | ||
GranulatorSimpleBatch | ||
HeatExchanger | ||
Inlet | ||
Mixer | ||
Mixer3 | ||
Outlet | ||
Screen | ||
ScreenMultideck | ||
Splitter | ||
Splitter3 | ||
TimeDelay |