Merge branch 'dev'
# Conflicts: # .gitlab-ci.yml
10
.idea/runConfigurations/Build_Redist.xml
generated
Normal file
|
@ -0,0 +1,10 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build Redist" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
|
||||
<makefile filename="$PROJECT_DIR$/Makefile" target="redist" workingDirectory="" arguments="">
|
||||
<envs />
|
||||
</makefile>
|
||||
<method v="2">
|
||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Clean" run_configuration_type="MAKEFILE_TARGET_RUN_CONFIGURATION" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
10
.idea/runConfigurations/Build_Tarball.xml
generated
Normal file
|
@ -0,0 +1,10 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Build Tarball" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
|
||||
<makefile filename="$PROJECT_DIR$/Makefile" target="tar" workingDirectory="" arguments="">
|
||||
<envs />
|
||||
</makefile>
|
||||
<method v="2">
|
||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Clean" run_configuration_type="MAKEFILE_TARGET_RUN_CONFIGURATION" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
8
.idea/runConfigurations/Clean.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Clean" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" activateToolWindowBeforeRun="false">
|
||||
<makefile filename="$PROJECT_DIR$/Makefile" target="clean" workingDirectory="" arguments="">
|
||||
<envs />
|
||||
</makefile>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
10
.idea/runConfigurations/Rebuild_Autoloaders.xml
generated
Normal file
|
@ -0,0 +1,10 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Rebuild Autoloaders" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile">
|
||||
<makefile filename="$PROJECT_DIR$/Makefile" target="autoload" workingDirectory="" arguments="">
|
||||
<envs />
|
||||
</makefile>
|
||||
<method v="2">
|
||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Clean" run_configuration_type="MAKEFILE_TARGET_RUN_CONFIGURATION" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Refactored `\ncc\Objects > PackageLock`
|
||||
- Updated `defuse\php-encryption` to version 2.4.0
|
||||
- Updated `\ncc\Classes > GitClient > cloneRepositor()` to clone submodules recursively by default
|
||||
- Updated `\ncc\Classes > GitClient > checkout()` to update submoudles.
|
||||
|
||||
### Fixed
|
||||
- Fixed issue in `\ncc\Managers > ExecutionPointerManager > executeUnit()` where if ttyMode is enabled in a non-tty
|
||||
|
|
158
Makefile
|
@ -1,75 +1,42 @@
|
|||
PHPCC:=$(shell which php)
|
||||
PHPAB:=$(shell which phpab)
|
||||
BUILD_PATH=build
|
||||
SRC_PATH=src
|
||||
# Variables
|
||||
PHPCC := $(shell which php)
|
||||
PHPAB := $(shell which phpab)
|
||||
BUILD_PATH := build
|
||||
SRC_PATH := src
|
||||
INSTALLER_PATH := $(SRC_PATH)/installer
|
||||
CONFIG_PATH := $(SRC_PATH)/config
|
||||
TIMESTAMP := $(shell date +%Y%m%d%H%M%S)
|
||||
|
||||
autoload:
|
||||
# Generates/creates all the autoloader files
|
||||
make $(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/nikic/php-parser/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php
|
||||
make $(SRC_PATH)/ncc/autoload_spl.php
|
||||
cp $(SRC_PATH)/autoload/autoload.php $(SRC_PATH)/ncc/autoload.php
|
||||
# List of paths for autoloading
|
||||
AUTOLOAD_PATHS := $(addprefix $(SRC_PATH)/ncc/ThirdParty/, \
|
||||
defuse/php-encryption \
|
||||
jelix/version \
|
||||
nikic/PhpParser \
|
||||
Symfony/polyfill-ctype \
|
||||
Symfony/polyfill-mbstring \
|
||||
Symfony/polyfill-uuid \
|
||||
Symfony/Process \
|
||||
Symfony/Uid \
|
||||
Symfony/Filesystem \
|
||||
Symfony/Yaml \
|
||||
theseer/Autoload \
|
||||
theseer/DirectoryScanner \
|
||||
)
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption
|
||||
# Check for necessary binaries
|
||||
ifndef PHPCC
|
||||
$(error "PHP binary not found. Please install PHP or check your PATH")
|
||||
endif
|
||||
ifndef PHPAB
|
||||
$(error "phpab (PHP Autoload Builder) binary not found. Please install phpab or check your PATH")
|
||||
endif
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/jelix/version
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/nikic/php-parser/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/nikic/PhpParser/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/nikic/PhpParser
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Process
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php:
|
||||
$(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Uid
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/theseer/Autoload
|
||||
|
||||
$(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php \
|
||||
$(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner
|
||||
# Build rules
|
||||
$(SRC_PATH)/%/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $@ $(SRC_PATH)/$*
|
||||
|
||||
$(SRC_PATH)/ncc/autoload_spl.php:
|
||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/autoload_spl.php \
|
||||
$(PHPCC) $(PHPAB) --output $@ \
|
||||
$(SRC_PATH)/ncc/Abstracts \
|
||||
$(SRC_PATH)/ncc/Classes \
|
||||
$(SRC_PATH)/ncc/CLI \
|
||||
|
@ -83,38 +50,49 @@ $(SRC_PATH)/ncc/autoload_spl.php:
|
|||
$(SRC_PATH)/ncc/ncc.php \
|
||||
$(SRC_PATH)/ncc/Runtime.php
|
||||
|
||||
# Phony targets
|
||||
.PHONY: autoload
|
||||
autoload: $(addsuffix /autoload_spl.php, $(AUTOLOAD_PATHS)) $(SRC_PATH)/ncc/autoload_spl.php
|
||||
cp -f $(SRC_PATH)/autoload/autoload.php $(SRC_PATH)/ncc/autoload.php
|
||||
|
||||
.PHONY: redist
|
||||
redist: autoload
|
||||
rm -rf $(BUILD_PATH)/src
|
||||
mkdir -p $(BUILD_PATH)/src
|
||||
cp -rf $(SRC_PATH)/ncc/* $(BUILD_PATH)/src
|
||||
cp $(SRC_PATH)/installer/installer $(BUILD_PATH)/src/INSTALL
|
||||
cp $(SRC_PATH)/installer/ncc.sh $(BUILD_PATH)/src/ncc.sh
|
||||
cp $(SRC_PATH)/config/ncc.yaml $(BUILD_PATH)/src/default_config.yaml;
|
||||
cp $(SRC_PATH)/config/ncc.yaml $(BUILD_PATH)/src/CLI/template_config.yaml;
|
||||
cp $(SRC_PATH)/installer/extension $(BUILD_PATH)/src/extension
|
||||
cp -f $(INSTALLER_PATH)/installer $(BUILD_PATH)/src/INSTALL
|
||||
cp -f $(INSTALLER_PATH)/ncc.sh $(BUILD_PATH)/src/ncc.sh
|
||||
cp -f $(CONFIG_PATH)/ncc.yaml $(BUILD_PATH)/src/default_config.yaml
|
||||
cp -f $(CONFIG_PATH)/ncc.yaml $(BUILD_PATH)/src/CLI/template_config.yaml
|
||||
cp -f $(INSTALLER_PATH)/extension $(BUILD_PATH)/src/extension
|
||||
chmod +x $(BUILD_PATH)/src/INSTALL
|
||||
cp LICENSE $(BUILD_PATH)/src/LICENSE
|
||||
cp README.md $(BUILD_PATH)/src/README.md
|
||||
cp $(SRC_PATH)/installer/hash_check.php $(BUILD_PATH)/src/hash_check.php; $(PHPCC) $(BUILD_PATH)/src/hash_check.php; rm $(BUILD_PATH)/src/hash_check.php
|
||||
cp $(SRC_PATH)/installer/generate_build_files.php $(BUILD_PATH)/src/generate_build_files.php; $(PHPCC) $(BUILD_PATH)/src/generate_build_files.php; rm $(BUILD_PATH)/src/generate_build_files.php
|
||||
cp -f LICENSE $(BUILD_PATH)/src/LICENSE
|
||||
cp -f README.md $(BUILD_PATH)/src/README.md
|
||||
cp -f $(INSTALLER_PATH)/hash_check.php $(BUILD_PATH)/src/hash_check.php
|
||||
$(PHPCC) $(BUILD_PATH)/src/hash_check.php
|
||||
rm $(BUILD_PATH)/src/hash_check.php
|
||||
cp -f $(INSTALLER_PATH)/generate_build_files.php $(BUILD_PATH)/src/generate_build_files.php
|
||||
$(PHPCC) $(BUILD_PATH)/src/generate_build_files.php
|
||||
rm $(BUILD_PATH)/src/generate_build_files.php
|
||||
mkdir -p $(BUILD_PATH)/src/repositories
|
||||
cp -rf $(SRC_PATH)/default_repositories/*.json $(BUILD_PATH)/src/repositories
|
||||
|
||||
tar: redist
|
||||
cd $(BUILD_PATH)/src; tar -czvf ../build.tar.gz *
|
||||
$(BUILD_PATH)/build_$(TIMESTAMP).tar.gz: redist
|
||||
cd $(BUILD_PATH)/src; tar -czvf ../build_$(TIMESTAMP).tar.gz *
|
||||
|
||||
.PHONY: tar
|
||||
tar: $(BUILD_PATH)/build_$(TIMESTAMP).tar.gz
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(BUILD_PATH)
|
||||
rm -f $(SRC_PATH)/ncc/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/nikic/PhpParser/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php
|
||||
rm -f $(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php
|
||||
rm -f $(addsuffix /autoload_spl.php, $(AUTOLOAD_PATHS))
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Available commands:"
|
||||
@echo " make autoload - Generate autoload files"
|
||||
@echo " make redist - Prepare the project for redistribution"
|
||||
@echo " make tar - Package the project into a tarball with timestamp"
|
||||
@echo " make clean - Clean the build artifacts"
|
|
@ -1,4 +1,4 @@
|
|||
#  NCC
|
||||
#  NCC
|
||||
|
||||
Nosial Code Compiler is a program written in PHP designed to be a multi-purpose compiler, package manager and toolkit.
|
||||
This program is a complete re-write of the now defunct [PHP Package Manager (PPM)](https://git.n64.cc/intellivoid/ppm)
|
||||
|
@ -24,6 +24,7 @@ community powered mirrors. (more to come)
|
|||
|
||||
- [git.it-kuny.ch](https://git.it-kuny.ch)
|
||||
- [git.martinvlba.eu](https://git.martinvlba.eu/Nosial/ncc)
|
||||
- [github.com](https://github.com/Nosial/ncc)
|
||||
|
||||
|
||||
# Contributing
|
||||
|
|
Before Width: | Height: | Size: 3.5 KiB |
|
@ -1 +1,4 @@
|
|||
<?xml version="1.0" ?><svg fill="none" height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M6 14C6 4 14 4 14 4V24H6C6 24 6 24 6 14Z" fill="#2F88FF" stroke="black" stroke-linejoin="round" stroke-width="4"/><rect fill="#2F88FF" height="6" stroke="black" stroke-linejoin="round" stroke-width="4" width="28" x="14" y="10"/><path d="M6 30H42C42 30 42 38 36 38C30 38 29 38 29 38L31 44H13L15 38H6V30Z" fill="#2F88FF" stroke="black" stroke-linejoin="round" stroke-width="4"/></svg>
|
||||
<svg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M80 0C76.001 0 72.002 1.51978 68.7229 4.71944L4.73883 68.7113C-1.57961 74.9506 -1.57961 85.0293 4.73883 91.2685L68.7229 155.261C74.9613 161.58 85.0388 161.58 91.2772 155.261L155.261 91.2685C161.58 85.0293 161.58 74.9506 155.261 68.7113L91.2772 4.71944C87.998 1.51978 83.999 0 80 0Z" fill="#111111"/>
|
||||
<path d="M55.2178 55C53.9929 55 53 55.949 53 57.1197V80.9658C53 82.1365 53.9929 83.0855 55.2178 83.0855H72.1287V108.622L81 117L89.8713 108.622V83.0855H106.782C108.007 83.0855 109 82.1365 109 80.9658V57.1197C109 55.949 108.007 55 106.782 55H55.2178Z" fill="#EEEEEE"/>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 683 B |
BIN
assets/icon/ncc@1024px.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
assets/icon/ncc@128px.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/icon/ncc@16px.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
assets/icon/ncc@256px.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
assets/icon/ncc@32px.png
Normal file
After Width: | Height: | Size: 504 B |
BIN
assets/icon/ncc@512px.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
assets/icon/ncc@64px.png
Normal file
After Width: | Height: | Size: 820 B |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 522 B |
Before Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 910 B |
|
@ -84,9 +84,33 @@ namespace ncc\Classes;
|
|||
});
|
||||
|
||||
if (!$process->isSuccessful())
|
||||
{
|
||||
throw new GitCheckoutException($process->getErrorOutput());
|
||||
}
|
||||
|
||||
Console::outVerbose('Checked out branch: ' . $branch);
|
||||
|
||||
Console::outVerbose('Updating submodules');
|
||||
$process = new Process(["git", "submodule", "update", "--init", "--recursive"], $path);
|
||||
$process->setTimeout(3600); // 1 hour
|
||||
$process->run(function ($type, $buffer)
|
||||
{
|
||||
if (Process::ERR === $type)
|
||||
{
|
||||
Console::outWarning($buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console::outVerbose($buffer);
|
||||
}
|
||||
});
|
||||
|
||||
if (!$process->isSuccessful())
|
||||
{
|
||||
throw new GitCheckoutException($process->getErrorOutput());
|
||||
}
|
||||
|
||||
Console::outVerbose('Submodules updated');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|