16 Commits
v1.0 ... master

Author SHA1 Message Date
Rick Blair
bda5bd7f10 Initial commit of PeachPie template into Project. 2021-11-12 00:13:45 -05:00
Tonoxis
81906ef8b9 Attempting to shut up composer during tos builds. 2021-09-09 23:27:00 -04:00
Tonoxis
ee8cd323f5 Changed how $prefix works 2021-09-09 23:13:53 -04:00
Tonoxis
e788fa9720 Attempt #3 2021-09-09 22:48:28 -04:00
Tonoxis
232b31a5a1 Attempt #2 2021-09-09 22:47:49 -04:00
Tonoxis
41f8a96478 Attempting to fix installation methods. 2021-09-09 22:45:43 -04:00
Tonoxis
4ff01ee9eb Forgot to make build script do a composer install before running compile. 2021-09-09 22:35:35 -04:00
Tonoxis
e09664a715 Added tononixOS package handling class. 2021-09-09 21:38:40 -04:00
bd20f73100 Transferred ownership of library dependency to tononixOS org, updating composer.json 2021-08-10 19:14:37 -04:00
a3d7d5a3bf bump version v1.0.1 -> v1.0.2 2021-08-10 19:12:33 -04:00
339a256bdf Fixed uncommitted error 2021-08-10 19:12:20 -04:00
e8d77693c0 Split off Android devices library to separate package. 2021-08-10 19:11:32 -04:00
f2991e1d10 Made BumpVer replace the forgotten version number inside the main RoboFile.php file. 2021-08-10 18:17:03 -04:00
8c430753fa bump version v1.0 -> v1.0.1 2021-08-10 18:06:46 -04:00
f603433607 Fixed an issue with the build script. 2021-08-10 18:06:25 -04:00
9d3c84b45d Added build script, BumpVer configuration, and disabled the Robo framework's built-in self-update system since we do not use Github. 2021-08-10 18:04:31 -04:00
15 changed files with 489 additions and 380 deletions

3
.gitignore vendored
View File

@@ -2,3 +2,6 @@ build/
vendor/
vendor-bin/
composer.lock
vendor/*
.vs/
obj/

10
README.md Normal file
View 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
View File

@@ -2,12 +2,19 @@
<?php
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 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

View File

@@ -1 +1 @@
{$GITTAG}
v1.0.2

10
build.sh Normal file
View 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
View 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}'
]

View File

@@ -3,14 +3,22 @@
"description": "Updates kernel images on tononixOS devices.",
"type": "project",
"minimum-stability": "dev",
"authors": [
{
"name": "Tonoxis",
"email": "toxus@tonoxisisle.services"
}
],
"repositories": [
{
"type": "vcs",
"url": "https://tonoxisisle.services/git/tononixOS/tononixOS_library_android-devices"
}
],
"require": {
"consolidation/robo": "^3.0"
"consolidation/robo": "^3.0",
"tononixos/tononixos_library_android-devices": "master"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4"

4
init.php Executable file → Normal file
View File

@@ -18,7 +18,7 @@ $classLoader = require $autoloaderPath;
// Customization variables
$appName = "tononixOS Kernel Update Client";
$appName = APPNAME;
$appVersion = trim(file_get_contents(__DIR__ . '/VERSION'));
$commandClasses = [ \RoboFile::class ];
$selfUpdateRepository = 'tononixos/tononix_application_krnlupdate';
@@ -27,7 +27,7 @@ $configurationFilename = 'config.yml';
// Define our Runner, and pass it the command classes we provide.
$runner = new \Robo\Runner($commandClasses);
$runner
->setSelfUpdateRepository($selfUpdateRepository)
// ->setSelfUpdateRepository($selfUpdateRepository) // This is now disabled as tononixOS uses the Tonoxis Isle Git service for it's code storage.
->setConfigurationFilename($configurationFilename)
->setClassLoader($classLoader);

16
krnlupdate.msbuildproj Normal file
View 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 &lt;ShadowEO@outlook.com&gt;</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>

View 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
View File

@@ -1,7 +0,0 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderIniteef511e4731ef08dd3acba7ed3674cbc::getLoader();