Changeset 13958


Ignore:
Timestamp:
Nov 5, 2019 4:48:09 PM (2 weeks ago)
Author:
mjohnsson
Message:

Check sum of files. mj-2630

Location:
branches/dev-mj-2630/Compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-mj-2630/Compiler/ModelicaCompiler/src/jastadd/ModelicaCompiler.jrag

    r13954 r13958  
    13701370        fc.guidManager().setSourceFile(new File(outDir, "modelDescription.xml"));
    13711371        fc.guidManager().processDependentFiles();
    1372        
     1372        fc.guidManager().writeFileMD5(log);
    13731373        log.debug("... code generated.");
    13741374        ASTNode.endStep("generateCode()");
  • branches/dev-mj-2630/Compiler/ModelicaFrontEnd/src/java/org/jmodelica/common/GUIDManager.java

    r13954 r13958  
    9090        dependentFiles.add(new StringOpenable(input, output));
    9191    }
     92   
     93    public ArrayList<String> filesMd5 = new ArrayList<String>();
     94
     95    public void writeFileMD5(ModelicaLogger log) {
     96        for (String fileMd5 : filesMd5) {
     97            log.debug(fileMd5);
     98        }
     99    }
    92100
    93101    public void createFileMD5(File file, File outDirectory, ModelicaLogger log) throws IOException {
     
    111119        try (final FileWriter fw = new FileWriter(outDirectory)) {
    112120            String Value = new BigInteger(1,md5.digest()).toString(16);
    113             log.debug("CheckSum of " + file.getName() + " :" + Value);
    114             fw.write("CheckSum of " + file.getName() + " :" + Value);
    115            
     121            filesMd5.add("CheckSum of " + file.getName() + " :" + Value);
     122            fw.append("CheckSum of " + file.getName() + " :" + Value);
    116123        }
    117124    }
Note: See TracChangeset for help on using the changeset viewer.