forked from prof79/fansly-downloader-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
43 lines (36 loc) · 905 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Fansly Downloader NG Build Script
[CmdletBinding()]
[OutputType()]
Param(
[Parameter(Mandatory = $false, HelpMessage = 'The name of the executable to generate without extension')]
[string]
$BaseName
)
# Executable name
$name = ''
# If name provided by automated build workflow, use it.
if (-not [String]::IsNullOrEmpty($BaseName))
{
$name = $BaseName
}
# Crude OS detection but should work multi-platform
elseif ((Test-Path -PathType Leaf -Path "${Env:SystemRoot}\System32\kernel32.dll"))
{
# Windows (without extension)
$name = 'Fansly Downloader NG'
}
else
{
# macOS, Linux, ...
$name = 'fansly-downloader-ng'
}
$iconPath = Join-Path 'resources' 'fansly_ng.ico'
$fullScriptPath = Join-Path $PSScriptRoot 'fansly_downloader_ng.py'
# Build
pyinstaller `
-n "$name" `
--onefile `
--console `
--noupx `
--icon="$iconPath" `
"$fullScriptPath"