Skip to content

Commit bf6d6aa

Browse files
committed
Merge branch 'develop'
2 parents fea0850 + d4dd251 commit bf6d6aa

File tree

366 files changed

+33538
-10846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

366 files changed

+33538
-10846
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
License
2+
3+
omSupply software (including it�s documentation produced by mSupply Foundation) is protected by copyright and is the exclusive property of mSupply Foundation and all rights are reserved.
4+
5+
mSupply Foundation grants you license to use mSupply software according to the clauses herein stated and your installation and/or continued use of mSupply confirms your agreement.
6+
7+
The software may not, in whole or in part, be copied, reproduced, translated or reduced to any machine readable form without prior consent in writing from mSupply Foundation, except as a backup copy. The user guide, including material on the mSupply web site may not, in whole or in part, be copied, reproduced, translated or reduced to any machine readable form without prior consent in writing from mSupply Foundation.
8+
9+
10+
Warranty
11+
12+
No warranty is given on product software, the user guide and other training materials. Even though mSupply Foundation has tested the software and documentation and reviewed their contents, mSupply Foundation and its distributors and dealers make no warranties, either expressed or implied, with respect to their fitness for a particular purpose. The program and the user guides are distributed solely on an �as is� basis. The entire risk as to their quality and performance is with the you.
13+
14+
Should either the software or the manuals or both prove defective, you, and not mSupply Foundation or its distributors or dealers, assume the entire cost of all necessary servicing, repair, or correction.
15+
16+
mSupply Foundation and its distributors and dealers will not be liable for direct, indirect, incidental, or consequential damages resulting from any defect in the software or user guide, even if they have been advised of the possibility of such damage.

build/windows/adjustSUFs.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const fs = require('fs');
2+
const files = fs.readdirSync('.');
3+
4+
files.forEach((fileName) => {
5+
if (fileName.endsWith('.suf')) {
6+
const sufFileName = `${fileName}`;
7+
const fileContent = fs.readFileSync(sufFileName, 'utf8');
8+
fs.writeFileSync(fileName, replaceVersion(adjustOutputFolder(fileContent)));
9+
}
10+
});
11+
12+
function replaceVersion(fileContent) {
13+
return fileContent.replace(/replace with version/g, process.env.versionTag);
14+
}
15+
16+
function adjustOutputFolder(fileContent) {
17+
return fileContent.replace(
18+
/<OutputFolder>.*<\/OutputFolder>/g,
19+
`<OutputFolder>${process.env.installersOutputFolder}</OutputFolder>`
20+
);
21+
}

build/windows/demo/launch.bat

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
start omSupply-server-sqlite.exe
2+
start "" http://localhost:8000/login

build/windows/demo/local.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
server:
2+
port: 8000
3+
danger_allow_http: true
4+
sync:
5+
url: 'http://localhost:2048'
6+
username: ''
7+
password_sha256: ''
8+
interval_sec: 3600
9+
central_server_site_id: 1
10+
site_id: 2
11+
database:
12+
host: 'localhost'
13+
port: 5432
14+
username: 'user'
15+
password: 'pass'
16+
database_name: omsupply-demo
17+
logging:
18+
mode: All
19+
level: Info
20+
directory: log
21+
filename: remote_server.log
22+
max_file_count: 5
23+
max_file_size: 10
24+

build/windows/demo/omsupply-demo

736 KB
Binary file not shown.

build/windows/installers-build.bat

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@ECHO ##### Removing installers folder #####
2+
@rmdir "installers" /s /q
3+
4+
@ECHO ##### Adjusting SUFS #####
5+
FOR /F "delims=*" %%i in ('more omSupply\version.txt') do SET versionTag=%%i
6+
@ECHO "current tag = %versionTag%"
7+
SET installersOutputFolder=%WORKSPACE%\installers
8+
9+
@cd omSupply
10+
node "adjustSUFs.js"
11+
@cd ..
12+
13+
@ECHO ##### Creating installers #####
14+
start "" /wait "C:\Program Files (x86)\Setup Factory 9\SUFDesign.exe" /BUILD /LOG:installers\setup-factory.log "omSupply\omsupply_server.suf"
15+
start "" /wait "C:\Program Files (x86)\Setup Factory 9\SUFDesign.exe" /BUILD /LOG:installers\setup-factory.log "omSupply\omsupply_server_upgrader.suf"
16+
start "" /wait "C:\Program Files (x86)\Setup Factory 9\SUFDesign.exe" /BUILD /LOG:installers\setup-factory.log "omSupply\omsupply_desktop.suf"
17+
start "" /wait "C:\Program Files (x86)\Setup Factory 9\SUFDesign.exe" /BUILD /LOG:installers\setup-factory.log "omSupply\omsupply_desktop_upgrader.suf"
18+
start "" /wait "C:\Program Files (x86)\Setup Factory 9\SUFDesign.exe" /BUILD /LOG:installers\setup-factory.log "omSupply\omsupply_demo.suf"

build/windows/omsupply-build.bat

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@ECHO ##### Removing previous builds #####
2+
@rmdir "omSupply" /s /q
3+
4+
@ECHO ##### Starting omsupply builds #####
5+
mkdir "omSupply"
6+
mkdir "omSupply\Server"
7+
mkdir "omSupply\Desktop"
8+
xcopy "server\configuration" "omSupply\Server\configuration" /e /h /c /i
9+
10+
copy "server\server\omSupply.ico" "build\omSupply.ico"
11+
xcopy "build\*.*" "omSupply" /c
12+
xcopy "build\windows\*.*" "omSupply" /c
13+
xcopy "build\windows\demo" "omSupply\demo" /c /y /i
14+
copy "version.txt" "omSupply\version.txt"
15+
16+
@cd "build\windows"
17+
start /b /wait omsupply-prepare.bat
18+
start /b /wait omsupply-sqlite-build.bat
19+
start /b /wait omsupply-postgres-build.bat
20+
start /b /wait omsupply-desktop-build.bat
21+
cd "..\..\server"
22+
start /wait cargo build --release && copy "target\release\remote_server.exe" "..\omSupply\Server\omSupply-server-sqlite.exe"
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@ECHO ##### Building omSupply for the desktop #####
2+
cd "..\..\client" && yarn electron:build && xcopy "packages\electron\out\open mSupply-win32-x64\**" "..\omSupply\Desktop\" /e /h /c /i
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@ECHO ##### Building omsupply for the postgres #####
2+
cd "..\..\server" && cargo build --release --bin omsupply_service --features postgres && copy "target\release\omsupply_service.exe" "..\omSupply\Server\omSupply-postgres.exe"

build/windows/omsupply-prepare.bat

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@ECHO ##### Prepare omsupply build #####
2+
cd "..\..\client" && yarn install --force --frozen-lockfile && yarn build
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@ECHO ##### Building omsupply for the sqlite #####
2+
cd "..\..\server" && cargo build --release --bin omsupply_service && copy "target\release\omsupply_service.exe" "..\omSupply\Server\omSupply-sqlite.exe"

0 commit comments

Comments
 (0)