Jump to content

Release Files


A.Russell
 Share

Recommended Posts

I have made a small application with Phaser. How do I distribute it? 

 

I am using Typescript with Visual Studio 2015 CE. 

 

After making a release build I checked the /bin folder, and there is a plugin and a couple of other files I don't know what to do with. 

 

Going to the game's directory and opening the index.html file opens in browser, but the path to the graphics folder is broken, so it runs with no images displayed. 

 

Do I have to manually copy all the needed files into another folder? 

 

The HTML file only references two scripts. Phaser.JS and App.js (since I compiled to single file).

 

Including index.htm, Phaser.js and App.js plus the folder of Sprites doesn't work. 

Link to comment
Share on other sites

Hi, I use MS VS (2013 Community in my case) too. I am combining output into 1 file and for release I am also minifying / uglifying it. Good thing is, that in MS VS you can set it once for project:

 

 - in project properties (right click on project in project explorer, then select Properties or simply Alt+Enter when proj.explorer is focused) in Typescript Build check Combine output to make only 1 .js file for my project. If you want to output it into specific directory, prefix your output filename with path in in this field (not in Redirect output ...) ... at least in MS VS 2013 - looks like bug,

 

 - next thing I do is minifying / uglifying for Release. In MS VS you have Debug / Release configurations. But minifying / uglifying is post-build event and these are common for all configurations. So I had to put this into post-build events:

if $(ConfigurationName) == Release (  uglifyjs ..\js\woodventure.js --compress --mangle --output ..\js\woodventure.js)

 I found, that event runs in bin directory by default. This is reason for path starting with ..\ I am also outputing all code into js directory (along with Phaser engine) so I can then simply take this dir (+ assets, css, icons dirs + index.htm file) and no VS files are mixed in it. Get UglifyJS2 here. There is also simple how to.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...