danni.coy Posted May 17, 2013 Share Posted May 17, 2013 I am trying to use system() along side ung to export out a project and compress it. The following line on Linux works brilliantly cd /path/to/current/unigine/project/data/; ung -o /path/to/issued/unigine/project/data/core.ung -d core where ung_x64 has been renamed to ung and put in my path on windows I tried cd C:\\Path\\to\\current\\unigine\\project\\data\\ & ung.exe -o C:\\Path\\to\\issued\\unigine\\project\\data\\core.ung -o core as it seems to get ung to address files correctly in the archive it needs to be run from inside data. Anybody have any ideas on what I can do about this? Link to comment
silent Posted May 17, 2013 Share Posted May 17, 2013 Hi, You can try to put ung tool inside your project directory (before data folder) and run following commad: ung -d data\core -o core.ung This command will generate ung archieve with contents of data\core. If you run ung -e core.ung it will unpack files to the data\core folder. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
danni.coy Posted May 20, 2013 Author Share Posted May 20, 2013 I will need to store the ung files in the base folder right? Will these be picked up when the engine runs? ok I will run with that for the moment. But I would still like to know if I can achieve the above Link to comment
silent Posted May 21, 2013 Share Posted May 21, 2013 I will need to store the ung files in the base folder right? If you add ung tool to the PATH variable you will not need to copy it everytime. Just run same command from the desired directory: cd C:\project\dir & ung -d data\core -o core.ung As a result core.ung file will be generated at C:\project\dir\core.ung with contents of C:\project\dir\data\core folder. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
danni.coy Posted May 22, 2013 Author Share Posted May 22, 2013 If you add ung tool to the PATH variable you will not need to copy it everytime. Just run same command from the desired directory: cd C:\project\dir & ung -d data\core -o core.ung I have ung in my path -> this is precisely the command line that isn't working for me under windows at the moment. The equivelent command under windows works fine It's worth noting that the command works fine from a terminal window but not from the system() call Link to comment
silent Posted May 22, 2013 Share Posted May 22, 2013 Hi, I've tried the same with system(): system("cmd.exe /k \"cd /d C:/path/to/data/dir & ung -d data/core -o core.ung\""); And it's worked just fine. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
danni.coy Posted May 22, 2013 Author Share Posted May 22, 2013 thankyou - that was exactly the sort of thing I was looking for Link to comment
danni.coy Posted May 23, 2013 Author Share Posted May 23, 2013 I take that back still not working for me system("cmd.exe /k \"cd /d C:/path/to/data/dir & dir\"");[\code] gives me a directory listing from the bin folder Link to comment
silent Posted May 23, 2013 Share Posted May 23, 2013 What version of windows are you using? Did you try to replace "&" with "&&"? Also, it would be good to know full path to your data dir - does it contains unicode symbols or spaces? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
danni.coy Posted May 23, 2013 Author Share Posted May 23, 2013 sorry found issue - almost there... probably one more question coming up Link to comment
danni.coy Posted May 23, 2013 Author Share Posted May 23, 2013 ok so running /c rather than /k is needed otherwise unigine hangs. Its all definately working now thankyou Link to comment
Recommended Posts