8 Commits

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
14 changed files with 489 additions and 414 deletions

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ 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`

0
RoboFile.php Executable file → Normal file
View File

0
build.sh Executable file → Normal file
View File

0
init.php Executable file → Normal file
View File

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();
}
}