The .app Folder in GLBasic
In earlier versions of GLBasic, all executable programs were created in the project's directory. This was quite handy for small projects, but caused trouble for bigger projects, particularly those targeting several platforms.
The '.app' directory has been decided on as the solution for a clear separation between developer files and distributable files for the end user.
Media - Directory
In the .app directory GLBasic creates an subdirectory "Media" with a capital "M" for new projects. You should put all files the program is loading into this directory. The files are packed into Apps when creating them, later.
If you want a subdirectory in "Media" be exluded from packing for a certain platform, you can create an empty file "platform.xcl", where "platform" is the specific platform to exclude. You can find a list of precreated xcl files in the samples directory.
The following filenames are supported:
osx.xcl - Mac OSX
gp2x.xcl - GP2X, Wiz, Caanoo
iphone.xcl - iOS
webos.xcl - WebOS, Pixi
How it works
All created (compiled) programs will be put into the "project path/project name.app" directory. If you execute a program, the contents of this directory will be used as the current directory. Thus, for Windows, Linux, Windows mobile and GP2X-Wiz the current directory equals the directory where the executable is.
For Mac OS-X, however, the executable must be in separate a subdirectory. GLBasic automatically creates that for you and copies the executable to the proper place. The ".app" directory will be seen as a "standalone program" in the Finder. This is the same for the iPhone, except that the executable is directly inside the .app folder.
Fron version 10 on, GLBasic creates a <b>distribute</b> directory inside the project directory. For every platform (on Windows only when using "compile, multiplatform") it creates a subdirectory where all you need for that platform is placed nicely for you. The Projectname.app/Media directory is also copied to the right place.
GLBasic tries to create your project as near as possible to ready-to-release state. After the first compilation, in the project directory you will find a file "icon.png". This file is a 24 or 32 bit png image. Alpha information will be used! You can use any size for this image but a square shape is recommended (i.e. equal height and width).
If you now create the program for a certain platform, the icon will be converted to the required format and copied to the right place. Note : that this is only performed if the target (icon) file does not already exist in the .app directory. Thus, you can manually edit the output (icon) file and GLBasic will not overwrite it anymore.
For Windows platforms, there is a special feature. The "icon.png" will be converted to an "icon.ico" file in the project directory. This icon will be appended after each linking. Once an icon has been built, it will no longer be overwritten. In order to update it, you must manually delete it.
Other platforms have the icon somewhere in the "distribute" directory. Again, the icon is not overwritten if it already exists. In order to have GLBasic recreate it from your project directory's "icon.png", delete the file from the "distribute" and rebuild for that platform.