-
Notifications
You must be signed in to change notification settings - Fork 15
/
publish.bat
144 lines (101 loc) · 4.48 KB
/
publish.bat
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
cd publish
for /d %%i in (".\*") do (
rmdir /s /q "%%i"
)
cd ../src/Asv.Drones.Gui.Desktop
dotnet publish -c Release -r win-arm --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/win-arm/app
dotnet publish -c Release -r win-arm64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/win-arm64/app
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/win-x64/app
dotnet publish -c Release -r win-x86 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/win-x86/app
dotnet publish -c Release -r linux-arm --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/linux-arm/app
dotnet publish -c Release -r linux-arm64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/linux-arm64/app
dotnet publish -c Release -r linux-musl-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/linux-musl-x64/app
dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/linux-x64/app
dotnet publish -c Release -r osx-arm64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/osx-arm64/app
dotnet publish -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ~/../../../publish/osx-x64/app
cd ../../publish
del /S *.pdb
cd win-arm/app
move Asv.Drones.Gui.Desktop.exe asv-drones-win-arm.exe
cd ../../win-arm64/app
move Asv.Drones.Gui.Desktop.exe asv-drones-win-arm64.exe
cd ../../win-x64/app
move Asv.Drones.Gui.Desktop.exe asv-drones-win-x64.exe
cd ../../win-x86/app
move Asv.Drones.Gui.Desktop.exe asv-drones-win-x86.exe
cd ../../linux-arm/app
move Asv.Drones.Gui.Desktop asv-drones-linux-arm
cd ../../linux-arm64/app
move Asv.Drones.Gui.Desktop asv-drones-linux-arm64
cd ../../linux-musl-x64/app
move Asv.Drones.Gui.Desktop asv-drones-linux-musl-x64
cd ../../linux-x64/app
move Asv.Drones.Gui.Desktop asv-drones-linux-x64
cd ../../osx-arm64/app
move Asv.Drones.Gui.Desktop asv-drones-osx-arm64
cd ../../osx-x64/app
move Asv.Drones.Gui.Desktop asv-drones-osx-x64
cd ../../..
setlocal enabledelayedexpansion
set "xmlFile=src\Directory.Build.props"
for /f "tokens=2 delims=<> " %%a in ('findstr /i "<ProductVersion>" "%xmlFile%"') do (
set "productVersion=%%a"
)
set "issFile=win-arm-install.iss"
set "tempFile=%temp%\temp.iss"
for /f "tokens=*" %%a in ('type "%issFile%"') do (
set "line=%%a"
echo !line! | findstr /C:"#define MyAppVersion" > nul
if !errorlevel! == 0 (
echo #define MyAppVersion "%productVersion%" >> "%tempFile%"
) else (
echo !line! >> "%tempFile%"
)
)
move /y "%tempFile%" "%issFile%" > nul
set "issFile=win-arm64-install.iss"
set "tempFile=%temp%\temp.iss"
for /f "tokens=*" %%a in ('type "%issFile%"') do (
set "line=%%a"
echo !line! | findstr /C:"#define MyAppVersion" > nul
if !errorlevel! == 0 (
echo #define MyAppVersion "%productVersion%" >> "%tempFile%"
) else (
echo !line! >> "%tempFile%"
)
)
move /y "%tempFile%" "%issFile%" > nul
set "issFile=win-x64-install.iss"
set "tempFile=%temp%\temp.iss"
for /f "tokens=*" %%a in ('type "%issFile%"') do (
set "line=%%a"
echo !line! | findstr /C:"#define MyAppVersion" > nul
if !errorlevel! == 0 (
echo #define MyAppVersion "%productVersion%" >> "%tempFile%"
) else (
echo !line! >> "%tempFile%"
)
)
move /y "%tempFile%" "%issFile%" > nul
set "issFile=win-x86-install.iss"
set "tempFile=%temp%\temp.iss"
for /f "tokens=*" %%a in ('type "%issFile%"') do (
set "line=%%a"
echo !line! | findstr /C:"#define MyAppVersion" > nul
if !errorlevel! == 0 (
echo #define MyAppVersion "%productVersion%" >> "%tempFile%"
) else (
echo !line! >> "%tempFile%"
)
)
move /y "%tempFile%" "%issFile%" > nul
endlocal
cd publish
iscc ../win-arm-install.iss
iscc ../win-arm64-install.iss
iscc ../win-x86-install.iss
iscc ../win-x64-install.iss
wsl sed -i 's/\r//' linux_packages.sh
wsl sed -i 's/\r//' osx_packages.sh
wsl ../linux_packages.sh
wsl ../osx_packages.sh