Skip to content

Commit

Permalink
remove make.files to .github
Browse files Browse the repository at this point in the history
  • Loading branch information
theavege committed Jan 1, 2025
1 parent 34c0d6e commit 9edf65d
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 30 deletions.
52 changes: 26 additions & 26 deletions make.ps1 → .github/workflows/make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,10 @@ Options:
" | Out-Host
}

Function Request-File {
While ($Input.MoveNext()) {
New-Variable -Name VAR -Option Constant -Value @{
Uri = $Input.Current
OutFile = (Split-Path -Path $Input.Current -Leaf).Split('?')[0]
}
Invoke-WebRequest @VAR
Return $VAR.OutFile
}
}

Function Install-Program {
While ($Input.MoveNext()) {
Switch ((Split-Path -Path $Input.Current -Leaf).Split('.')[-1]) {
'msi' {
& msiexec /passive /package $Input.Current | Out-Null
}
Default {
& ".\$($Input.Current)" /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Null
}
}
Remove-Item $Input.Current
}
}

Function Build-Project {
New-Variable -Name VAR -Option Constant -Value @{
Src = 'lazpaint'
Use = 'use'
Use = '.'
Pkg = 'use\components.txt'
}
If (! (Test-Path -Path $Var.Src)) {
Expand Down Expand Up @@ -108,6 +83,31 @@ Function Build-Project {
).Sum
}

Function Request-File {
While ($Input.MoveNext()) {
New-Variable -Name VAR -Option Constant -Value @{
Uri = $Input.Current
OutFile = (Split-Path -Path $Input.Current -Leaf).Split('?')[0]
}
Invoke-WebRequest @VAR
Return $VAR.OutFile
}
}

Function Install-Program {
While ($Input.MoveNext()) {
Switch ((Split-Path -Path $Input.Current -Leaf).Split('.')[-1]) {
'msi' {
& msiexec /passive /package $Input.Current | Out-Null
}
Default {
& ".\$($Input.Current)" /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | Out-Null
}
}
Remove-Item $Input.Current
}
}

Function Switch-Action {
$ErrorActionPreference = 'stop'
Set-PSDebug -Strict #-Trace 1
Expand Down
2 changes: 1 addition & 1 deletion make.sh → .github/workflows/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function priv_lazbuild
(
declare -rA VAR=(
[src]='lazpaint'
[use]='use'
[use]='.'
[pkg]='use/components.txt'
)
if ! [[ -d "${VAR[src]}" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
- name: Build on Linux
if: runner.os == 'Linux'
shell: bash
run: bash make.sh build
run: bash .github/workflows/make.sh build

- name: Build on Windows
if: runner.os == 'Windows'
shell: powershell
run: pwsh -File make.ps1 build
run: pwsh -File .github/workflows/make.ps1 build

- name: Archive
if: runner.os == 'Windows'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,6 @@ procedure TVectorialFillInterface.UpdateShapeFill(AShape: TVectorShape;
end;

begin
{$i ../../resources/fillimages.lrs}
{$i ../resources/fillimages.lrs}
end.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9edf65d

Please sign in to comment.