Jump to content

upgrade script problem


photo

Recommended Posts

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 by aargh
Link to comment

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:

Link to comment

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
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:

Link to comment
×
×
  • Create New...