aargh Posted August 13, 2018 Share Posted August 13, 2018 (edited) Hi This piece of code in the upgrade.usc file will cause the upgrade to end if the file is the same or a later version. The problem is that if the upgrade crashes once, it can never be completed. This is why the assets with version 2.70 remained in the project. Does the SDK browser use the same code to upgrade or does it resolve otherwise? // check version foreach(string data_path; data_paths) { string files[0] = (); if(!findFilesByExt(files, data_path, ".mat|.prop|.node|.cfg|.world|.track|.render|.sound|.physics")) continue; foreach(string file; files) { if(skipFile(data_path, file)) continue; Xml xml = new Xml(); if(!xml.load(file)) { delete xml; continue; } if(xml.getArg("version", "1.00") >= ENGINE_VERSION) { delete xml; log.message("Skip migration to version \"%s\" File:\"%s\"\n", ENGINE_VERSION, file); return; } } } could the upgrade script work as follows? (see attachment) upgrade.usc Edited August 13, 2018 by aargh Link to comment
morbid Posted August 13, 2018 Share Posted August 13, 2018 Our dev team insists that if migration failed for some reasons you need to check the log and fix the asset that stopped the migration process. After that migration should be started over again, it can't be continued. Migrating projects with mixed data (from different SDKs) could lead to an undesired result. 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
aargh Posted August 13, 2018 Author Share Posted August 13, 2018 I understand it, but even if I delete the error, the migration can not continue if there is at least one file already migrated. How to proceed in this case? See code snippet Link to comment
aargh Posted August 13, 2018 Author Share Posted August 13, 2018 if you can not migrate from older versions, why is the migration script written so that it does exactly, but only for one file. Link to comment
morbid Posted August 13, 2018 Share Posted August 13, 2018 40 minutes ago, aargh said: I understand it, but even if I delete the error, the migration can not continue if there is at least one file already migrated Yes, the upgrade script would not continue with half-migrated poject. You'll need to start it over. I've noticed that you attached .usc from 2.7.2 beta. May I ask you what exactly your trying to upgrade? 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
aargh Posted August 13, 2018 Author Share Posted August 13, 2018 this is just an example of script editing. We are migrating to version 2.7.2.2 from version 2.7.1 Link to comment
aargh Posted August 16, 2018 Author Share Posted August 16, 2018 Just to confirm: After the upgrade, all assets have the same version? Or, some may remain in the older version. Link to comment
morbid Posted August 16, 2018 Share Posted August 16, 2018 Hi, after successful upgrade all assets should have the same version. If it's not - upgrade log worth checking. 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
aargh Posted August 16, 2018 Author Share Posted August 16, 2018 Hi thank you for confirmation Link to comment
Recommended Posts