Import Amiga applications and desktop tools
This commit is contained in:
commit
1c144c9a3c
347 files changed
+423483
No files matched your search
@@ -0,0 +1,2 @@
|
||||
build/
|
||||
*.o
|
||||
@@ -0,0 +1,7 @@
|
||||
Wait 6 SECS
|
||||
C:RestoreMouse >NIL:
|
||||
C:SetClock LOAD
|
||||
Stack 65536
|
||||
Execute S:Session-Apps
|
||||
Stack 65536
|
||||
Run >NIL: SYS:Utilities/WBDock2/WBDock CONFIG=SYS:Utilities/WBDock2/Amber.config POS=BL STYLE=T FONT=topaz/8 DISTANCE=20 NODRAGBAR STICKY ICONDIST=12 PATTERN=#24211B QUIET
|
||||
@@ -0,0 +1,11 @@
|
||||
# Desktop Session
|
||||
|
||||
Helper AmigaOS 3 per salvare e ripristinare le finestre delle app native realizzate in questa raccolta.
|
||||
|
||||
C:AmigaSession SAVE salva geometria e ordine e genera S:Session-Apps con le app attualmente aperte. C:AmigaSession RESTORE attende fino a 30 secondi le finestre e ne ripristina posizione, dimensioni e ordine. Non lancia duplicati: il lancio viene eseguito solo dallo script di avvio. S:Amber-Desktop esegue Session-Apps al posto del precedente avvio singolo di Chrono; il dock conserva il suo avvio esistente.
|
||||
|
||||
Snapshot iniziale: RetroIRC 28,397 920x477; Matrix 30,36 488x341; Boing3D 523,36 436x342; Chrono digitale 961,36 296x120.
|
||||
|
||||
Per aggiornare in futuro la disposizione salvata: Workbench Execute -> execute savesession. Non e un salvataggio continuo: registra la disposizione al momento del comando. Le conversazioni e le connessioni IRC non vengono salvate/ripristinate da questo helper.
|
||||
|
||||
Build: ./build.ps1 -Toolchain <VBCC/VASM/VLINK + NDK>. Copiare build/AmigaSession in SYS:C/. Backup dell'avvio precedente: Amber-Desktop.before. Le copie degli script e Saved.layout documentano la configurazione iniziale, specifica di questo desktop 1280x1024.
|
||||
@@ -0,0 +1,2 @@
|
||||
Stack 65536
|
||||
C:AmigaSession SAVE
|
||||
@@ -0,0 +1,4 @@
|
||||
3 28 397 920 477
|
||||
2 30 36 488 341
|
||||
1 523 36 436 342
|
||||
0 961 36 296 120
|
||||
@@ -0,0 +1,7 @@
|
||||
; Generated by AmigaSession SAVE. Restore the captured applications.
|
||||
Stack 262144
|
||||
Run >NIL: SYS:Utilities/AmberChrono/Chrono
|
||||
Run >NIL: SYS:Utilities/Boing3D/Boing3D
|
||||
Run >NIL: SYS:Utilities/Matrix/Matrix
|
||||
Run >NIL: SYS:Utilities/RetroIRC/RetroIRC
|
||||
Run >NIL: C:AmigaSession RESTORE
|
||||
@@ -0,0 +1,25 @@
|
||||
param([string]$Toolchain = $env:AMIGA_TOOLCHAIN)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
if (!$Toolchain) { throw 'Specificare -Toolchain con la cartella che contiene bin e targets/m68k-amigaos.' }
|
||||
$Toolchain = (Resolve-Path -LiteralPath $Toolchain).Path
|
||||
$targetPath = Join-Path $Toolchain 'targets/m68k-amigaos'
|
||||
$buildPath = Join-Path $PSScriptRoot 'build'
|
||||
$configPath = Join-Path $buildPath 'vbcc'
|
||||
New-Item -ItemType Directory -Path (Join-Path $configPath 'config') -Force | Out-Null
|
||||
$config = [IO.File]::ReadAllText((Join-Path $PSScriptRoot 'vbcc-config.in')).Replace('@TARGET@', $targetPath.Replace('\','/'))
|
||||
[IO.File]::WriteAllText((Join-Path $configPath 'config/boing'), $config)
|
||||
$previousVBCC = $env:VBCC
|
||||
$previousPath = $env:PATH
|
||||
try {
|
||||
$env:VBCC = $configPath
|
||||
$env:PATH = (Join-Path $Toolchain 'bin') + ';' + $env:PATH
|
||||
Push-Location -LiteralPath $PSScriptRoot
|
||||
try {
|
||||
& (Join-Path $Toolchain 'bin/vc.exe') +boing -O2 -c99 -o build/AmigaSession session.c
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Compilazione fallita.' }
|
||||
} finally { Pop-Location }
|
||||
} finally {
|
||||
$env:VBCC = $previousVBCC
|
||||
$env:PATH = $previousPath
|
||||
}
|
||||
Write-Output ('Pronto per Amiga: ' + $buildPath)
|
||||
@@ -0,0 +1,24 @@
|
||||
#include <exec/types.h>
|
||||
#include <intuition/intuition.h>
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
#include <proto/intuition.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
struct IntuitionBase*IntuitionBase;
|
||||
struct App {char*title,*path;};
|
||||
static struct App apps[]={
|
||||
{"Amber Chrono","SYS:Utilities/AmberChrono/Chrono"},{"Boing 3D","SYS:Utilities/Boing3D/Boing3D"},{"Matrix |","SYS:Utilities/Matrix/Matrix"},{"RetroIRC","SYS:Utilities/RetroIRC/RetroIRC"},{"RetroTerm","SYS:Utilities/RetroTerm/RetroTerm"},{"Boing!","SYS:Utilities/Boing/Boing"},{"System Monitor","SYS:Utilities/AmberMonitor/Monitor"},{"Tech News","SYS:Utilities/NewsTicker/News"},{"MOD Player","SYS:Utilities/AmberMod/ModPlayer"}};
|
||||
#define APPS (sizeof(apps)/sizeof(apps[0]))
|
||||
struct Entry {int app,x,y,w,h;};static struct Entry entries[APPS];static struct Window*found[APPS];
|
||||
static int identify(struct Window*w){int i;if(!w->Title)return -1;for(i=0;i<APPS;i++)if(!strncmp((char*)w->Title,apps[i].title,strlen(apps[i].title)))return i;return -1;}
|
||||
int main(int argc,char**argv){struct Screen*sc;struct Window*w;ULONG lock;FILE*f;int n=0,i,j,id,pass,restoring=argc>1&&!strcmp(argv[1],"RESTORE");IntuitionBase=(struct IntuitionBase*)OpenLibrary("intuition.library",39);if(!IntuitionBase)return 20;sc=LockPubScreen(0);if(!sc){CloseLibrary((struct Library*)IntuitionBase);return 20;}
|
||||
if(!restoring){lock=LockIBase(0);for(w=sc->FirstWindow;w&&n<APPS;w=w->NextWindow){id=identify(w);if(id<0)continue;for(i=0;i<n;i++)if(entries[i].app==id)break;if(i<n)continue;entries[n].app=id;entries[n].x=w->LeftEdge;entries[n].y=w->TopEdge;entries[n].w=w->Width;entries[n++].h=w->Height;}UnlockIBase(lock);
|
||||
if(!n)goto end;f=fopen("SYS:Prefs/AmigaSession.layout","w");if(!f)goto end;for(i=0;i<n;i++)fprintf(f,"%d %d %d %d %d\n",entries[i].app,entries[i].x,entries[i].y,entries[i].w,entries[i].h);fclose(f);
|
||||
f=fopen("S:Session-Apps","w");if(f){fprintf(f,"; Generated by AmigaSession SAVE. Restore the captured applications.\nStack 262144\n");for(i=n-1;i>=0;i--)fprintf(f,"Run >NIL: %s\n",apps[entries[i].app].path);fprintf(f,"Run >NIL: C:AmigaSession RESTORE\n");fclose(f);}
|
||||
}else{f=fopen("SYS:Prefs/AmigaSession.layout","r");if(!f)goto end;while(n<APPS&&fscanf(f,"%d %d %d %d %d",&entries[n].app,&entries[n].x,&entries[n].y,&entries[n].w,&entries[n].h)==5){if(entries[n].app>=0&&entries[n].app<APPS)n++;}fclose(f);
|
||||
for(pass=0;pass<300;pass++){for(i=0;i<n;i++){if(found[i])continue;lock=LockIBase(0);for(w=sc->FirstWindow;w;w=w->NextWindow)if(identify(w)==entries[i].app)break;UnlockIBase(lock);if(!w)continue;ChangeWindowBox(w,entries[i].x,entries[i].y,entries[i].w,entries[i].h);found[i]=w;}for(i=0;i<n;i++)if(!found[i])break;if(i==n)break;Delay(5);}
|
||||
/* Re-find each window before the final pass: apps can reopen while starting. */
|
||||
Delay(25);for(i=n-1;i>=0;i--){lock=LockIBase(0);for(w=sc->FirstWindow;w;w=w->NextWindow)if(identify(w)==entries[i].app)break;UnlockIBase(lock);if(w){ChangeWindowBox(w,entries[i].x,entries[i].y,entries[i].w,entries[i].h);WindowToFront(w);}}
|
||||
}
|
||||
end:UnlockPubScreen(0,sc);CloseLibrary((struct Library*)IntuitionBase);return 0;}
|
||||
@@ -0,0 +1,12 @@
|
||||
-cc=vbccm68k -quiet -hunkdebug %s -o= %s %s -O=%ld -I"@TARGET@/include" -I"@TARGET@/ndk/include_h" -I"@TARGET@/netinclude"
|
||||
-ccv=vbccm68k -hunkdebug %s -o= %s %s -O=%ld -I"@TARGET@/include" -I"@TARGET@/ndk/include_h" -I"@TARGET@/netinclude"
|
||||
-as=vasmm68k_mot -quiet -Fhunk -phxass -opt-fconst -nowarn=62 %s -o %s
|
||||
-asv=vasmm68k_mot -Fhunk -phxass -opt-fconst -nowarn=62 %s -o %s
|
||||
-ld=vlink -bamigahunk -x -Bstatic -Cvbcc -nostdlib "@TARGET@/lib/startup.o" %s %s -L"@TARGET@/lib" -lvc -o %s
|
||||
-l2=vlink -bamigahunk -x -Bstatic -Cvbcc -nostdlib %s %s -L"@TARGET@/lib" -o %s
|
||||
-ldv=vlink -bamigahunk -t -x -Bstatic -Cvbcc -nostdlib "@TARGET@/lib/startup.o" %s %s -L"@TARGET@/lib" -lvc -o %s
|
||||
-l2v=vlink -bamigahunk -t -x -Bstatic -Cvbcc -nostdlib %s %s -L"@TARGET@/lib" -o %s
|
||||
-ldnodb=-s -Rshort
|
||||
-ul=-l%s
|
||||
-cf=-F%s
|
||||
-ml=500
|
||||
Reference in new issue
Block a user