You are on page 1of 5

This document is intended to outline how MioPocket is structured so that serious

users may understand how to more easily make their own modifications and adapt/
extend MioPocket. For specific help, such as with adding and removing programs a
nd icons, please see the Readme.
Folder Structure
================
Programs
\Games
\Win32
ktop computer

- All programs
- All games
- Programs to be run from a Windows (ex. XP/Vista/7) des

Registry
\480x272
80x272 displays
\CE4
E4 devices
\CE5
E5 devices
\Custom
\Exclude
rted

- Registry files to be automatically imported


- Registry files to be automatically imported only for 4

Scripts

- All scripts

- Registry files to be automatically imported only for C


- Registry files to be automatically imported only for C
- User-added registry files to be automatically imported
- Any registry files that will NOT be automatically impo

Skin
s look
\MiniBar
\Pages
icons
\Scripts
elated to Icon Edit Mode)

Skins and all associated files that make up MioPocket'

System
iles here can be found
\CE4
\CE5
\FlashDrive
(i.e. won't work from
\WLAN

by
SD
-

DLLs and other files to be added to the system path. F


any program
CE4-specific DLLs to be added only for CE4 devices
CE5-specific DLLs to be added only for CE5 devices
DLLs that need to be copied to the flash drive to work
cards)
DLLs for a few different wireless network SDIO cards

Windows
\Administrative Tools
\Application Data
\Control Panel
\Desktop
\Favorites
\Fonts
m
\Root
)
\Startup
\Start Menu
ms
\Wallpaper
\Windows
indows folder

All files for customizing Windows CE


Shortcuts to be available as Administrative Tools
Files to be copied to \Application Data
Applets to be added to the Control Panel
Any links that will show up on the CE desktop
Favorites to be installed for Internet Explorer
Fonts to be automatically added to the operating syste

The files that define the MiniBar for each skin


The pages that describe the skins. Edit to add/remove
Simple scripts for launching icons and skin changes (r

- Files to be copied to the internal root directory ("\"


- Any files or links that will be run at startup
- Links that will show up on the start menu under Progra
- Wallpapers used for the desktop
- Files that may or may not be copied to the internal \W

Installation Sequence
=====================
MioAutoRun.mscr/MioMap.mscr
|> Unlock.mscr
MioAutoRun.mscr/MioMap.mscr - Determines the type of installation (SD/SDFree/SDto-SDFree), displays any startup menus, then hands installation off to MioAutoRu
n\Scripts\Unlock.mscr.
Unlock.mscr - Installs MioPocket. Among other things, that includes importing re
gistry files, configuring the skin and setting <flashdisk>\MioAutoRun\Launch.exe
to run at startup via the HKLM\init registry key. Afterwards, the script resets
the device.
Startup Sequence
================
Launch.exe
|> Initialize.mscr
|> SysInfo-Start.mscr
|> StartupPrograms.mscr
Launch.exe - Runs at system startup (via the HKLM\init registry key) and launche
s Initialize.mscr (set in Launch.ini) once it is available (which can take a few
seconds if it's on SD card).
Initialize.mscr - Kills and/or minimizes OEM menus and other apps so that they d
on't interfere with MioPocket, then calls SysInfo-Start.mscr.
SysInfo-Start.mscr - Launches SystemInformation (the customizable graphical shel
l), then calls StartupPrograms.mscr.
StartupPrograms.mscr - Runs any other apps or services that need running, such a
s the MiniBar, the registry backup service or device-specific utilities.
Settings
========
MioPocket.ini - Stores MioPocket's settings. They may be modified here or via th
e MioPocket Settings menu in MioPocket. Most settings are also automatically ava
ilable for use in scripts as variables via Variables.mscr.
Variables.mscr - Determines and retrieves MioPocket's settings (some from MioPoc
ket.ini, others from the file system). Some describe paths (ex. "ProgramsFolder"
, so that one need not know whether it's \Storage Card\MioAutoRun\Programs or \S
DMMC\MioAutoRun\Programs) and others describe settings (ex. which skin is set or
whether the MiniBar is enabled). For speed reasons, variables are broken into g
eneral categories:
Variables_Common
- all common paths for MioPocket. Normally, this is all tha
t you need to call. Variables_Install
- less-used variables related to instal
lation. Includes Variables_Common.
Variables_Apps
- variables related to skins, apps and services. Includes V
ariables_Common.
Variables_Navigation - variables used for navigation software. Includes Variable
s_Common.

Variables_Language - variables for language translation. Includes Variables_Co


mmon.
Variables
- retrieves ALL variables. Useful for debugging; otherwise,
not recommended (slow).
See Variables.mscr or the existing scripts to use these variables.
DLLs
====
MioPocket stores most of its DLLs under MioAutoRun\System. During installation,
that folder and its sub-folders are added to the Windows CE system path (defined
in HKLM\Loader). Windows CE checks the system path whenever a program requests
a file that can't be found in the app's folder or in \Windows. Storing DLLs ther
e allows MioPocket (and you) to add them to Windows CE without copying them to \
Windows. Additionally, it should be noted that many common DLLs have been moved
from the folders of programs to the System folder to eliminate duplicates and sa
ve space.
Navigation App Launch Sequence
==============================
[app]Launcher.mscr (ex. MioMapLauncher.mscr)
|> [app]Launcher2.mscr
|> AppLauncher.mscr
[app]Launcher.mscr - Un-minimizes the app if it's minimized; otherwise, it calls
[app]Launcher2.mscr. This setup is necessary in order to allow for un-minimizin
g the app via the icon, since MortScript does not allow a script that is already
running to be executed (and [app]Launcher2.mscr needs to stay in memory while t
he app is running).
[app]Launcher2.mscr - Performs any app-specific procedures, calls AppLauncher.ms
cr to launch the app, waits for it to exit, then performs app-specific "exit" pr
ocedures.
AppLauncher.mscr - Performs general procedures (ex. disabling the MiniBar) that
are needed for all nav apps, runs the requested app, waits for it to exit, then
performs general "exit" procedures.
Icon Management
===============
MioPocket allows for menu-based icon management on most of its skins via the "Ed
it Icons" button. It requires that SystemInformation's (the shell program's) pag
e files be formatted in a specific way. You can make your own skins compatible w
ith a little work. First, add "#[IconXX]" (no quotes) on a new line above the "I
CONXPBUTTON" line of all icons that you wish to be editable, where XX is 01 for
the first icon and incrementing for each successive icon (ex. "#[Icon02]" for th
e 2nd icon). Leading 0s for the first 9 icons are important! Next, add "#[IconXX
Text]" on a new line above the TEXT line of any editable icons that have text la
bels, so that they correspond to the icons (ex. "#[Icon01Text]" for the text lab
el beneath the icon described by "#[Icon01]"). Next, add "#EditIni = ..\Scripts\
Icons\<page>_IconXX.mscr" on a new line at the bottom of each icon section, wher
e <page> is the page (ex. "Favorites" or "Games2") that you're editing and XX is
the number of the icon whose section you're editing (again, leading 0s for the
first 9 icons are important). Here is an example of how all of it should look:

#[Icon01]
ICONXPBUTTON
x = 20
y = 60
NewIni = ..\..\Scripts\MioPocketSettings.mscr
SizeNormal = 48
SizePushed = 48
IconNormal = ..\Icons\MioPocketSettings.ico
ScaleAlpha = 80
IconPushed = ..\Icons\MioPocketSettings.ico
#EditIni = ..\Scripts\Icons\Favorites_Icon01.mscr
#[Icon01Text]
TEXT
x = 20
y = 110
Text = MP Settings
Color = FFFFFF
Size = 12
Weight = 500
CreateFont
Note #1: If the included scripts (in MioAutoRun\Skin\Scripts\Icons) don't match
all of the names that you've given your pages or if you have more icons per page
than there are scripts, simply copy and rename the scripts. They all have exact
ly the same code and are different only in filename. The Icon Manager simply use
s the filename to know which page and icon is being edited.
Note #2: It's important to add a "#[<section name>] line above any section that
comes after one of your IconXX or IconXXText sections, even if you don't intend
to edit it, since SystemInformation.exe will, otherwise, treat it as part of the
above section and give you unpredictable results when editing that icon. For ex
ample, if your page file flow goes like... #[Icon04] -> BATTERY -> #[Icon05] ...
add a "#[Battery]" (or any name) line above BATTERY to distinguish it from the i
cons and not allow its values to be confused for the 4th icon's.
Note #3: It's very important that a blank line separate each section, because th
e program will throw up errors, otherwise.
Note #4: You can use full/absolute paths if you prefer, but relative paths (usin
g ".." to indicate a file's parent folder) are easier and work regardless of the
drive name.
Once you have modified all of your pages in the above manner and have checked th
at all of the scripts that you declared on the NewIni lines exist in MioAutoRun\
Skin\Scripts\Icons, your skin ought to be ready to be used with the icon managem
ent system.
For those curious, here is how icon management works once the files have been se
t up:
When you press the "Edit Icons" button, IconManager.mscr reads the current page
file into memory, swaps the paths assigned to "EditIni" and "NewIni", writes the
modified file contents to a temporary edit file (ex. MioAutoRun\Skin\IconEditMo
de\Favorites.ini) and launches a second instance of SystemInformation (using the
temporary file) over top of the existing SystemInformation. This is called Icon
Edit Mode. Because the "NewIni" (i.e. run) commands now point to the icon scrip
ts, pressing the icons runs the scripts, which launches IconManager.mscr and pas
ses it the page and number of the icon to edit. IconManager.mscr then reads the
temporary edit file into memory, strips the "#" signs from in front of each occu
rrence of "[" (to create a valid, sectioned .ini file that MortScript can easily
work on) and "#EditIni", writes the modified file contents to a second temporar

y file (MioAutoRun\Skin\IconEditMode\Temp.ini) and launches the Icon Manager men


u.
In the Icon Manager menu, every change made to an icon is written to the second
temporary file (Temp.ini). Once the menu is exited, any changes are saved to the
first temporary file (ex. Favorites.ini) and the SystemInformation using that f
ile to display Icon Edit Mode is reloaded to display any changes. Pressing the "
Edit Icons" again will compare that file to the original page file and, if there
are any changes, ask you if you want to save them. If you choose Yes, the chang
es will be saved to the original page file. Icon Edit Mode (including the second
SystemInformation) will then exit and, if you chose to save changes, reload the
original SystemInformation to present the saved changes to you.
Tools
=====
MortScript - The incredibly powerful scripting engine used by MioPocket. See htt
p://www.sto-helit.de/ to download the manual, a must-have resource for serious s
cripting.
SystemInformation - The graphical menu software used for MioPocket for its skins
and the MiniBar. See http://www.ultimatelaunch.de/download/SystemInformation1.6
.pdf to download the short manual (in German, but understandable enough, since t
he commands are in English).

You might also like