User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19

Thread: Included files in standalone apps

  1. #1
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)

    Included files in standalone apps

    I was thinking back to the days when I used AMOS and remembered a very useful feature it had. Using a set of commands you were able to load data into banks and then back out again at runtime.

    I was wondering if there is a way to include files inside an MMF2 standalone application which could then be saved out at runtime; an example application of this might be a standard set of level files for a game or a default configuration / licence file, should those become deleted from the game directory. Obviously certain extensions do allow you to include data in the compiled standalone, but I cannot see a way to do what I'm asking about.

    If there is no way to do this at present, would this be a particularly complex extension for someone to make? I've had some success with binary appending and NTFS file streams (ADS) to include additional data, but it is far from cross-platform and not always so reliable.

    Any ideas?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Included files in standalone apps

    You can use 2 options for that in MMF2 :

    Include external files

    If this option is selected (in the properties of the application), MMF2 automatically includes in the EXE file all the files that are specified either in object properties, or in action/expression/condition filename parameters where you select the file in a file selector (not in a simple text expression).

    When the application starts, MMF2 extracts all the files to a temporary directory and updates all the filenames in the application. If you want to access one of these files with a simple expression you can use AppTempPath$ + "name of your file".

    Binary files (Data Elements editor)

    If you don't want to include all the external files to your application, or if you want to access them directly from the EXE file, you can add files to the Binary Files tab of the Data Elements editor. These files are included in the EXE file and can be read directly from the EXE by objects that support them (all the Clickteam object + a few ones).

    When an object that support this feature wants to read a file, it asks MMF2 to open it. MMF2 first checks if the pathname is the one of one of the embedded binary files and if so directly opens the EXE file at the position of the embedded file (otherwise it tries to open the file).

    The next build of MMF2 (247) will contain an action that allows to extract an embedded binary file to a temporary file. I guess that's the best solution for you.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCSWF Export Module
    Alonso's Avatar
    Join Date
    Jul 2006
    Posts
    681
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Included files in standalone apps

    Nothing to do with the subject x)
    Hey, Stop =)

  4. #4
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)

    Re: Included files in standalone apps

    Hi Yves,

    thanks for that. Yes, the extract an embedded file feature is exactly what I'm after, that will be great

    Cheers.

  5. #5
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)

    Re: Included files in standalone apps

    Hi Alsonso! How's it going? It's been a long time...

  6. #6
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Included files in standalone apps

    Yves,
    I've had trouble in the past using stored files. One example is ini files. Another is the file that stores the screen capture graphic. I need to run my applications over the network at my school didstrict. They have locked down the computers so there may not be permissions for many users to most directories on their machine's hard drive. Is the AppTempPath$ a path that users typically or always have permission to write to? Any more infor on how this network / permission stuff works would be appreciated, since I'm still confused by it all and how to make my applications work using it.
    Thansk in advance,
    Steve

  7. #7
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Included files in standalone apps

    Is the AppTempPath$ a path that users typically or always have permission to write to?
    Yes, files in the Windows temporary directory can be written by any user. However files in this directory are removed as soon as the application exits. If you need to store files for each user you can store them in a sub-directory of the user's application data directory (you can retrieve the pathname of this directory with an expression of the File object).

  8. #8
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Included files in standalone apps

    Yves,

    Thanks for the info.

    Let's see if I understand this. On each user's machine, under his user name, each application has a data directory where it can store files? So I found the following path for MMF2:
    C:\Documents and Settings\Stephen\Application Data\Clickteam\MMF2 Developer

    Is this directory automatically created when an application is opened or do I have to create it? And what syntax would be needed to retrive this pathname from the File object?

    Steve

  9. #9
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,022
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)

    Re: Included files in standalone apps

    On each user's machine, under his user name, each application has a data directory where it can store files?
    Correct.

    You have to create yourself your own subdirectory in the app data directory (the Clickteam\MMF2 Developer directory is created by MMF2).

    No idea about the syntax, just take a look at the expressions of the File object.

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Included files in standalone apps

    With that next build's feature, what if i had an extension that relies on an external dll, can you embed and extract that dll without the exe crashing?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. MMF won't read music files included with mmf?
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th November 2008, 07:50 PM
  2. Movie files included in the exe file?
    By Solidghost in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th February 2008, 02:26 PM
  3. creating executables with all files included
    By Jason in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 16th March 2007, 10:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •