platform_detect function

Detect platform and architecture