Skip to content

Commit 74921f7

Browse files
committed
update
1 parent ea3ca89 commit 74921f7

File tree

11 files changed

+159
-28
lines changed

11 files changed

+159
-28
lines changed

core/app.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ IDR_STARTUP_SCRIPT TEXTFILE "startupcheck.cmd"
3333
IDR_SHELL_SCRIPT TEXTFILE "shell.cmd"
3434
IDR_DOCTOR_SCRIPT TEXTFILE "bbdoctor.cmd"
3535
IDR_CONFIG_JSON TEXTFILE "webkit.json"
36+
IDR_URL_JSON TEXTFILE "webkit.url"
3637
IDR_INITDB_SCRIPT TEXTFILE "initdb.cmd"
3738

3839
//

core/func.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ TCHAR szStartupLog[MAX_PATH];
4141

4242
TCHAR szConfigFile[MAX_PATH];
4343
TCHAR szWebkitConfigFile[MAX_PATH];
44+
TCHAR szWeburlConfigFile[MAX_PATH];
4445

4546
TCHAR szApacheExe[MAX_PATH];
4647
TCHAR szPhpExe[MAX_PATH];
@@ -513,6 +514,8 @@ BOOL IsPHPConfigValid()
513514
replace_all(data, "short_open_tag = Off", "short_open_tag = On");
514515
replace_all(data, "max_execution_time = 30", "max_execution_time = 120");
515516
replace_all(data, "max_input_time = 60", "max_input_time = 120");
517+
replace_all(data, "display_errors = Off", "display_errors = On");
518+
replace_all(data, "display_startup_errors = Off", "display_startup_errors = On");
516519
replace_all(data, ";error_log = syslog", "error_log = \"%phpbrowserbox%/logs/php_error.log\"");
517520
replace_all(data, ";extension_dir = \"ext\"", "extension_dir = \"%phpbrowserbox%/bin/php/ext/\" ");
518521

@@ -566,6 +569,7 @@ BOOL preprocessAppConfig(char *basePath)
566569

567570
sprintf(szConfigFile, "%s%s", basePath, "assets\\app.json");
568571
sprintf(szWebkitConfigFile, "%s%s", basePath, "tmp\\webkit.json");
572+
sprintf(szWeburlConfigFile, "%s%s", basePath, "tmp\\dashboard.url");
569573

570574
sprintf(szPortScanFile, "%s%s", basePath, "tmp\\ports.txt");
571575
sprintf(szStartupLog, "%s%s", basePath, "tmp\\startup.txt");
@@ -736,14 +740,19 @@ void rebuildConfig()
736740

737741
// load config from json resource and save it
738742
std::string szWebkitConfigData = getResFileContents(IDR_CONFIG_JSON);
743+
std::string szWeburlConfigData = getResFileContents(IDR_URL_JSON);
744+
745+
//manually parse files
739746
replace_config_tokens(szWebkitConfigData);
747+
replace_config_tokens(szWeburlConfigData);
740748

741749
// save files
742750
saveFileContents(szApacheConfDest, strApacheConfData);
743751
saveFileContents(szMysqlConfDest, strMysqlConfData);
744752
saveFileContents(szPhpConfDest1, strPhpConfData);
745753
saveFileContents(szPhpConfDest2, strPhpConfData);
746754

755+
saveFileContents(szWeburlConfigFile, szWeburlConfigData);
747756
saveFileContents(szWebkitConfigFile, szWebkitConfigData);
748757
}
749758

core/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ int WINAPI WinMain(HINSTANCE hThisInstance,
6262
TCHAR szFileName[MAX_PATH];
6363
GetModuleFileName(NULL, szFileName, MAX_PATH);
6464

65+
cout << "Welcome to PHPBrowserbox v6.0" ;
66+
6567
/*
6668
get basepath e.g. e:/phpbb/
6769
*/
@@ -119,7 +121,7 @@ int WINAPI WinMain(HINSTANCE hThisInstance,
119121
}
120122

121123
// start log
122-
sprintf(szLogFileName, "%s%s", basePath, "phpbrowserbox.pid");
124+
sprintf(szLogFileName, "%s%s", basePath, "tmp/phpbrowserbox.pid");
123125
// std::ofstream log(szLogFileName, std::ios_base::app | std::ios_base::out);
124126

125127
ofs.open(szLogFileName, std::ofstream::out | std::ofstream::app);

core/phpbrowserbox.cbp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<Project>
55
<Option title="phpbrowserbox" />
66
<Option pch_mode="2" />
7-
<Option compiler="gcc" />
7+
<Option compiler="msys2-mingw-w64-x86_64" />
88
<Build>
99
<Target title="Debug">
1010
<Option output="../../master/phpbrowserbox" prefix_auto="1" extension_auto="1" />
1111
<Option object_output="obj/Debug/" />
1212
<Option type="1" />
13-
<Option compiler="gcc" />
13+
<Option compiler="msys2-mingw-w64-x86_64" />
1414
<Compiler>
1515
<Add option="-g" />
1616
</Compiler>
@@ -19,7 +19,7 @@
1919
<Option output="../../master/phpbrowserbox" prefix_auto="1" extension_auto="1" />
2020
<Option object_output="obj/Release/" />
2121
<Option type="0" />
22-
<Option compiler="gcc" />
22+
<Option compiler="msys2-mingw-w64-x86_64" />
2323
<Compiler>
2424
<Add option="-O2" />
2525
</Compiler>
@@ -53,6 +53,7 @@
5353
<Unit filename="shell.cmd" />
5454
<Unit filename="startupcheck.cmd" />
5555
<Unit filename="webkit.json" />
56+
<Unit filename="webkit.url" />
5657
<Extensions>
5758
<lib_finder disable_auto="1" />
5859
</Extensions>

core/phpbrowserbox.depend

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,53 @@
9999
<climits>
100100
<fstream>
101101

102+
1679230710 source:e:\php box\repo\phpbrowserboxv6.0\core\app.rc
103+
<windows.h>
104+
"resource.h"
105+
106+
1679230694 e:\php box\repo\phpbrowserboxv6.0\core\resource.h
107+
108+
1679238690 source:e:\php box\repo\phpbrowserboxv6.0\core\main.cpp
109+
<tchar.h>
110+
<windows.h>
111+
<stdio.h>
112+
<iostream>
113+
<string>
114+
<process.h>
115+
<cstdio>
116+
"resource.h"
117+
<ios>
118+
<fstream>
119+
"funcs.h"
120+
<stdexcept>
121+
<regex>
122+
123+
1679166108 e:\php box\repo\phpbrowserboxv6.0\core\funcs.h
124+
125+
1679233308 source:e:\php box\repo\phpbrowserboxv6.0\core\func.cpp
126+
<tchar.h>
127+
<windows.h>
128+
<stdio.h>
129+
<iostream>
130+
<string>
131+
<process.h>
132+
<cstdio>
133+
"resource.h"
134+
<ios>
135+
<fstream>
136+
"funcs.h"
137+
<cstring>
138+
"RSJparser.tcc"
139+
<stdexcept>
140+
141+
1627987526 e:\php box\repo\phpbrowserboxv6.0\core\rsjparser.tcc
142+
<stdio.h>
143+
<stdlib.h>
144+
<string>
145+
<vector>
146+
<unordered_map>
147+
<utility>
148+
<iostream>
149+
<climits>
150+
<fstream>
151+

core/phpbrowserbox.layout

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,69 +2,74 @@
22
<CodeBlocks_layout_file>
33
<FileVersion major="1" minor="0" />
44
<ActiveTarget name="Release" />
5-
<File name="funcs.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
5+
<File name="bbdoctor.cmd" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
66
<Cursor>
7-
<Cursor1 position="175" topLine="0" />
7+
<Cursor1 position="216" topLine="12" />
88
</Cursor>
99
</File>
10-
<File name="main.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
10+
<File name="app.rc" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
1111
<Cursor>
12-
<Cursor1 position="1821" topLine="82" />
12+
<Cursor1 position="1003" topLine="26" />
1313
</Cursor>
1414
</File>
15-
<File name="RSJparser.tcc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
15+
<File name="shell.cmd" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
1616
<Cursor>
17-
<Cursor1 position="23836" topLine="639" />
17+
<Cursor1 position="0" topLine="0" />
1818
</Cursor>
1919
</File>
20-
<File name="shell.cmd" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
20+
<File name="main.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
2121
<Cursor>
22-
<Cursor1 position="0" topLine="0" />
22+
<Cursor1 position="1106" topLine="55" />
2323
</Cursor>
2424
</File>
25-
<File name="firewall.cmd" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
25+
<File name="resource.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
2626
<Cursor>
27-
<Cursor1 position="299" topLine="0" />
27+
<Cursor1 position="238" topLine="0" />
2828
</Cursor>
2929
</File>
3030
<File name="webkit.json" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
3131
<Cursor>
32-
<Cursor1 position="8" topLine="0" />
32+
<Cursor1 position="12" topLine="0" />
3333
</Cursor>
3434
</File>
35-
<File name="func.cpp" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
35+
<File name="startupcheck.cmd" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
3636
<Cursor>
37-
<Cursor1 position="8995" topLine="345" />
37+
<Cursor1 position="220" topLine="7" />
3838
</Cursor>
3939
</File>
40-
<File name="phpbrowserbox.exe.Manifest" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
40+
<File name="webkit.url" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
4141
<Cursor>
42-
<Cursor1 position="225" topLine="0" />
42+
<Cursor1 position="67" topLine="0" />
4343
</Cursor>
4444
</File>
45-
<File name="app.rc" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
45+
<File name="funcs.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
4646
<Cursor>
47-
<Cursor1 position="1008" topLine="26" />
47+
<Cursor1 position="175" topLine="0" />
4848
</Cursor>
4949
</File>
50-
<File name="startupcheck.cmd" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
50+
<File name="RSJparser.tcc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
5151
<Cursor>
52-
<Cursor1 position="220" topLine="7" />
52+
<Cursor1 position="23836" topLine="639" />
5353
</Cursor>
5454
</File>
55-
<File name="initdb.cmd" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
55+
<File name="initdb.cmd" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
5656
<Cursor>
5757
<Cursor1 position="211" topLine="8" />
5858
</Cursor>
5959
</File>
60-
<File name="resource.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
60+
<File name="phpbrowserbox.exe.Manifest" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
6161
<Cursor>
62-
<Cursor1 position="207" topLine="0" />
62+
<Cursor1 position="225" topLine="0" />
6363
</Cursor>
6464
</File>
65-
<File name="bbdoctor.cmd" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
65+
<File name="firewall.cmd" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
6666
<Cursor>
67-
<Cursor1 position="216" topLine="12" />
67+
<Cursor1 position="299" topLine="0" />
68+
</Cursor>
69+
</File>
70+
<File name="func.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
71+
<Cursor>
72+
<Cursor1 position="15229" topLine="567" />
6873
</Cursor>
6974
</File>
7075
</CodeBlocks_layout_file>

core/resource.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
#define IDR_SHELL_SCRIPT 140
66
#define IDR_DOCTOR_SCRIPT 150
77
#define IDR_INITDB_SCRIPT 160
8+
#define IDR_URL_JSON 170

core/webkit.url

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[InternetShortcut]
2+
3+
URL=http://localhost:%apache_port%/dashboard/
4+
5+
WorkingDirectory=C:\WINDOWS\
6+
7+
ShowCommand=7
8+
9+
IconIndex=1
10+
11+
Modified=20F06BA06D07BD014D
12+
13+
HotKey=1601

phpbb/main.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main()
6+
{
7+
cout << "Hello world!" << endl;
8+
return 0;
9+
}

phpbb/obj/Release/main.o

2.74 KB
Binary file not shown.

0 commit comments

Comments
 (0)