Repository navigation
Expand file tree
/
Copy pathPublishScript.cmd
More file actions
72 lines (53 loc) · 3.41 KB
/
Copy pathPublishScript.cmd
File metadata and controls
72 lines (53 loc) · 3.41 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@echo off
echo *** Setup environment
rmdir /s /q "publish"
mkdir publish
mkdir publish\Temp
if defined __VCVARSALL_HOST_ARCH (
echo __VCVARSALL_HOST_ARCH is set to "%__VCVARSALL_HOST_ARCH%"
) else (
echo __VCVARSALL_HOST_ARCH is NOT set, setting environment
call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
)
Rem Build AlpacaSpy so that the InformationVersion,txt file is up to date.
dotnet build alpacaspy/alpacaspy.csproj -c Debug -p:Platform="Any CPU" --framework net10.0
Rem Extract the full build number from the InformationVersion.txt file.
set /p FULL_VERSION=<"AlpacaSpy\bin\Any CPU\Debug\net10.0\InformationVersion.txt"
Rem Extract the version number from the full build number
for /f "tokens=1 delims=+" %%a in ("%FULL_VERSION%") do (
set BUILD_VERSION=%%a
)
echo Version number: %BUILD_VERSION%, Build number: %FULL_VERSION%
cd
cd J:\AlpacaSpy
echo *** Publishing Linux builds
wsl -e bash -lc "/mnt/j/AlpacaSpy/build.bash %BUILD_VERSION%"
echo *** Publishing MacOS Intel silicon
dotnet publish AlpacaSpy/AlpacaSpy.csproj -c Debug -p:Platform="Any CPU" -r osx-x64 --framework net10.0 --self-contained true /p:PublishTrimmed=false -p:PublishSingleFile=true -o ./publish/Temp/AlpacaSpyOsxX64/
rem echo *** Creating tar file
rem tar -cJf publish/alpacaspy.macos-x64.tar.xz -C publish/Temp/AlpacaSpyOsxX64\ *
echo *** Completed MacOS Intel silicon
echo *** Publishing MacOS Apple silicon
dotnet publish AlpacaSpy/AlpacaSpy.csproj -c Debug -p:Platform="Any CPU" -r osx-arm64 --framework net10.0 --self-contained true /p:PublishTrimmed=false -p:PublishSingleFile=true -o ./publish/Temp/AlpacaSpyOsxArm64/
rem echo *** Creating tar file
rem tar -cJf publish/alpacaspy.macos-arm64.tar.xz -C publish/Temp/AlpacaSpyOsxArm64\ *
echo *** Completed MacOS Apple silicon
scp -r J:\AlpacaSpy\publish\Temp\AlpacaSpyOsxX64\* petersimpson@macmini:/Users/petersimpson/builds/AlpacaSpy/source_files/alpacaspy.macos-x64
scp -r J:\AlpacaSpy\publish\Temp\AlpacaSpyOsxArm64\* petersimpson@macmini:/Users/petersimpson/builds/AlpacaSpy/source_files/alpacaspy.macos-arm64
ssh -t petersimpson@macmini "sudo /Users/petersimpson/Builds/AlpacaSpy/makespy %BUILD_VERSION%"
scp petersimpson@macmini:/Users/petersimpson/Builds/AlpacaSpy/dmg_file/* J:\AlpacaSpy\publish
echo *** Publishing Windows ARM 64bit
dotnet publish AlpacaSpy/AlpacaSpy.csproj -c Debug /p:Platform="Any CPU" -r win-arm64 --framework net10.0 --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/Temp/AlpacaSpyArm64/
echo *** Completed Windows ARM 64bit publish
echo *** Publishing Windows Intel 64bit
dotnet publish AlpacaSpy/AlpacaSpy.csproj -c Debug /p:Platform="Any CPU" -r win-x64 --framework net10.0 --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/Temp/AlpacaSpyx64/
echo *** Completed Windows Intel 64bit publish
rem The Intel 32bit version serves on ARM64 as well because .NET doesn't support publishing 32bit Windows-Arm executables
echo *** Publishing Windows Intel 32bit
dotnet publish AlpacaSpy/AlpacaSpy.csproj -c Debug /p:Platform="Any CPU" -r win-x86 --framework net10.0 --self-contained true /p:PublishTrimmed=false /p:PublishSingleFile=true -o ./publish/Temp/AlpacaSpyx86/
echo *** Completed Windows Intel 32bit publish
echo *** Creating Windows installer
cd J:\AlpacaSpy\Setup
"C:\Program Files (x86)\Inno Setup 6\iscc.exe" "AlpacaSpy.iss"
cd ..
echo *** Builds complete