Skip to content

Commit a6b6d34

Browse files
Fix: Composer issue
1 parent 854c669 commit a6b6d34

Some content is hidden

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

93 files changed

+124
-7428
lines changed

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/electron-laravel.iml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 0 deletions

main.js

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
// Requiring electron.js
2+
const electron = require('electron')
3+
const path = require('path')
4+
5+
const BrowserWindow = electron.BrowserWindow
6+
const app = electron.app
7+
8+
app.on('ready', () => {
9+
createWindow()
10+
})
11+
12+
// Requiring the node-php-server
13+
let phpServer = require('node-php-server');
14+
15+
// Setting the port and the host ip
16+
const port = 8000, host = '127.0.0.1';
17+
const serverUrl = `http://${host}:${port}`;
18+
19+
20+
let mainWindow
21+
22+
function createWindow() {
23+
// Create a PHP Server
24+
phpServer.createServer({
25+
port: port,
26+
hostname: host,
27+
base: `${__dirname}/www/public`,
28+
keepalive: false,
29+
open: false,
30+
bin: `${__dirname}/php/php.exe`,
31+
router: __dirname + '/www/server.php'
32+
});
33+
34+
// Create the browser window.
35+
const {
36+
width,
37+
height
38+
} = electron.screen.getPrimaryDisplay().workAreaSize
39+
mainWindow = new BrowserWindow({
40+
width: width,
41+
height: height,
42+
show: false,
43+
autoHideMenuBar: true
44+
})
45+
46+
mainWindow.loadURL(serverUrl)
47+
48+
mainWindow.webContents.once('dom-ready', function () {
49+
mainWindow.show()
50+
mainWindow.maximize();
51+
// mainWindow.webContents.openDevTools()
52+
});
53+
54+
// Emitted when the window is closed.
55+
mainWindow.on('closed', function () {
56+
phpServer.close();
57+
mainWindow = null;
58+
})
59+
}
60+
61+
/*
62+
* This method will be called when Electron has finished
63+
* initialization and is ready to create browser windows
64+
* Some APIs can only be used after this event occurs
65+
* app.on('ready', createWindow) // <== this is extra so commented, enabling this can show 2 windows..
66+
*/
67+
68+
// Quit when all windows are closed.
69+
app.on('window-all-closed', function () {
70+
// On OS X it is common for applications and their menu bar
71+
// to stay active until the user quits explicitly with Cmd + Q
72+
if (process.platform !== 'darwin') {
73+
// PHP SERVER QUIT
74+
phpServer.close();
75+
app.quit();
76+
}
77+
})
78+
79+
app.on('activate', function () {
80+
// On OS X it's common to re-create a window in the app when the
81+
// dock icon is clicked and there are no other windows open.
82+
if (mainWindow === null) {
83+
createWindow()
84+
}
85+
})

php/README.md

Lines changed: 0 additions & 134 deletions
This file was deleted.

php/deplister.exe

-117 KB
Binary file not shown.

php/dev/php7ts.lib

-838 KB
Binary file not shown.

php/ext/php_bz2.dll

-84 KB
Binary file not shown.

0 commit comments

Comments
 (0)