Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bda5bd7f10 | ||
|
|
81906ef8b9 | ||
|
|
ee8cd323f5 | ||
|
|
e788fa9720 | ||
|
|
232b31a5a1 | ||
|
|
41f8a96478 | ||
|
|
4ff01ee9eb | ||
|
|
e09664a715 | ||
| bd20f73100 | |||
| a3d7d5a3bf | |||
| 339a256bdf | |||
| e8d77693c0 | |||
| f2991e1d10 | |||
| 8c430753fa | |||
| f603433607 | |||
| 9d3c84b45d |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@ build/
|
|||||||
vendor/
|
vendor/
|
||||||
vendor-bin/
|
vendor-bin/
|
||||||
composer.lock
|
composer.lock
|
||||||
|
vendor/*
|
||||||
|
.vs/
|
||||||
|
obj/
|
||||||
|
|||||||
10
README.md
Normal file
10
README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
## console-app
|
||||||
|
|
||||||
|
Template for creating .NET core console applications in PHP.
|
||||||
|
|
||||||
|
### How to run
|
||||||
|
1. Install peachpie templates
|
||||||
|
2. `dotnet new console -lang PHP`
|
||||||
|
3. `dotnet restore`
|
||||||
|
4. Modify `program.php` (optional)
|
||||||
|
5. `dotnet run`
|
||||||
11
RoboFile.php
Executable file → Normal file
11
RoboFile.php
Executable file → Normal file
@@ -2,12 +2,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once(__DIR__."/vendor/autoload.php"); // Pull in Composer Autoload
|
require_once(__DIR__."/vendor/autoload.php"); // Pull in Composer Autoload
|
||||||
require_once(__DIR__."/lib/libAndroidDevices.php");
|
|
||||||
|
define("APPNAME", "tononixOS Kernel Update Client"); // Define the application name so our universal application stub can find it.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Application Name: tononixOS Kernel Update Client
|
* Application Name: tononixOS Kernel Update Client
|
||||||
* Application Desc: Allows tononixOS devices to update their kernel via source with no user intervention, similar to Gentoo's Genkernel
|
* Application Desc: Allows tononixOS devices to update their kernel via source with no user intervention, similar to Gentoo's Genkernel
|
||||||
* Application Ver: 1.0
|
* Application Ver: v1.0.2
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: Device detection
|
||||||
|
* TODO: Use of device-configs for cloning kernel repositories
|
||||||
|
* TODO: Build own tononixOS self-update mechanism
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class RoboFile extends \Robo\Tasks
|
class RoboFile extends \Robo\Tasks
|
||||||
|
|||||||
10
build.sh
Normal file
10
build.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
composer install
|
||||||
|
if [[ $1 != "" ]]; then
|
||||||
|
bumpver update $1
|
||||||
|
else
|
||||||
|
bumpver update --patch
|
||||||
|
fi
|
||||||
|
vendor/bin/box compile
|
||||||
|
cp VERSION build/VERSION
|
||||||
15
bumpver.toml
Normal file
15
bumpver.toml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[bumpver]
|
||||||
|
current_version = "v1.0.2"
|
||||||
|
version_pattern = "vMAJOR.MINOR[.PATCH][-TAG]"
|
||||||
|
commit_message = "bump version {old_version} -> {new_version}"
|
||||||
|
commit = true
|
||||||
|
tag = true
|
||||||
|
push = false
|
||||||
|
|
||||||
|
[bumpver.file_patterns]
|
||||||
|
"VERSION" = [
|
||||||
|
'{version}'
|
||||||
|
]
|
||||||
|
"RoboFile.php" = [
|
||||||
|
' * Application Ver: {version}'
|
||||||
|
]
|
||||||
@@ -3,14 +3,22 @@
|
|||||||
"description": "Updates kernel images on tononixOS devices.",
|
"description": "Updates kernel images on tononixOS devices.",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
|
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Tonoxis",
|
"name": "Tonoxis",
|
||||||
"email": "toxus@tonoxisisle.services"
|
"email": "toxus@tonoxisisle.services"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://tonoxisisle.services/git/tononixOS/tononixOS_library_android-devices"
|
||||||
|
}
|
||||||
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"consolidation/robo": "^3.0"
|
"consolidation/robo": "^3.0",
|
||||||
|
"tononixos/tononixos_library_android-devices": "master"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"bamarni/composer-bin-plugin": "^1.4"
|
"bamarni/composer-bin-plugin": "^1.4"
|
||||||
|
|||||||
4
init.php
Executable file → Normal file
4
init.php
Executable file → Normal file
@@ -18,7 +18,7 @@ $classLoader = require $autoloaderPath;
|
|||||||
|
|
||||||
|
|
||||||
// Customization variables
|
// Customization variables
|
||||||
$appName = "tononixOS Kernel Update Client";
|
$appName = APPNAME;
|
||||||
$appVersion = trim(file_get_contents(__DIR__ . '/VERSION'));
|
$appVersion = trim(file_get_contents(__DIR__ . '/VERSION'));
|
||||||
$commandClasses = [ \RoboFile::class ];
|
$commandClasses = [ \RoboFile::class ];
|
||||||
$selfUpdateRepository = 'tononixos/tononix_application_krnlupdate';
|
$selfUpdateRepository = 'tononixos/tononix_application_krnlupdate';
|
||||||
@@ -27,7 +27,7 @@ $configurationFilename = 'config.yml';
|
|||||||
// Define our Runner, and pass it the command classes we provide.
|
// Define our Runner, and pass it the command classes we provide.
|
||||||
$runner = new \Robo\Runner($commandClasses);
|
$runner = new \Robo\Runner($commandClasses);
|
||||||
$runner
|
$runner
|
||||||
->setSelfUpdateRepository($selfUpdateRepository)
|
// ->setSelfUpdateRepository($selfUpdateRepository) // This is now disabled as tononixOS uses the Tonoxis Isle Git service for it's code storage.
|
||||||
->setConfigurationFilename($configurationFilename)
|
->setConfigurationFilename($configurationFilename)
|
||||||
->setClassLoader($classLoader);
|
->setClassLoader($classLoader);
|
||||||
|
|
||||||
|
|||||||
16
krnlupdate.msbuildproj
Normal file
16
krnlupdate.msbuildproj
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Peachpie.NET.Sdk/1.0.6">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net5.0</TargetFramework>
|
||||||
|
<StartupObject>init.php</StartupObject>
|
||||||
|
<Description>A build system that provides build and update services to tononixOS.</Description>
|
||||||
|
<PackageId>tononixOS_krnlupdate</PackageId>
|
||||||
|
<Authors>Rick Blair <ShadowEO@outlook.com></Authors>
|
||||||
|
<Company>Tonoxis Isle Services</Company>
|
||||||
|
<Product>tononixOS Kernel Build/Update System</Product>
|
||||||
|
<Copyright>Tonoxis Isle Services (c) 2018-*</Copyright>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="**/*.php" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
47
tos-packaging/package.class.php
Normal file
47
tos-packaging/package.class.php
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Packaging\Tasks;
|
||||||
|
|
||||||
|
class Package extends \Robo\Tasks
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Installs the package
|
||||||
|
*
|
||||||
|
* @option prefix Location to install package to
|
||||||
|
*/
|
||||||
|
function packageInstall($opts = ['prefix' => "/usr"])
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!file_exists(getcwd()."/build/krnlupdate.phar"))
|
||||||
|
{
|
||||||
|
$this->packageBuild();
|
||||||
|
}
|
||||||
|
$this->_copy(getcwd()."/build/krnlupdate.phar", $opts['prefix']."/usr/sbin/krnlupdate.phar");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Removes the package
|
||||||
|
*
|
||||||
|
* @option prefix Location to remove package from
|
||||||
|
*/
|
||||||
|
function packageRemove($opts = ['prefix' => "/usr"])
|
||||||
|
{
|
||||||
|
$this->_remove($opts['prefix']."/usr/sbin/krnlupdate.phar");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the package
|
||||||
|
*/
|
||||||
|
function packageBuild()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$this->taskComposerInstall()
|
||||||
|
->dir(getcwd())
|
||||||
|
->args("--quiet")
|
||||||
|
->run();
|
||||||
|
$this->taskExec("box compile")
|
||||||
|
->printOutput(false)
|
||||||
|
->run();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
7
vendor/autoload.php
vendored
7
vendor/autoload.php
vendored
@@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// autoload.php @generated by Composer
|
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
|
||||||
|
|
||||||
return ComposerAutoloaderIniteef511e4731ef08dd3acba7ed3674cbc::getLoader();
|
|
||||||
Reference in New Issue
Block a user