Merge krpano sources into one file

  • Subj.

    I have 30 separate files with code in a project.
    I'd like to have a tool to merge all files in one before encrypting and uploading.
    Does anyone have experience in that?

  • You can easily do that in php for example.

    You can execute that php directly on your computer without a server.
    If you would like some custom code or any further feature here, please direct message me

  • Same, solution is here, but tough thing is to manage includes and relative paths, %SWFPATH%, %FIRSTXML%, etc...

    I personally work with simplexml_load_file, with 2 args to replace %SWFPATH% and %FIRSTXML% on the go


    quite a pain, but working fine for our specific architecture.

    Result is clear :
    before : 120 files for a 12 seconds average load time
    after : 1 file in < 1sec load time

    Code is not really shareable as it really depends on folder structure and wouldn't work anywhere else but on our repositories.

    Cheers

  • Hi, the typical file structure (html5) generated from a krpano droplet is:

    folders:
    panos
    plugins
    skin


    files:
    tour.html
    tour.js
    tour.xml

    Then in this example,
    How to merge all above in one file?, for example index.html or index.php

    Then any browser would be load it without local server (offline)?
    If yes,
    How to make it from windows 10?
    Which requirements?

    Thanks in advanced.
    Fdo.

  • Same, solution is here, but tough thing is to manage includes and relative paths, %SWFPATH%, %FIRSTXML%, etc...

    I personally work with simplexml_load_file, with 2 args to replace %SWFPATH% and %FIRSTXML% on the go

    Ouch
    I use a lot of tricks, including initvars, folder structure, relative paths, js and a bit of php... This also helps to fix path issues.
    I never use macro substitutions because they make code less clear and their values can not be obtained

    I don't even know where to start, maybe make a repo first

    Fernando, we talk a different thing.
    Tour can not be 'compressed' to single html/php file. It won't make sense

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!