Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2009
    Posts
    172

    BUG: rename resource files

    Hi

    If build the proyect with rename resource files and get to copy one image of other folther... this not work.

    Exmaple:

    File.Copy(_SourceFolder.."\\Autoplay\\Images\\imag e.ico", _SourceFolder, ...)

    This copy ap16.dat NOT image.ico.

  2. #2
    Join Date
    Aug 2009
    Location
    Cairo, Egypt
    Posts
    107
    autoplay media studio encrypt all data files you put in autoplay folder during design time for example if you have an image name as previous it will be automatically renamed to ( ap x.dat ) while x is the number of the resource while all other resources will be transformed to this extension as well including Video and Audio folders but not Docs folder, Scripts folder or Plugins folder ,,,
    But you can overcome this by two ways ( maybe there's more but it's only what i know about ):
    1* Put such a data :that you will nedd to copy during runtime after building the project in a folder outside the autoplay media studio folder for ex :
    Code:
    _SourceFolder.."Images\\Imagee.ico"
    and the won't be transformed during building procces
    2* During building wizard uncheck the option Encrypt .............
    and it will do the same

  3. #3
    Join Date
    Jan 2009
    Posts
    172
    No, sorry... this work in AMS7.5.

    This is a bug of AMS8.

  4. #4
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943
    Hi Tomasin,

    I have a question regarding this: in your example is ap16.dat the renamed image.ico file? Does the image.ico exist? Is it part of your renamed resource files?

    Perhaps you could post a sample project that shows this.

    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

  5. #5
    Join Date
    Jan 2009
    Posts
    172
    Proyect not compiled:

    Exist this file:

    Autoplay\images\image.ico

    Proyect compiled (renaming resource files).

    get to copy Autoplay\images\image.ico to other folder

    >> this action copy ap16.dat, not rename correctly to image.ico.

  6. #6
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    This is documented in the help file and it is not a bug:
    If a resource file path is composed of variables that are concatenated together to form a path to a resource file, the file may not be found.
    You should use
    Code:
    File.Copy("AutoPlay\\Images\\image.ico", ...
    Ulrich

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    Tomasin is right

    i put a image on the page and used its direct path in the File.Copy action, renamed "AutoPlay" folder to "Data" when i compiled and it copied "ap3.dat" to my desktop!

    i changed the extension and the image file is intact, it seems that AMS is not renaming the file after its extracted

    see my example, compile the project and click the button
    Open your eyes to Narcissism, Don't let her destroy your life!!

  8. #8
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    You should use
    Code:
    File.Copy("AutoPlay\\Images\\630A01257.jpg", _TempFolder.."\\630A01257.jpg", true, true, false, true, nil);
    in this case, as the original filename is kept nowhere...

    Ulrich

  9. #9
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943
    Hi Everyone,

    As far as I can tell this is all by design. Basically what is happening is the file: Image.ico is being renamed to ap16.dat in the images folder. And during the rename process the action:

    Code:
    File.Copy(_SourceFolder.."\\Autoplay\\Images\\image.ico", _SourceFolder, ...)
    Is being changed to:

    Code:
    File.Copy(_SourceFolder.."\\data\\ap16.dat", _SourceFolder, ...)
    Because if it was not, then it would fail, since image.ico no longer exists.

    As Ulrich said if you want the original filename in your destination use:

    Code:
    File.Copy(_SourceFolder.."\\Autoplay\\Images\\image.ico", _DestinationFolder.."\\image.ico", ...)
    mark.
    MSI Factory The Next Generation Intelligent Setup Builder

  10. #10
    Join Date
    May 2006
    Posts
    5,380
    Of Course....... ignore me, its been a long hard day, i only ran a quick test and dident think of adding the actual output filename, it does in fact make perfect scene, now id better get some sleep before i go making another amateur bloomer!
    Open your eyes to Narcissism, Don't let her destroy your life!!

  11. #11
    Join Date
    Jan 2009
    Posts
    172
    Aja

    File.Copy(_SourceFolder.."\\Autoplay\\Images\\imag e.ico", _DestinationFolder.."\\image.ico", ...)
    This is the problem sorry

    Thanks to all

Posting Permissions

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