@@ -42,8 +42,7 @@ <h4>Phone Preview</h4>
4242 < h4 > Project Structure</ h4 >
4343 < img class ="shadow-lg article-inner-image " src ="static/img/personal_projects/gb_library/folder_structure.png "> </ img >
4444 < h4 > Libraries and Configuration</ h4 >
45- < pre class ="col-md-12 ">
46- < code class ="language-autohotkey "> #NoEnv ; GB Library v2 Bootstrap Version
45+ < pre class ="col-md-12 "> < code class ="language-autohotkey "> #NoEnv ; GB Library v2 Bootstrap Version
4746#SingleInstance force
4847SetBatchLines, -1
4948#include, <AHKhttp>
@@ -52,13 +51,11 @@ <h4>Libraries and Configuration</h4>
5251global WebEmu := "http://127.0.0.1:81"
5352global WebEmuRoot := WebEmu ; Root, same due to the use of index.html
5453global PuertoPHP := 81 ; Emulator Port
55- global PuertoAHK := 80 ; Auto-generated base Port</ code >
56- </ pre >
54+ global PuertoAHK := 80 ; Auto-generated base Port</ code > </ pre >
5755 </ div >
5856
5957 < h4 > Dynamic generator</ h4 >
60- < pre class ="col-md-12 ">
61- < code class ="language-autohotkey "> Loop Files, %A_ScriptDir%\roms\*.*, R ; Recurse into subfolders.
58+ < pre class ="col-md-12 "> < code class ="language-autohotkey "> Loop Files, %A_ScriptDir%\roms\*.*, R ; Recurse into subfolders.
6259{
6360 StringReplace , CurrentGame, A_LoopFileName, %A_Space%,,All
6461 StringReplace, FileNameNoExt, A_LoopFileName, % "." . A_LoopFileExt
@@ -72,12 +69,10 @@ <h4>Dynamic generator</h4>
7269 EnlacesRoms := EnlacesRoms Rutilla
7370 ListaRoms.Push(A_LoopFileName)
7471 paths["/"CurrentGame] := Func("IniciarRom").Bind(A_LoopFileName)
75- }</ code >
76- </ pre >
72+ }</ code > </ pre >
7773
7874 < h4 > PHP & HTTP Server</ h4 >
79- < pre class ="col-md-12 ">
80- < code class ="language-autohotkey "> ; PHP Server
75+ < pre class ="col-md-12 "> < code class ="language-autohotkey "> ; PHP Server
8176SetWorkingDir, %A_ScriptDir%\htdocs
8277Run, cmd /c "%A_ScriptDir%\php" -S 0.0.0.0:%PuertoPHP% -t . codex.php,, Hide
8378menu, tray, NoStandard
@@ -90,20 +85,17 @@ <h4>PHP & HTTP Server</h4>
9085server := new HttpServer()
9186server.LoadMimes(A_ScriptDir . "/lib/mime.types")
9287server.SetPaths(paths)
93- server.Serve(PuertoAHK)</ code >
94- </ pre >
88+ server.Serve(PuertoAHK)</ code > </ pre >
9589
9690 < h4 > Emulator REST Controller</ h4 >
97- < pre class ="col-md-12 ">
98- < code class ="language-autohotkey "> IniciarRom(rom, ByRef req, ByRef res) {
91+ < pre class ="col-md-12 "> < code class ="language-autohotkey "> IniciarRom(rom, ByRef req, ByRef res) {
9992 RunWait, cmd /c del /f "%A_ScriptDir%\htdocs\rom\game.gb",, Hide ; Force delete
10093 FileCopy, %A_ScriptDir%\roms\%rom%, %A_ScriptDir%\htdocs\rom\game.gb, 1
10194 res.SetBodyText("<html><header><title>GB Online Library</title></header><body><meta http-equiv='Refresh' content='0; url=" WebEmu "' /><a href='" WebEmu "'>Iniciar Emulador</a></body></html>")
10295 res.status := 200
10396 FormatTime, FechaActual,,[dd-MM-yyyy HH:mm:ss]
10497 FileAppend, %FechaActual% Iniciando Rom`: %rom%`n, ..\Log.txt
105- }</ code >
106- </ pre >
98+ }</ code > </ pre >
10799
108100
109101 < br > < br >
0 commit comments