Jump to content
과거의 기술자료(읽기 전용): https://tech.devgear.co.kr ×
과거의 기술자료(읽기 전용): https://tech.devgear.co.kr

11 알렉산드리아의 새로운 플랫폼 식별자


Recommended Posts

 

엠바카데로의 "What's NEW in 11 알렉산드리아"의 내용을 보다가 "플랫폼 식별자(Platform Identifiers)"에 대한 RTL 부분의 작지만 멋진 변화를 확인할 수 있었다. 플랫폼 식별자를 잘 사용하면, 크로스 플랫폼 개발 프로젝트에 매우 도움이 될 수 있다. 플랫폼과 관련된 모든 식별자가 일관된 네이밍 패턴을 사용하는지 확인하는 것 또한 프로그래밍 결과에 도움을 줄 수 있다.

The RTL adds a new platform identifier, pidOSXArm64 for the macOS/Arm64 platform.
The existing pidAndroid32Arm and pidAndroid64Arm identifiers are replaced by the
new pidAndroidArm32 and pidAndroidArm64.
Now, all platform related identifiers use the same format and order of the compilers:
   <Platform name> <Architecture name> <Bitness>

 

새로운 플랫폼 식별자는 System.Classes.pas와 System.Classes.hpp 파일에서 확인할 수 있다.
참고사항: 일부 플랫폼 식별자는 더 이상 사용되지 않고 사라질(deprecated) 속성으로 표시될 수 있다.

image.png image.png

 

C++빌더 참고사항: 위의 이미지에서 볼 수 있듯 "클래식" C++ 컴파일러의 Messages 창에 더 이상 사용되지 않는(deprecated) 부분에 대한 경고 메세지를 표시했다. 엠바카데로 온라인 기술 도움말 페이지인 DocWiki에서 강화된 Clang 컴파일러와 사용되지 않을 속성을 사용할 때 해결 방법을 확인할 수 있다. DocWiki 항목에는 "#pragma obsolete를 사용되지 않을 속성에 대한 해결 방법"으로 제시한다.

System.Classes.pas
 
  { Platform identifiers }
  pidWin32          = $00000001;
  pidWin64          = $00000002;
  pidOSX32          = $00000004;
  pidiOSSimulator32 = $00000008;
  pidiOSSimulator   = pidiOSSimulator32 deprecated 'Use pidiOSSimulator32';
  pidAndroidArm32   = $00000010;
  pidAndroid32Arm   = pidAndroidArm32 deprecated 'Use pidAndroidArm32';
  pidAndroid        = pidAndroidArm32 deprecated 'Use pidAndroidArm32';
  pidLinux32        = $00000020;
  pidiOSDevice32    = $00000040;
  pidiOSDevice      = pidiOSDevice32 deprecated 'Use pidiOSDevice32';
  pidLinux64        = $00000080;
 
  pidWinNX32        = $00000100;
  pidWinIoT32       = $00000200; // Embedded IoT (Internet of Things) Windows w/ Intel Galileo
  pidiOSDevice64    = $00000400;
  pidWinARM32       = $00000800;
  pidWin32ARM       = pidWinARM32 deprecated 'Use pidWinARM32';
  pidOSX64          = $00001000;
  pidLinuxArm32     = $00002000;
  pidLinuxArm64     = $00004000;
  pidAndroidArm64   = $00008000;
  pidAndroid64Arm   = pidAndroidArm64 deprecated 'Use pidAndroidArm64';
 
  pidiOSSimulator64 = $00010000;
 
  pidOSXArm64       = $00020000;
  pidWinArm64       = $00040000;
  pidiOSSimulatorArm64 = $00080000;
 
  pidAllPlatforms = pidWin32 or pidWin64 or
                    pidOSX32 or pidOSX64 or pidOSXArm64 or
                    pidiOSDevice32 or pidiOSDevice64 or
                    pidiOSSimulator32 or pidiOSSimulator64 or
                    pidAndroidArm32 or pidAndroidArm64 or
                    pidLinux64;
 
  { Platform family identifiers }
  pfidWindows     = pidWin32 or pidWin64;
  pfidOSX         = pidOSX32 or pidOSX64 or pidOSXArm64;
  pfidiOS         = pidiOSDevice32 or pidiOSDevice64 or
                    pidiOSSimulator32 or pidiOSSimulator64;
  pfidAndroid     = pidAndroidArm32 or pidAndroidArm64;
  pfidLinux       = pidLinux64;

 

System.Classes.hpp
 
static const System::Int8 pidWin32 = System::Int8(0x1);
static const System::Int8 pidWin64 = System::Int8(0x2);
static const System::Int8 pidOSX32 = System::Int8(0x4);
static const System::Int8 pidiOSSimulator32 = System::Int8(0x8);
static const System::Int8 pidiOSSimulator _DEPRECATED_ATTRIBUTE1("Use pidiOSSimulator32")  = System::Int8(0x8);
static const System::Int8 pidAndroidArm32 = System::Int8(0x10);
static const System::Int8 pidAndroid32Arm _DEPRECATED_ATTRIBUTE1("Use pidAndroidArm32")  = System::Int8(0x10);
static const System::Int8 pidAndroid _DEPRECATED_ATTRIBUTE1("Use pidAndroidArm32")  = System::Int8(0x10);
static const System::Int8 pidLinux32 = System::Int8(0x20);
static const System::Int8 pidiOSDevice32 = System::Int8(0x40);
static const System::Int8 pidiOSDevice _DEPRECATED_ATTRIBUTE1("Use pidiOSDevice32")  = System::Int8(0x40);
static const System::Byte pidLinux64 = System::Byte(0x80);
static const System::Word pidWinNX32 = System::Word(0x100);
static const System::Word pidWinIoT32 = System::Word(0x200);
static const System::Word pidiOSDevice64 = System::Word(0x400);
static const System::Word pidWinARM32 = System::Word(0x800);
static const System::Word pidWin32ARM _DEPRECATED_ATTRIBUTE1("Use pidWinARM32")  = System::Word(0x800);
static const System::Word pidOSX64 = System::Word(0x1000);
static const System::Word pidLinuxArm32 = System::Word(0x2000);
static const System::Word pidLinuxArm64 = System::Word(0x4000);
static const System::Word pidAndroidArm64 = System::Word(0x8000);
static const System::Word pidAndroid64Arm _DEPRECATED_ATTRIBUTE1("Use pidAndroidArm64")  = System::Word(0x8000);
static const int pidiOSSimulator64 = int(0x10000);
static const int pidOSXArm64 = int(0x20000);
static const int pidWinArm64 = int(0x40000);
static const int pidiOSSimulatorArm64 = int(0x80000);
static const int pidAllPlatforms = int(0x394df);
static const System::Int8 pfidWindows = System::Int8(0x3);
static const int pfidOSX = int(0x21004);
static const int pfidiOS = int(0x10448);
static const System::Word pfidAndroid = System::Word(0x8010);
static const System::Byte pfidLinux = System::Byte(0x80);

 

 

 

 

 

이 댓글 링크
다른 사이트에 공유하기

이 토의에 참여하세요

지금 바로 의견을 남길 수 있습니다. 그리고 나서 가입해도 됩니다. 이미 회원이라면, 지금 로그인하고 본인 계정으로 의견을 남기세요.

Guest
이 토픽(기고/질문)에 답하기

×   서식있는 텍스트로 붙여넣기.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   이전에 작성한 콘텐츠가 복원되었습니다..   편집창 비우기

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

중요한 정보

이용약관 개인정보보호정책 이용규칙 이 사이트가 더 잘 작동하기 위해 방문자의 컴퓨터에 쿠키가 배치됩니다. 쿠키 설정 변경에서 원하는 설정을 할 수 있습니다. 변경하지 않으면 쿠키를 허용하는 것으로 이해합니다.