Import Amiga applications and desktop tools

This commit is contained in:
Alberto committed 2026-11-11 16:21:50 +01:00
commit 1c144c9a3c
347 files changed
+423483

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
Add-Type -AssemblyName System.Drawing
Add-Type -ReferencedAssemblies System.Drawing -TypeDefinition @'
using System;using System.IO;
public class CliIcon {
const int W=64,H=40;
static void R(byte[,]p,int x,int y,int w,int h,byte c){for(int j=y;j<y+h;j++)for(int i=x;i<x+w;i++)p[j,i]=c;}
static byte[,] P(bool sel){var p=new byte[H,W];R(p,3,3,59,35,2);R(p,1,1,60,35,3);R(p,2,2,58,33,0);R(p,3,3,56,6,3);R(p,4,10,54,23,2);R(p,5,4,2,2,2);R(p,8,4,2,2,2);R(p,11,4,2,2,2);R(p,7,14,2,2,1);R(p,9,16,2,2,1);R(p,7,18,2,2,1);R(p,13,19,7,1,3);R(p,7,24,27,1,3);R(p,7,27,18,1,3);R(p,38,24,12,1,0);R(p,38,27,8,1,0);if(sel){R(p,1,1,60,1,1);R(p,1,1,1,35,1);}return p;}
static void U16(BinaryWriter w,int n){w.Write((byte)(n>>8));w.Write((byte)n);}static void U32(BinaryWriter w,int n){w.Write((byte)(n>>24));w.Write((byte)(n>>16));w.Write((byte)(n>>8));w.Write((byte)n);}static void S(BinaryWriter w,string s){var b=System.Text.Encoding.ASCII.GetBytes(s+"\0");U32(w,b.Length);w.Write(b);}
static void Img(BinaryWriter w,byte[,]p){U16(w,0);U16(w,0);U16(w,W);U16(w,H);U16(w,2);w.Write(new byte[]{0,0,0,1,3,0,0,0,0,0});for(int q=0;q<2;q++)for(int y=0;y<H;y++)for(int x=0;x<W;x+=8){byte b=0;for(int i=0;i<8;i++)if((p[y,x+i]&(1<<q))!=0)b|=(byte)(128>>i);w.Write(b);}}
public static void Make(string template,string output){var h=new byte[78];Array.Copy(File.ReadAllBytes(template),h,78);h[12]=0;h[13]=W;h[14]=0;h[15]=H;h[16]=0;h[17]=6;h[48]=4;foreach(int p in new[]{22,26,50,54}){for(int k=0;k<4;k++)h[p+k]=0;h[p+3]=1;}foreach(int p in new[]{44,66,70})for(int k=0;k<4;k++)h[p+k]=0;using(var f=File.Create(output))using(var w=new BinaryWriter(f)){w.Write(h);Img(w,P(false));Img(w,P(true));S(w,"SYS:System/CLI");U32(w,16);S(w,"WINDOW=VNC:80/90/900/580/Amber CLI/SHELL/CLOSE");S(w,"STACK=16384");S(w,"FROM=S:Shell-Startup");}}}
'@
[CliIcon]::Make('C:\Amiga\HD0\System\Shell.info','C:\Amiga\HD0\Utilities\WBDock2\CLI.info')
[IO.File]::WriteAllText('C:\Amiga\HD0\Utilities\WBDock2\CLI','',[Text.Encoding]::ASCII)
$p='C:\Amiga\HD0\Utilities\WBDock2\Amber.config'
$s=[IO.File]::ReadAllText($p).Replace('SYS:System/Shell','SYS:Utilities/WBDock2/CLI')
[IO.File]::WriteAllText($p,$s,[Text.Encoding]::ASCII)