| 1 |
{ |
| 2 |
Copyright 2019-2022 Michalis Kamburelis. |
| 3 |
|
| 4 |
This file is part of "Castle Game Engine". |
| 5 |
|
| 6 |
"Castle Game Engine" is free software; see the file COPYING.txt, |
| 7 |
included in this distribution, for details about the copyright. |
| 8 |
|
| 9 |
"Castle Game Engine" is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 |
|
| 13 |
---------------------------------------------------------------------------- |
| 14 |
} |
| 15 |
|
| 16 |
{ Support Nintendo Switch compilation / packaging. } |
| 17 |
unit ToolNintendoSwitch; |
| 18 |
|
| 19 |
interface |
| 20 |
|
| 21 |
uses Classes, |
| 22 |
CastleUtils, CastleStringUtils, |
| 23 |
ToolUtils, ToolArchitectures, ToolCompile, ToolProject; |
| 24 |
|
| 25 |
{ Raise exception that Nintendo Switch is not supported in open-source version. } |
| 26 |
procedure NxNotSupported; |
| 27 |
|
| 28 |
{ Compile any Pascal unit for Nintendo Switch. |
| 29 |
|
| 30 |
CompilerOptions.OS andCompilerOptions.CPU are ignored by this routine. |
| 31 |
This routine may modify CompilerOptions contents. } |
| 32 |
procedure CompileNintendoSwitch( |
| 33 |
const WorkingDirectory, CompileFile: string; |
| 34 |
const CompilerOptions: TCompilerOptions); |
| 35 |
|
| 36 |
{ Compile a final library for Nintendo Switch. |
| 37 |
|
| 38 |
CompilerOptions.OS andCompilerOptions.CPU are ignored by this routine. |
| 39 |
This routine may modify CompilerOptions contents. } |
| 40 |
procedure CompileNintendoSwitchLibrary(const Project: TCastleProject; |
| 41 |
const WorkingDirectory, CompileFile: string; |
| 42 |
const CompilerOptions: TCompilerOptions); |
| 43 |
|
| 44 |
procedure PackageNintendoSwitch(const Project: TCastleProject); |
| 45 |
|
| 46 |
implementation |
| 47 |
|
| 48 |
uses SysUtils, |
| 49 |
CastleFilesUtils, CastleUriUtils, |
| 50 |
ToolPackage; |
| 51 |
|
| 52 |
procedure NxNotSupported; |
| 53 |
begin |
| 54 |
raise Exception.Create('The open-source version of the Castle Game Engine build tool does not support Nintendo Switch.' + NL + |
| 55 |
'Contact us if you are a registered Nintendo Developer and you want to use CGE on Nintendo Switch:' + NL + |
| 56 |
'https://castle-engine.io/talk.php'); |
| 57 |
end; |
| 58 |
|
| 59 |
procedure CompileNintendoSwitch( |
| 60 |
const WorkingDirectory, CompileFile: string; |
| 61 |
const CompilerOptions: TCompilerOptions); |
| 62 |
begin |
| 63 |
NxNotSupported; |
| 64 |
end; |
| 65 |
|
| 66 |
procedure CompileNintendoSwitchLibrary(const Project: TCastleProject; |
| 67 |
const WorkingDirectory, CompileFile: string; |
| 68 |
const CompilerOptions: TCompilerOptions); |
| 69 |
begin |
| 70 |
NxNotSupported; |
| 71 |
end; |
| 72 |
|
| 73 |
procedure PackageNintendoSwitch(const Project: TCastleProject); |
| 74 |
begin |
| 75 |
NxNotSupported; |
| 76 |
end; |
| 77 |
|
| 78 |
end. |