-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c09746
commit 74b5d8e
Showing
6 changed files
with
3,560 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
version: 2.1 | ||
|
||
jobs: | ||
build_linux_image: | ||
docker: | ||
- image: ubuntu:latest | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Dependencies | ||
command: | | ||
apt-get update && apt-get install -y debootstrap squashfs-tools xorriso grub-pc-bin grub-efi-amd64-bin mtools node | ||
- run: | ||
name: Prepare the Chroot Environment | ||
command: | | ||
debootstrap --arch=amd64 focal ubuntu-chroot http://archive.ubuntu.com/ubuntu/ | ||
mount -t proc /proc ubuntu-chroot/proc | ||
mount -o bind /dev ubuntu-chroot/dev | ||
mount -o bind /sys ubuntu-chroot/sys | ||
- run: | ||
name: Install Xorg and Minimal Dependencies | ||
command: | | ||
chroot ubuntu-chroot /bin/bash -c "apt-get update && apt-get install -y xorg openbox" | ||
- run: | ||
name: Download and Set Up Electron AppImage | ||
command: | | ||
git clone https://github.com/Qrodex/SkoopinOS | ||
cd SkoopinOS | ||
npm install | ||
npm run build | ||
chmod +x ubuntu-chroot/root/dist/SkoopinOS.AppImage | ||
- run: | ||
name: Configure Autostart | ||
command: | | ||
echo '#!/bin/bash' > ubuntu-chroot/etc/init.d/start-electron-app | ||
echo 'startx /root/SkoopinOS.AppImage -- -nocursor' >> ubuntu-chroot/etc/init.d/start-electron-app | ||
chmod +x ubuntu-chroot/etc/init.d/start-electron-app | ||
ln -s /etc/init.d/start-electron-app ubuntu-chroot/etc/rc2.d/S99startelectronapp | ||
- run: | ||
name: Create the SquashFS Filesystem and ISO as before | ||
command: | | ||
# Follow previous steps to create filesystem.squashfs, then iso | ||
- store_artifacts: | ||
path: ubuntu-electron.iso | ||
destination: ubuntu-electron.iso | ||
|
||
run_virtual_machine: | ||
docker: | ||
- image: ubuntu:latest | ||
steps: | ||
- checkout | ||
- run: | ||
name: Start Virtual Machine | ||
background: true | ||
command: | | ||
qemu-system-x86_64 -enable-kvm -m 2048 -cdrom ubuntu-electron.iso -vnc :0 -daemonize | ||
sleep 10 # Wait for VM to boot | ||
- run: | ||
name: Start x11vnc Server | ||
command: | | ||
x11vnc -display :0 -rfbport 5900 -bg -forever | ||
workflows: | ||
version: 2 | ||
build_and_deploy: | ||
jobs: | ||
- build_linux_image | ||
- run_virtual_machine: | ||
requires: | ||
- build_linux_image | ||
filters: | ||
branches: | ||
only: master # Example: Run on the master branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
const electron = require('electron') | ||
const { app, BrowserWindow, ipcMain, ipcRenderer, screen } = require("electron"); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
var win | ||
|
||
function createWindow() { | ||
const { width, height } = screen.getPrimaryDisplay().workAreaSize; | ||
win = new BrowserWindow({ | ||
icon: './costume2.png', | ||
autoHideMenuBar: true, | ||
width: width, | ||
height: height, | ||
webPreferences: { | ||
enableRemoteModule: true, | ||
nodeIntegration: true, | ||
devTools: true, | ||
contextIsolation: false, | ||
nodeIntegrationInSubFrames: true, | ||
nodeIntegrationInWorker: true, | ||
webviewTag: true | ||
} | ||
}) | ||
win.loadFile('index.html') | ||
} | ||
|
||
app.whenReady().then(() => { | ||
createWindow() | ||
screen.on('display-metrics-changed', (event, display, changedMetrics) => { | ||
if (changedMetrics.size && !currentScreenSize.equals(changedMetrics.size)) { | ||
const { width, height } = screen.getPrimaryDisplay().workAreaSize; | ||
win.setSize(width, height) | ||
console.log('resized') | ||
} | ||
}); | ||
}); | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}) | ||
|
||
app.on('activate', () => { | ||
if (BrowserWindow.getAllWindows().length === 0) { | ||
createWindow() | ||
} | ||
}) |
Oops, something went wrong.