Add wii build

This commit is contained in:
2025-10-01 01:42:01 -05:00
parent 537c0dd4e3
commit ce9fe40978
7 changed files with 145 additions and 8 deletions

View File

@@ -51,6 +51,16 @@ jobs:
name: Publish CrossLang Artifact
artifacts: crosslang-x86_64.tar.gz
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: Wii Build
runInContainer: true
image: onedev.site.tesses.net/dependencies/wiidev:latest
interpreter: !DefaultInterpreter
commands: |
cd Packaging
bash wiibuild.sh
useTTY: true
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: Build and Publish Deb Package
runInContainer: true
@@ -78,12 +88,7 @@ jobs:
runInContainer: true
image: onedev.site.tesses.net/dependencies/debbuilder/plucky:latest
interpreter: !DefaultInterpreter
commands: |
apt update -y
apt install -y pkg-config
cd Packaging/Linux
bash build-ubuntu-plucky.sh
bash push-ubuntu-plucky.sh
commands: "apt update -y\napt install -y pkg-config \ncd Packaging/Linux\nbash build-ubuntu-plucky.sh\nbash push-ubuntu-plucky.sh\n"
envVars:
- name: GITEA_AUTH
value: '@secret:GITEA_AUTH@'

View File

@@ -24,3 +24,4 @@ FetchContent_MakeAvailable(TessesCrossLang)
add_executable(boot main.cpp)
target_link_libraries(boot PUBLIC crosslang_static)
ogc_create_dol(boot)

View File

@@ -88,7 +88,8 @@ func BuildConsoleOrServerLinuxStatic(dir,cmake_toolchain)
homepage = "https://crosslang.tesseslanguage.com/",
executable_name = "crossapp",
executable_can_be_renamed = true,
executable_runtime = $"linux-{dir}-static"
executable_runtime = $"linux-{dir}-static",
description = $"Runtime files for linux-{dir}-static",
};
var name = $"Tesses.CrossLang.Runtime.linux-{dir}-static";
@@ -170,6 +171,7 @@ func BuildConsoleOrServerLinuxShared(dir,$cmake_toolchain)
maintainer = "Mike Nolan",
repo = "https://onedev.site.tesses.net/crosslang",
homepage = "https://crosslang.tesseslanguage.com/",
description = $"Runtime files for linux-{dir}",
executable_name = "crossapp",
executable_can_be_renamed = true,
executable_runtime = $"linux-{dir}"
@@ -203,4 +205,22 @@ func main(args)
BuildConsoleOrServerLinuxStaticBasedOnTarget(static.target,static.cpu);
}
var info = {
type = "archive",
maintainer = "Mike Nolan",
repo = "https://onedev.site.tesses.net/crosslang",
homepage = "https://crosslang.tesseslanguage.com/",
executable_name = "boot.dol",
executable_can_be_renamed = false,
executable_runtime = "wii",
description = $"Runtime files for wii",
};
var name = $"Tesses.CrossLang.Runtime.wii";
var subDir = new SubdirFilesystem(FS.Local,"publish"/"wii");
var pkgStrm = FS.Local.OpenFile("publish"/$"{name}-{VERSION}.crvm","wb");
FS.CreateArchive(subDir,pkgStrm, name ,VERSION, Json.Encode(info));
pkgStrm.Close();
}

View File

@@ -0,0 +1,8 @@
#!/bin/bash
mkdir -p publish/wii
cd Wii
mkdir build
cd build
cmake -S .. -B . -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Wii.cmake
make -j`nproc`
mv boot.dol ../../publish/wii/boot.dol

View File

@@ -2023,6 +2023,8 @@ class GC {
Tesses::Framework::Filesystem::VFSPath SystemToVFSPath(std::string path);
void GetDate(Tesses::Framework::Filesystem::VFSPath path, Tesses::Framework::Date::DateTime& lastWrite, Tesses::Framework::Date::DateTime& lastAccess);
void SetDate(Tesses::Framework::Filesystem::VFSPath path, Tesses::Framework::Date::DateTime lastWrite, Tesses::Framework::Date::DateTime lastAccess);
void Chmod(Tesses::Framework::Filesystem::VFSPath path, uint32_t mode);
bool StatVFS(Tesses::Framework::Filesystem::VFSPath path, Tesses::Framework::Filesystem::StatVFSData& data);
void Close();
~TObjectVFS();
};

View File

@@ -501,6 +501,67 @@ namespace Tesses::CrossLang {
}
}
void TObjectVFS::Chmod(Tesses::Framework::Filesystem::VFSPath path, uint32_t mode)
{
TDictionary* dict;
if(GetObjectHeap(this->obj, dict))
{
GCList ls(this->ls->GetGC());
dict->CallMethod(ls, "Chmod",{path,(int64_t)mode});
}
}
bool TObjectVFS::StatVFS(Tesses::Framework::Filesystem::VFSPath path, Tesses::Framework::Filesystem::StatVFSData& data)
{
TDictionary* dict;
if(GetObjectHeap(this->obj, dict))
{
GCList ls(this->ls->GetGC());
auto res = dict->CallMethod(ls, "StatVFS",{path});
int64_t _num;
TDictionary* _dict;
TObject _o;
if(GetObjectHeap(res,_dict))
{
this->ls->GetGC()->BarrierBegin();
_o = dict->GetValue("BlockSize");
if(GetObject(_o,_num)) data.BlockSize = (uint64_t)_num;
_o = dict->GetValue("FragmentSize");
if(GetObject(_o,_num)) data.FragmentSize = (uint64_t)_num;
_o = dict->GetValue("Blocks");
if(GetObject(_o,_num)) data.Blocks = (uint64_t)_num;
_o = dict->GetValue("BlocksFree");
if(GetObject(_o,_num)) data.BlocksFree = (uint64_t)_num;
_o = dict->GetValue("BlocksAvailable");
if(GetObject(_o,_num)) data.BlocksAvailable = (uint64_t)_num;
_o = dict->GetValue("TotalInodes");
if(GetObject(_o,_num)) data.TotalInodes = (uint64_t)_num;
_o = dict->GetValue("FreeInodes");
if(GetObject(_o,_num)) data.FreeInodes = (uint64_t)_num;
_o = dict->GetValue("AvailableInodes");
if(GetObject(_o,_num)) data.AvailableInodes = (uint64_t)_num;
_o = dict->GetValue("Id");
if(GetObject(_o,_num)) data.Id = (uint64_t)_num;
_o = dict->GetValue("Flags");
if(GetObject(_o,_num)) data.Flags = (uint64_t)_num;
_o = dict->GetValue("MaxNameLength");
if(GetObject(_o,_num)) data.MaxNameLength = (uint64_t)_num;
this->ls->GetGC()->BarrierEnd();
return true;
}
}
return false;
}
void TObjectVFS::Close()
{
TDictionary* dict;

View File

@@ -3900,7 +3900,47 @@ namespace Tesses::CrossLang {
cse.back()->Push(gc, nullptr);
return false;
}
if(key == "Chmod")
{
Tesses::Framework::Filesystem::VFSPath path;
int64_t mode;
if(GetArgumentAsPath(args,0,path) && GetArgument(args,0,mode))
{
vfs->Chmod(path,(uint32_t)mode);
}
cse.back()->Push(gc, nullptr);
return false;
}
if(key == "StatVFS")
{
Tesses::Framework::Filesystem::VFSPath path;
if(GetArgumentAsPath(args,0,path))
{
Tesses::Framework::Filesystem::StatVFSData data;
if(vfs->StatVFS(path,data))
{
cse.back()->Push(gc, TDictionary::Create(ls,{
TDItem("BlockSize", (int64_t)data.BlockSize),
TDItem("FragmentSize",(int64_t)data.FragmentSize),
TDItem("Blocks",(int64_t)data.Blocks),
TDItem("BlocksFree",(int64_t)data.BlocksFree),
TDItem("BlocksAvailable", (int64_t)data.BlocksAvailable),
TDItem("TotalInodes", (int64_t)data.TotalInodes),
TDItem("FreeInodes",(int64_t)data.FreeInodes),
TDItem("AvailableInodes",(int64_t)data.AvailableInodes),
TDItem("Id",(int64_t)data.Id),
TDItem("Flags",(int64_t)data.Flags),
TDItem("MaxNameLength",(int64_t)data.MaxNameLength)
}));
return false;
}
}
cse.back()->Push(gc, nullptr);
return false;
}
cse.back()->Push(gc, nullptr);
return false;
}