Skip to content

Commit 96affd0

Browse files
committed
v3.3.8
1 parent a78231f commit 96affd0

10 files changed

Lines changed: 194 additions & 39 deletions

-installer/Installer.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ public static function ConstructDataBase($force = true)
3434
if (!isset(self::$Configurations["DataBase"]))
3535
self::$Configurations["DataBase"] = [];
3636

37+
self::$DataBaseSchemaFile = self::$Configurations["DataBase"]["SchemaFile"]??self::$DataBaseSchemaFile;
38+
$sqlFile = __DIR__ . DIRECTORY_SEPARATOR . self::$DataBaseSchemaFile; // Your base schema
39+
if (!file_exists($sqlFile)) {
40+
echo "⚠️ There is no database schema to install!\n";
41+
return null;
42+
}
43+
3744
$host = ($force ? self::$Configurations["DataBase"]["Host"]??null : null) ?? (readline("Host [" . (self::$Configurations["DataBase"]["Host"] ?? "localhost") . "]: ") ?: 'localhost');
3845
$name = ($force ? self::$Configurations["DataBase"]["Name"]??null : null) ?? (readline("Database name [" . (self::$Configurations["DataBase"]["Name"] ?? "localhost") . "]: ") ?: 'localhost');
3946
if (empty($name)) {
@@ -50,12 +57,6 @@ public static function ConstructDataBase($force = true)
5057
self::$Configurations["DataBase"]["Password"] = $password;
5158
self::$Configurations["DataBase"]["Prefix"] = $prefix;
5259

53-
self::$DataBaseSchemaFile = self::$Configurations["DataBase"]["SchemaFile"]??self::$DataBaseSchemaFile;
54-
$sqlFile = __DIR__ . DIRECTORY_SEPARATOR . self::$DataBaseSchemaFile; // Your base schema
55-
if (!file_exists($sqlFile)) {
56-
echo "⚠️ There is no database schema to install!\n";
57-
return null;
58-
}
5960

6061
// try {
6162
// $pdo = new \PDO("mysql:host=$host;charset=utf8mb4", $username, $password);
@@ -108,7 +109,7 @@ public static function ConstructSource($force = true)
108109
if (!is_dir($targetPath)) {
109110
mkdir($targetPath, $dirPermission, true);
110111
}
111-
} elseif (!preg_match($sourceExcludePattern, $targetPath)) {
112+
} elseif (!preg_match($sourceExcludePattern, $targetPath) && $item !== $targetPath) {
112113
$shouldCopy = $force || !file_exists($targetPath) || filemtime($item) > filemtime($targetPath);
113114
if ($shouldCopy) {
114115
// Create folder if it doesn't exist

-installer/install database.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
require_once __DIR__ . DIRECTORY_SEPARATOR . "Installer.php";
3+
MiMFa\Installer::ConstructDataBase(false);

-installer/install source.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
require_once __DIR__ . DIRECTORY_SEPARATOR . "Installer.php";
3+
MiMFa\Installer::ConstructSource(true);

-installer/install.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
require_once __DIR__ . DIRECTORY_SEPARATOR . "Installer.php";
3+
MiMFa\Installer::Install();

-installer/update database.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
require_once __DIR__ . DIRECTORY_SEPARATOR . "Installer.php";
3+
MiMFa\Installer::ConstructDataBase(true);

-installer/update source.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
require_once __DIR__ . DIRECTORY_SEPARATOR . "Installer.php";
3+
MiMFa\Installer::ConstructSource(false);

-installer/update.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
require_once __DIR__ . DIRECTORY_SEPARATOR . "Installer.php";
3+
MiMFa\Installer::Update();

README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,9 @@ To create a new subdomain, with all accessibility and equipment, for an aseqbase
44
* <a href="http://github.com//aseqbase/aseqbase">aseqbase/aseqbase</a>
55
## Installations
66
1. Install all dependencies
7-
### To make the Main Domain of aseqbase website
8-
2. Open a terminal in the home directory (public_html) of the website, then install the project by:
7+
2. Open a terminal in the home directory (public_html) of the website, then install the project by:
98

10-
> composer create-project aseqbase/sequence
11-
or
12-
13-
> composer require aseqbase/sequence
14-
### To make the Sub Domain of aseqbase website
15-
2. Open a terminal in your subdomain directory (public_html/[my-subdomain-name]/), then install the framework by:
16-
17-
> composer create-project aseqbase/sequence
18-
or
19-
20-
> composer require aseqbase/sequence
9+
> composer create-project aseqbase/sequence my-subdomain-name
2110
3. Create an opitonal file name `global.php` on the root directory with the bellow codes:
2211
```
2312
<?php

composer.json

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,16 @@
2121
],
2222
"minimum-stability": "dev",
2323
"prefer-stable": true,
24+
"require": {
25+
"composer/installers": "^1.12"
26+
},
2427
"scripts": {
2528
"start": [
2629
"Composer\\Config::disableProcessTimeout",
2730
"php -S localhost:8000",
2831
"net start MySQL",
2932
"php index.php"
3033
],
31-
"install": [
32-
"php -installer/Installer.php",
33-
"MiMFa\\Installer::Install"
34-
],
35-
"update": [
36-
"php -installer/Installer.php",
37-
"MiMFa\\Installer::Update"
38-
],
3934
"post-install-cmd": [
4035
"MiMFa\\Installer::Install"
4136
],
@@ -52,15 +47,15 @@
5247
"extra": {
5348
"installer-paths": {
5449
"./": ["type:framework", "type:patch"],
55-
"./{$name}/": ["type:project", "type:directory"],
56-
"./model/library/": ["type:library"],
57-
"./model/component/": ["type:component"],
58-
"./model/module/": ["type:module"],
59-
"./model/template/": ["type:template"],
60-
"./view/": ["type:view"],
61-
"./route/": ["type:route"],
62-
"./compute/": ["type:compute"],
63-
"./asset/": ["type:asset"]
50+
"{$name}/": ["type:project", "type:directory"],
51+
"model/library/": ["type:library"],
52+
"model/component/": ["type:component"],
53+
"model/module/": ["type:module"],
54+
"model/template/": ["type:template"],
55+
"view/": ["type:view"],
56+
"route/": ["type:route"],
57+
"compute/": ["type:compute"],
58+
"asset/": ["type:asset"]
6459
}
6560
}
6661
}

composer.lock

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

0 commit comments

Comments
 (0)