Home
Hi To create update php/js application in exeoutput You can try my scripts.
this file canNOT be update via script later !!!
update file AES password
$pass_buduj_plik='password'
You can change the zone
$defaultTimeZone='Europe/Warsaw'
Setting the local PC directory
$up_dir='C:\Users\<username>\AppData\Local\ExeOutput\UserApplication\{APP GUID}'."\\";
{APP GUID} - ExeOutput --> Application Output --> Output Settings --> Application GUID
i.e.
$up_dir='C:\Users\<username>\AppData\Local\ExeOutput\UserApplication\{3AE5192C-F8CC-477F-B0E0-73D6D84D5BF2}'."\\"; // for windows cmd
$up_dir="/mnt/c/Users/<username>/AppData/Local/ExeOutput/UserApplication/{3AE5192C-F8CC-477F-B0E0-73D6D84D5BF2}/"; // for windoes subsystem for Linux (WSL)
update file will be stored as dane5.txt in that directory
Files to include in the update have to be put:
function buduj_plik($small=0) {
global $up_dir,$pass_buduj_plik;
$ar=array(
"dane.js",
"pmo.php",
"jr.js",
"ipm.js",
"jr.css",
"jquery/leaflet.css",
"jquery/leaflet-src.js",
"jquery/jquery-3.4.1.min.js",
could be any file - except enc_file.php !!! (from practice)
Initial PHP file to open after upgrade
$w=array('files'=>$w,'ts'=>$t,'main'=>"pmo.php");
// put HERE the YOUR INITIAL PAGE
Url for page Upload (could be same as for jr_check_update()
)
$url = 'https://www.<server>.com/pmo.php?upp';
proxy settings:
function update_server($proxy='',$possible_proxy=1) {
$proxy
- set the proxy manually
$possible proxy
- see if ($possible_proxy && preg_match('/^10\\./',$ip)) $options['http']['proxy']='proxy.default.in.case.pc.is.in.net10.10:8080';
after setting You can "compile" initial app using: php enc_file.php build_file1
--> file $up_dir/dane.2.txt HAVE TO BE INCLUDED in Your EXE. file
after setting You can "compile" update using: php enc_file.php build_file
then **copy **to the server: php enc_file.php update_server
help: php enc_file.php help
erase local update copy: php enc_file.php delete_file
File to be set as initial page in EXEOutput
from Your js file main onLoad execute function
jr_check_update(url,file_wynik,show_noupdate_info=true)
i.e.
window.addEventListener("load", after_load);
function after_load() { delay(2000).then((x)=>{jr_check_update();}); }
file to be copied to the server
in case check_user()
returns true - any update for the user will be deleted
file to be copied to the server
you can use the following to manage Your app
reload - execute PHP main.php
check update - execute JavaScript jr_check_update()
or jr_check_update("<url>")
run without updates exe_start.php?noupdate=1
- after restart updates will be applied
delete updates exe_start.php?noupdate=2
- use this in case of something not working