Pooka SDK Developer Guide
SDK Structure and Tools

Pooka SDK  Directory Structure

Upon successful installation, the Pooka SDK® should have the following directory structure:

  • SDK Root
    • Doc     <-------— SDK document
      • Developer Guide     <-------— "Developer Guide", the Html document you are reading
      • API Reference     <-------— SDK API reference
    • Include     <-------— The headers files of Pooka SDK®
      • ...
      • ...
      • ...
      • MiniFC.h
      • MiniFC_NetExt.h
      • MiniFC.AllNamespace.h
      • MiniFC_NetExt.AllNamespace.h
    • Lib     <-------— The library (static library) files of Pooka SDK®
      • Windows     <-------— library for Windows desktop and UWP
        • X86     <-------— x86 architecturer
          • Debug
          • Release
        • X64     <-------— x64 architecturer
          • Debug
          • Release
        • ARM     <-------— ARM (32-bit) architecturer
          • Debug
          • Release
      • Android     <-------— library for Android
        • jar
        • armv7-a     <-------— ARM (32-bit) architecturer
          • Debug
          • Release
        • arm64-v8a     <-------— ARM (64-bit) architecturer
          • Debug
          • Release
      • Mac_iOS     <-------— library for macOS and iOS
        • Debug-iphoneos
        • Debug-iphonesimulator
        • Debug-macosx
        • Release-iphoneos
        • Release-iphonesimulator
        • Release-macosx
    • Samples     <-------— Sample projects
      • MiniFC.Core
      • MiniFC.NetExt
      • Workspace_AllProjects
    • TemplateProjects     <-------— Template projects used by project creator tool
      • OGAppEmpty
      • OGAppTemplate
      • ...
    • Tools     <-------— SDK tools
      • PookaProj.exe and PookaProj     <-------— the console based project creator
      • PookaProjApp.exe and PookaProjApp.app     <-------— the GUI based project creator
      • Win32ResPacker.exe and Win32ResPacker.app     <-------— the Win32 resources packer
      • Pooka3DModelViewer.exe and Pooka3DModelViewer.app     <-------— the 3D model viewer

Document

The SDK document consist of:

SDK Header and library File

Header files contains declarations for SDK namespaces, classes and functions.

  • MiniFC.h and MiniFC_NetExt.h1
    The headers for Pooka SDK® core library and network extension library. When including these two headers in application source code, it is recommended to include them before other platform headers and third party SDK headers. Like:
    #include "MiniFC.h"
    #include <string.h>
    #include <stdlib.h>
    #include <vector>
    #include <map>
    Since MiniFC.h and MiniFC_NetExt.h are large headers, it is highly recommended to pre-compile them in application projects, which can dramatically reduce the application project compilation time. Refer to IDE's document for how to pre-compile a C/C++ header to boost compilation performance.2
  • MiniFC.AllNamespace.h and MiniFC_NetExt.AllNamespace.h These are convenience headers providing using namespace declaration on all Pooka SDK® namespaces, therefore access SDK classes can be simply thought the class name without its namespace.
    Obviously, these headers are optional and if developers think including such bulky helper headers is not good idea, they can simply declare using namespace only when needed. Like:
    #include "MiniFC.h"
    using namespace Pooka::Core::MiniSTL::DataStructure; //For classes ArrayList, HashMap, Tree, ...
    using namespace Pooka::Core::MiniSTL::Type; //For classes String, Integer, OGPoint, ...
    using namespace Pooka::Core::MiniSTL::Util; //For classes StringUtil, MathUtil, ...
    using namespace Pooka::Core::MiniSTL::Buffer; //For classes StrBuf, ByteBuf, ...
  • Static Library Files (.lib or .a)
    These are the static library used to link the application projects.
    • Libraries with extension .lib are for Windows and libraries with extension .a are for Unix based system (Android, macOS, etc.)
    • Libraries under Debug or Debug-XXX folders are for debug build and libraries under Release or Release-XXX folders are for release build
    • Debug build library contains debug information and has not optimization
    • Debug build library does not contain debug information and is optimized for performance
    • Library's binary architecture (ARM or x86, 32-bit or 64-bit) are naturally reflected by their containing folder name3
  • Android Jar file MiniFC.jar
    The Java Jar file dedicated to Pooka SDK® application for Android, which provides the class definition for Android native activity class com.omnigsoft.minifc.NativeActivity.

 Note 
1 - The word MiniFC in header file names comes from the initial code name when Pooka SDK® is started. The SDK's library is initially named as MiniFC, which means a "miniature foundation class" library. MiniFC is still used internally for naming technical modules of Pooka SDK®.
2 - "Pre-compile header" is not not used in sample projects. 3 - All sample projects has properly linked to the correct library in thier project settings.

Sample Projects

All sample projects, read Building Sample Projects for more details.

Template Projects

Template projects are used by the project creator to create new Pooka SDK® project. Since template projects are the "master" project for all new projects, developers usually should not change anything in template projects.

In case that developers want to permanently change a project template, it is suggested to make a back up before modify it. Once a project template is modified / customized, all new projects based it will be affected.

Read Using Pooka Project Creator for more details.

SDK Tools

The Windows edition SDK tools have .exe and .bat file extension and macOS edition SDK tools have .app and .sh file extension or have no extension.

The project creator

Project creator is used to generate new Pooka SDK® project, see Using Pooka Project Creator for more details.

The Win32 resources packer

The Win32 resources packer is a tool dedicated to Windows desktop application that compresses and packs all application's assets into the application executable binary.

There are two solutions to delivery a Windows desktop application, the Win32 resources packer tool is used for the second solution.

Ship app executable (.exe) and all app assets files
In this case, all app assets files are located somewhere on the file system. The location must meet the following rules to make the app executable (.exe) able to find the needed asset files at the run-time.

The rules for exernal app assets location

  • The assets must be grouped into a directory named as "Assets" or a custom name specified by Pooka::Core::MiniSTL::Os::OsUtil::setAssetsDirName().
  • The relative location of the assets directory must be (see the picture):
    • Side-by-side with the app executable (.exe)
    • One-level higher in the directory structure than the app executable (.exe)
    • Two-level higher in the directory structure than the app executable (.exe)
  • The minimum file access permission for assets is "Read" (they can be treated as read-only)

The disadvantage of this solution is that the assets files need to be carried together with the binary file. Usually this requires developers to create an application installer for the end user.

Pack all app assets into the app executable (.exe) and ship the single executable (.exe) file
In this case, all app assets files are compressed (optional) and packed inside application binary (.exe). The advantage of this solution is the application delivery is a single portable file, and there may not be necessary to create an application installer. Also the performance penalty caused by extracting assets out of binary at run-time can usually be ignored.

The command-line arguments of Win32ResPacker:

=========================================================================
Win32 (desktop) Application Assets Packing Tool
Embedding binary asset files into Pooka SDK Win32 (desktop) application
so that the application can run standalone.
Pooka SDK(r) 1.5.0
Copyright(c) OmniG Software Inc.
www.OmniGSoft.com
=========================================================================
Usages:
Display help: Win32ResPacker -h|-help
List resources: Win32ResPacker -l|-list exe-path
Pack resources: Win32ResPacker -p|-pack exe-path asset-dir-path [-c|-compress] [-b|-backup] [-q|-quiet]
Wizard mode: Win32ResPacker -w|-wizard
Options:
-b|-backup Generate a back-up file
-q|-quiet Does not display any information
-c|-compress Compress the processed exe file
Press any key to continue . . .

The 3D model viewer

This is a small 3D model viewer that allows app developers or game designer preview 3D models. Developers can open a 3D model by using menu "File / Open" or simply dragging the model file into the application. The supported 3D model formats are Autodesk 3DS and Wavefront .OBJ.

Technical Support Ticket Generator

This tool generates a technical support ticket, an encrypted character string, which must be provided when Pooka SDK developers submit a technical support request. The encrypted ticket contains basic information about the Pooka SDK and the purchase ID, so that the developer's entitlement can be verified at Pooka team.

 Note  Privacy Declaration: This tool does not collect any user information other than the data displayed in this tool.
 Note  According to Pooka SDK technical support policy, e-mail base technical support is only offered for the developers who purchased Pooka SDK® standard edition or higher edition. Community edition developers may try to find answers or post questions at Pooka SDK Developer Forum, visit pooka.omnigsoft.com for more details.