Skip to content

Commit

Permalink
Final update v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AbyssMorgan committed Jun 4, 2024
1 parent 639f1c7 commit 215bce3
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 8 deletions.
4 changes: 2 additions & 2 deletions BuildLinux.ave-php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
$this->ave->title("$app_name Builder v$version");

$output = "$this->path/Setup";
$zip_name_a = $this->ave->get_file_path("$output/${app_name}_v$version"."_LINUX.tar");
$zip_name_a = $this->ave->get_file_path("$output/{$app_name}_v$version"."_LINUX.tar");
$this->ave->delete($zip_name_a);

$zip_name_b = $this->ave->get_file_path("$output/${app_name}_v$version"."_LINUX.tar.gz");
$zip_name_b = $this->ave->get_file_path("$output/{$app_name}_v$version"."_LINUX.tar.gz");
$this->ave->delete($zip_name_b);

$this->ave->echo(" Compress \"$zip_name_a\"");
Expand Down
7 changes: 5 additions & 2 deletions includes/AVE.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public function __construct(array $arguments){
if($this->get_version_number($this->config->get('APP_VERSION','0.0.0')) < 10900){
$this->config->unset(['AVE_EXTENSIONS_VIDEO_FOLLOW']);
}
if($this->get_version_number($this->config->get('APP_VERSION','0.0.0')) < 10904){
$this->config->unset(['AVE_DATA_FOLDER','AVE_LOG_FOLDER']);
if($this->get_version_number($this->config->get('APP_VERSION','0.0.0')) < 20200){
$this->config->unset(['AVE_DATA_FOLDER','AVE_LOG_FOLDER','AVE_BUFFER_FOLDER']);
}

foreach($config_default->get_all() as $key => $value){
Expand Down Expand Up @@ -134,6 +134,9 @@ public function __construct(array $arguments){
return;
}
$this->rrmdir($file, false);
if(strpos($file, "php") !== false){
$this->delete($this->get_file_path(pathinfo($file, PATHINFO_DIRNAME)."/".pathinfo($file, PATHINFO_BASENAME).".ini"), false);
}
}
}
if($changed){
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/ADM.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/AppBuffer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/BinaryFile.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/BitArray.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/BitFunctions.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
22 changes: 19 additions & 3 deletions includes/avecore/Core.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand All @@ -12,7 +14,7 @@

class Core {

public int $core_version = 9;
public int $core_version = 10;

public IniFile $config;

Expand All @@ -35,6 +37,7 @@ class Core {
public bool $toggle_log_event = true;
public bool $toggle_log_error = true;
public string $utilities_path;
public ?string $core_path;
public string $utilities_version = "1.1.0";
public string $current_title;
public array $drives = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
Expand All @@ -51,7 +54,8 @@ public function __construct(array $arguments, bool $require_utilities){
$this->logo = '';
$this->current_title = '';
$this->utilities_path = $this->get_file_path($this->get_variable("%PROGRAMFILES%")."/AVE-UTILITIES");

$this->core_path = null;

if($require_utilities){
if($this->windows){
$ave_utilities = false;
Expand All @@ -60,6 +64,7 @@ public function __construct(array $arguments, bool $require_utilities){
$ave_utilities_imagick = new IniFile($this->get_file_path("$this->utilities_path/imagick.ini"));
if($ave_utilities_main->get('APP_VERSION') == $this->utilities_version && $ave_utilities_imagick->get('APP_VERSION') == $this->utilities_version){
$ave_utilities = true;
$this->core_path = $this->get_file_path("$this->utilities_path/core/".$ave_utilities_main->get('APP_VERSION'));
}
}

Expand Down Expand Up @@ -237,6 +242,16 @@ public function time_unit_to_seconds(int $value, string $unit) : int {
return 0;
}

public function is_folder_empty(string $path) : bool {
if(!file_exists($path)) return true;
$files = scandir($path);
foreach($files as $file){
if($file == "." || $file == "..") continue;
return false;
}
return true;
}

public function get_files(string $path, array|null $extensions = null, array|null $except = null, array|null $filters = null) : array {
if(!file_exists($path)) return [];
$data = [];
Expand Down Expand Up @@ -650,7 +665,8 @@ public function is_text_file(string $path) : bool {
}

public function exec(string $program, string $command, array &$output = null, int &$result_code = null) : string|false {
if($this->windows) $program = $this->get_file_path("$this->utilities_path/main/$program.exe");
if(is_null($this->core_path)) return false;
if($this->windows) $program = $this->get_file_path("$this->core_path/$program.exe");
return exec("\"$program\" $command", $output, $result_code);
}

Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/FtpService.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/IniFile.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/JournalService.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/Logs.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/MySQL.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 2 additions & 0 deletions includes/avecore/Request.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/* AVE-PHP v2.2.0 */

declare(strict_types=1);

namespace AveCore;
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.2.0

0 comments on commit 215bce3

Please sign in to comment.