Task: Add multiple profiles and add lib for custom build profile and fixed in sandbox clinic
This commit is contained in:
parent
afd81b1dfb
commit
57ca98a652
9
.github/workflows/electron-sandbox.yml
vendored
9
.github/workflows/electron-sandbox.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Sandbox Clinic Desktop
|
name: Sandbox Clinic System
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
@ -9,7 +9,6 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
# os: [windows-latest]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Starting Context
|
- name: Starting Context
|
||||||
@ -20,16 +19,16 @@ jobs:
|
|||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: Use Node.js 10.x
|
- name: Use Node.js 16.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
node-version: 16.x
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
run: |
|
run: |
|
||||||
yarn install
|
yarn install
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: |
|
run: |
|
||||||
yarn run dist
|
yarn run dist
|
||||||
- name: Cleanup artifacts Linux and macOS
|
- name: Cleanup artifacts Linux and macOS
|
||||||
if: matrix.os != 'windows-latest'
|
if: matrix.os != 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
yarn.lock
|
yarn.lock
|
||||||
dist
|
dist
|
||||||
|
electron-builder.env
|
||||||
|
lib.js
|
@ -1,4 +1,4 @@
|
|||||||
# CUBETIQ Clinic Application
|
# CUBETIQ Clinic System Management
|
||||||
|
|
||||||
![Sandbox Clinic Desktop](https://github.com/CUBETIQ/sandbox-clinic/workflows/Sandbox%20Clinic%20Desktop/badge.svg)
|
![Sandbox Clinic Desktop](https://github.com/CUBETIQ/sandbox-clinic/workflows/Sandbox%20Clinic%20Desktop/badge.svg)
|
||||||
|
|
||||||
|
BIN
assets/images/icon.ico
Normal file
BIN
assets/images/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
assets/images/icon.png
Normal file
BIN
assets/images/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
9
build.sh
Executable file
9
build.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
BUILD_PROFILE=${1:-clinic}
|
||||||
|
echo "Build for profile ${BUILD_PROFILE}"
|
||||||
|
|
||||||
|
cat profile/${BUILD_PROFILE}.env > lib.js
|
||||||
|
|
||||||
|
echo "Verify lib.js"
|
||||||
|
cat lib.js
|
||||||
|
|
||||||
|
yarn dist
|
0
builder-config.yaml
Normal file
0
builder-config.yaml
Normal file
@ -2,10 +2,10 @@
|
|||||||
"productName": "Clinic-Dev",
|
"productName": "Clinic-Dev",
|
||||||
"appId": "com.cubetiqs.clinic",
|
"appId": "com.cubetiqs.clinic",
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "com.cubetiqs.pro.clinic"
|
"category": "com.cubetiqs.clinic"
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"category": "com.cubetiqs.pro.clinic",
|
"category": "com.cubetiqs.clinic",
|
||||||
"target": ["AppImage", "deb"]
|
"target": ["AppImage", "deb"]
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
"productName": "Clinic-Sandbox",
|
"productName": "Clinic-Sandbox",
|
||||||
"appId": "com.cubetiqs.clinic",
|
"appId": "com.cubetiqs.clinic",
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "com.cubetiqs.pro.clinic"
|
"category": "com.cubetiqs.clinic"
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"category": "com.cubetiqs.pro.clinic",
|
"category": "com.cubetiqs.clinic",
|
||||||
"target": ["AppImage", "deb"]
|
"target": ["AppImage", "deb"]
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
|
7
main.js
7
main.js
@ -1,10 +1,11 @@
|
|||||||
const electron = require("electron");
|
const electron = require("electron");
|
||||||
const { app, BrowserWindow } = electron;
|
const { app, BrowserWindow } = electron;
|
||||||
const os = require("os");
|
const os = require("os");
|
||||||
|
const APP_URL = require("./lib");
|
||||||
|
|
||||||
const URL = process.env.APP_URL || "https://clinic.cubetiqs.com";
|
const URL = APP_URL || "https://clinic.cubetiqs.com";
|
||||||
const MAIN_URL = `${URL}?platform=desktop&offline=true&os=${os.platform()}&hostname=${os.hostname()}&arch=${os.arch()}&source=${process.env.USERNAME || "unknown"}`
|
const MAIN_URL = `${URL}?platform=desktop&offline=true&os=${os.platform()}&hostname=${os.hostname()}&arch=${os.arch()}&source=${process.env.USERNAME || "unknown"}`
|
||||||
const APP_TITLE = "CUBETIQ CLINIC SYSTEM";
|
const APP_TITLE = "Clinic System";
|
||||||
|
|
||||||
let mainApp;
|
let mainApp;
|
||||||
app.allowRendererProcessReuse = true;
|
app.allowRendererProcessReuse = true;
|
||||||
@ -12,6 +13,8 @@ app.on("ready", () => {
|
|||||||
mainApp = new BrowserWindow({
|
mainApp = new BrowserWindow({
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 768,
|
height: 768,
|
||||||
|
icon: "./assets/images/icon.png",
|
||||||
|
title: APP_TITLE,
|
||||||
});
|
});
|
||||||
|
|
||||||
mainApp.webContents.executeJavaScript(
|
mainApp.webContents.executeJavaScript(
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"description": "CUBETIQ Clinic System Management",
|
"description": "CUBETIQ Clinic System Management",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
|
"icon": "./assets/images/icon.ico",
|
||||||
"build": {
|
"build": {
|
||||||
"productName": "Clinic-Sandbox",
|
"productName": "Sandbox-Clinic",
|
||||||
"appId": "com.cubetiqs.clinic",
|
"appId": "com.cubetiqs.clinic",
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "com.cubetiqs.clinic"
|
"category": "com.cubetiqs.clinic"
|
||||||
@ -17,7 +18,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
"target": "nsis"
|
"target": "nsis",
|
||||||
|
"icon": "./assets/images/icon.ico"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -27,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"start": "yarn && cross-env DR_URL=https://clinic.cubetiqs.com?platform=desktop electron ./main",
|
"start": "yarn && cross-env APP_URL=https://clinic.cubetiqs.com?platform=desktop electron ./main",
|
||||||
"pack": "electron-builder --dir",
|
"pack": "electron-builder --dir",
|
||||||
"dist": "electron-builder --publish never",
|
"dist": "electron-builder --publish never",
|
||||||
"build-icon": "electron-icon-builder --input=icon.png --output=dist/icons",
|
"build-icon": "electron-icon-builder --input=icon.png --output=dist/icons",
|
||||||
|
3
profile/clinic.env
Normal file
3
profile/clinic.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const APP_URL = 'https://clinic.cubetiqs.com';
|
||||||
|
|
||||||
|
module.exports = APP_URL;
|
3
profile/dr.env
Normal file
3
profile/dr.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const APP_URL = 'https://app.drprofessionalglobal.com';
|
||||||
|
|
||||||
|
module.exports = APP_URL;
|
3
profile/em.env
Normal file
3
profile/em.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const APP_URL = 'https://app.embeautyclinic.com';
|
||||||
|
|
||||||
|
module.exports = APP_URL;
|
3
profile/kesor.env
Normal file
3
profile/kesor.env
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const APP_URL = 'https://claris.cubetiqs.com';
|
||||||
|
|
||||||
|
module.exports = APP_URL;
|
Loading…
Reference in New Issue
Block a user