wasmjob: merged job_wasm into job_js, moved job_shared and job_browser to packages/job

This commit is contained in:
mattias 2022-07-13 15:27:24 +02:00
parent 211f4021eb
commit eb74dbf3b0
12 changed files with 1973 additions and 1981 deletions

View File

@ -36,17 +36,22 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
</Unit> </Unit>
<Unit> <Unit>
<Filename Value="../button/index.html"/> <Filename Value="index.html"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<CustomData Count="1"> <CustomData Count="1">
<Item0 Name="PasJSIsProjectHTMLFile" Value="1"/> <Item0 Name="PasJSIsProjectHTMLFile" Value="1"/>
</CustomData> </CustomData>
</Unit> </Unit>
<Unit> <Unit>
<Filename Value="../dom/job_browser.pp"/> <Filename Value="../../../packages/job/job_browser.pp"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="JOB_Browser"/> <UnitName Value="JOB_Browser"/>
</Unit> </Unit>
<Unit>
<Filename Value="../../../packages/job/job_shared.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="JOB_Shared"/>
</Unit>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -56,7 +61,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="../dom"/> <OtherUnitFiles Value="../../../packages/job"/>
<UnitOutputDirectory Value="js"/> <UnitOutputDirectory Value="js"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>

View File

@ -4,7 +4,7 @@ program BrowserButton1;
uses uses
BrowserConsole, BrowserApp, JS, Classes, SysUtils, Web, WebAssembly, Types, BrowserConsole, BrowserApp, JS, Classes, SysUtils, Web, WebAssembly, Types,
WasiEnv, JOB_Browser, JOB_Shared; WasiEnv, JOB_Shared, JOB_Browser;
Type Type

View File

@ -28,11 +28,6 @@
<Filename Value="WasiButton1.lpr"/> <Filename Value="WasiButton1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
</Unit> </Unit>
<Unit>
<Filename Value="../dom/job_wasm.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="JOB_WAsm"/>
</Unit>
<Unit> <Unit>
<Filename Value="../dom/job_web.pas"/> <Filename Value="../dom/job_web.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -43,6 +38,11 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="JOB_JS"/> <UnitName Value="JOB_JS"/>
</Unit> </Unit>
<Unit>
<Filename Value="../../../packages/job/job_shared.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="JOB_Shared"/>
</Unit>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -52,7 +52,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="../dom"/> <OtherUnitFiles Value="../dom;../../../packages/job"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>

View File

@ -5,7 +5,7 @@ library WasiButton1;
{$codepage UTF8} {$codepage UTF8}
uses uses
SysUtils, JOB_WAsm, JOB_Shared, JOB_Web, JOB_JS; SysUtils, JOB_Shared, JOB_Web, JOB_JS;
type type
@ -58,7 +58,7 @@ end;
// workaround: fpc wasm does not yet support exporting functions from units // workaround: fpc wasm does not yet support exporting functions from units
function JOBCallback(const Func: TJOBCallback; Data, Code: Pointer; Args: PByte): PByte; function JOBCallback(const Func: TJOBCallback; Data, Code: Pointer; Args: PByte): PByte;
begin begin
Result:=JOB_WAsm.JOBCallback(Func,Data,Code,Args); Result:=JOB_JS.JOBCallback(Func,Data,Code,Args);
end; end;
exports exports

View File

@ -42,10 +42,15 @@
</CustomData> </CustomData>
</Unit> </Unit>
<Unit> <Unit>
<Filename Value="job_browser.pp"/> <Filename Value="../../../packages/job/job_browser.pp"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="JOB_Browser"/> <UnitName Value="JOB_Browser"/>
</Unit> </Unit>
<Unit>
<Filename Value="../../../packages/job/job_shared.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="JOB_Shared"/>
</Unit>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -55,6 +60,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="../../../packages/job"/>
<UnitOutputDirectory Value="js"/> <UnitOutputDirectory Value="js"/>
</SearchPaths> </SearchPaths>
<Parsing> <Parsing>

View File

@ -4,7 +4,7 @@ program BrowserDomTest1;
uses uses
BrowserConsole, BrowserApp, JS, Classes, SysUtils, Web, WebAssembly, Types, BrowserConsole, BrowserApp, JS, Classes, SysUtils, Web, WebAssembly, Types,
wasienv, job_browser, job_shared; wasienv, job_shared, JOB_Browser;
Type Type

View File

@ -28,11 +28,6 @@
<Filename Value="WasiDomTest1.lpr"/> <Filename Value="WasiDomTest1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
</Unit> </Unit>
<Unit>
<Filename Value="job_wasm.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="JOB_WAsm"/>
</Unit>
<Unit> <Unit>
<Filename Value="job_web.pas"/> <Filename Value="job_web.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -43,6 +38,11 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="JOB_JS"/> <UnitName Value="JOB_JS"/>
</Unit> </Unit>
<Unit>
<Filename Value="../../../packages/job/job_shared.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="JOB_Shared"/>
</Unit>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -52,6 +52,7 @@
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/> <IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="../../../packages/job"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>

View File

@ -5,7 +5,7 @@ library WasiDomTest1;
{$codepage UTF8} {$codepage UTF8}
uses uses
SysUtils, JOB_WAsm, JOB_Shared, JOB_Web, JOB_JS; SysUtils, JOB_Shared, JOB_Web, JOB_JS;
type type
@ -66,7 +66,7 @@ begin
exit; exit;
obj:=TJSObject.CreateFromID(JObjIdBird); obj:=TJSObject.JOBCreateFromID(JObjIdBird);
obj.WriteJSPropertyUnicodeString('Caption','Root'); obj.WriteJSPropertyUnicodeString('Caption','Root');
writeln('AAA1 '); writeln('AAA1 ');
//u:='äbc'; //u:='äbc';
@ -141,7 +141,7 @@ end;
// workaround: fpc wasm does not yet support exporting functions from units // workaround: fpc wasm does not yet support exporting functions from units
function JOBCallback(const Func: TJOBCallback; Data, Code: Pointer; Args: PByte): PByte; function JOBCallback(const Func: TJOBCallback; Data, Code: Pointer; Args: PByte): PByte;
begin begin
Result:=JOB_WAsm.JOBCallback(Func,Data,Code,Args); Result:=JOB_JS.JOBCallback(Func,Data,Code,Args);
end; end;
exports exports

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff