Skip to content

Commit dabb5d3

Browse files
committed
Adding deploy bat script
Fix issue with settings reset every load
1 parent 51e9a6c commit dabb5d3

6 files changed

Lines changed: 29 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,3 +348,4 @@ MigrationBackup/
348348

349349
# Ionide (cross platform F# VS Code tools) working folder
350350
.ionide/
351+
Deploy/

DeployRelease.bat

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
3+
4+
SET /P version=Enter a version (example: 0.423b):
5+
IF NOT DEFINED version SET "version=UNKNOWN"
6+
7+
8+
SET sevenZipLocation="C:\Program Files\7-Zip\7z.exe"
9+
10+
SET deployDir=.\Deploy\TCodeRemote_v%version%_Release\
11+
SET deployZipDir=.\Deploy\
12+
13+
xcopy .\src\TCode_Remote\bin\Release\*.exe %deployDir% /s /i /K /D /H /Y
14+
xcopy .\src\TCode_Remote\bin\Release\*.config %deployDir% /s /i /K /D /H /Y
15+
xcopy .\src\TCode_Remote\bin\Release\*.dll %deployDir% /s /i /K /D /H /Y
16+
xcopy .\src\TCode_Remote\bin\Release\*.winmd %deployDir% /s /i /K /D /H /Y
17+
xcopy "Virtual serial port howto.pdf" %deployDir% /i /K /D /H /Y
18+
19+
%sevenZipLocation% a -tzip %deployZipDir%TCodeRemote_v%version%_Release.zip %deployDir%
20+
21+
xcopy %deployZipDir%TCodeRemote_v%version%_Release.zip "\\RASPBERRYPI.local\STK\Hardware\my software\TCode_Remote\" /s /i /K /D /H /Y
22+
23+
pause

Virtual serial port howto.odt

141 KB
Binary file not shown.

Virtual serial port howto.pdf

138 KB
Binary file not shown.

src/TCode_Remote/Library/Handler/SettingsHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ static SettingsHandler()
285285
try
286286
{
287287
var versionFull = GetVersion();
288-
var versionDouble = versionFull.Major + (versionFull.Minor / 100.00);
288+
// Yuck! convert the whole number to a decimal. Should never need more than 3 decimals.
289+
// TODO: Git gud at math?
290+
var versionDouble = versionFull.Major + versionFull.Minor < 10 ? (versionFull.Minor / 10) : versionFull.Minor < 100 ? (versionFull.Minor / 100.00) : (versionFull.Minor / 1000.00);
289291
if (Settings.Default.Version == 0)
290292
{
291293
ResetSettings();

src/TCode_Remote/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("0.2.0.0")]
55-
[assembly: AssemblyFileVersion("0.2.0.0")]
54+
[assembly: AssemblyVersion("0.20.0.0")]
55+
[assembly: AssemblyFileVersion("0.20.0.0")]

0 commit comments

Comments
 (0)