-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-distribution.bat
More file actions
139 lines (128 loc) · 3.99 KB
/
Copy pathcreate-distribution.bat
File metadata and controls
139 lines (128 loc) · 3.99 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
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
@echo off
REM ============================================================================
REM Create Distribution Package for Orderly API Trading Client
REM ============================================================================
setlocal EnableDelayedExpansion
REM Get version from project file (simplified - defaults to 1.0.0)
set VERSION=1.0.0
set PACKAGE_NAME=OrderlyAPI-v%VERSION%-win-x64
echo ============================================================================
echo Creating Distribution Package
echo ============================================================================
echo Version: %VERSION%
echo Package: %PACKAGE_NAME%
echo.
REM Check if publish folder exists
if not exist publish\OrderlyAPI.exe (
echo ERROR: OrderlyAPI.exe not found in publish folder!
echo Please run build-standalone.bat first.
echo.
pause
exit /b 1
)
REM Create distribution folder
echo [1/6] Creating distribution folder...
if exist %PACKAGE_NAME% rmdir /s /q %PACKAGE_NAME%
mkdir %PACKAGE_NAME%
echo Done!
echo.
REM Copy executable
echo [2/6] Copying executable...
copy publish\OrderlyAPI.exe %PACKAGE_NAME%\ > nul
echo Done!
echo.
REM Create README for distribution
echo [3/6] Creating README...
(
echo ========================================
echo Orderly API Trading Client v%VERSION%
echo ========================================
echo.
echo INSTALLATION:
echo 1. Extract all files to a folder
echo 2. Double-click OrderlyAPI.exe to run
echo 3. No installation required!
echo.
echo CREDENTIALS:
echo - Saved in credentials.txt ^(same folder^)
echo - Automatically created on first connect
echo - Portable - move folder anywhere
echo.
echo SYSTEM REQUIREMENTS:
echo - Windows 7 SP1 or later
echo - 64-bit Windows ^(x64^)
echo - 512 MB RAM minimum
echo - Internet connection
echo.
echo FIRST RUN:
echo - Application creates credentials.txt in same folder
echo - Enter your Orderly API credentials
echo - Credentials saved locally ^(Base64-encoded^)
echo - Portable - copy folder to move application
echo.
echo FEATURES:
echo - Real-time price data ^(BBO^)
echo- Position tracking with P^&L
echo - Single order placement
echo - Pairs trading support
echo - WebSocket connections ^(Public ^& Private^)
echo.
echo SUPPORT:
echo GitHub: https://github.com/fintech07/OrderlyAPI2.0
echo.
echo ========================================
echo Copyright ^(c^) 2025 OrderlyAPI
echo ========================================
) > %PACKAGE_NAME%\README.txt
echo Done!
echo.
REM Copy documentation if exists
if exist BUILD-GUIDE.md (
echo [4/6] Copying documentation...
copy BUILD-GUIDE.md %PACKAGE_NAME%\ > nul
echo Done!
echo.
) else (
echo [4/6] Skipping documentation ^(not found^)...
echo.
)
REM Create ZIP file
echo [5/6] Creating ZIP archive...
powershell -Command "Compress-Archive -Path '%PACKAGE_NAME%' -DestinationPath '%PACKAGE_NAME%.zip' -Force"
if errorlevel 1 (
echo ERROR: Failed to create ZIP file!
pause
exit /b 1
)
echo Done!
echo.
REM Generate SHA256 checksum
echo [6/6] Generating SHA256 checksum...
certutil -hashfile %PACKAGE_NAME%.zip SHA256 > %PACKAGE_NAME%.sha256.txt
echo Done!
echo.
REM Display results
echo ============================================================================
echo Distribution Package Created Successfully!
echo ============================================================================
echo.
echo Package Details:
echo - Folder: %CD%\%PACKAGE_NAME%
echo - Archive: %CD%\%PACKAGE_NAME%.zip
echo - Checksum: %CD%\%PACKAGE_NAME%.sha256.txt
echo.
echo ZIP File Size:
for %%A in (%PACKAGE_NAME%.zip) do (
set size=%%~zA
set /a sizeMB=!size! / 1048576
echo !sizeMB! MB
)
echo.
echo SHA256 Checksum:
type %PACKAGE_NAME%.sha256.txt | findstr /v "CertUtil" | findstr /v "successfully"
echo.
echo ============================================================================
echo Ready for distribution!
echo ============================================================================
echo.
pause