CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Tue Aug 22, 2017 6:22 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Aug 01, 2017 1:21 pm 
Offline
User avatar

Joined: Mon Jan 16, 2017 3:10 pm
Posts: 1
How can a library project save as compiled library?

A little example for whah I have so far:
Code:
# Pythonscript to create compiled library from SVN Repro
from __future__ import print_function

import os
import glob

# Path for temporary files
tmppath = "D:\\tmp\\CodesysTMP\\"
print("TMP Path",projectpath);

#Checkout form SVN
URL = "https://xxx";
proj = svn.checkout(URL, projectpath, "xxx", as_library=True);

#Clean and build
projects.primary.clean_all();
projects.primary.check_all_pool_objects();

#Create Boot Application
app.create_boot_application("D:\\tmp\bootapp.wrp");

#Save compiled Library
#????

#Close and Delete
proj.close();

files = glob.glob("D:\\tmp\\CodesysTMP\\*");
for f in files:
    os.remove(f)

print("DONE");


Thanks


Top
   
PostPosted: Tue Aug 01, 2017 2:38 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 203
Hi feragfh6.

Code:
project.save_as_compiled_library(destination_name)

Save the current project as a compiled library. (This command currently only works for the primary project.)

Note:
The destination_name has the following semantics: If it is omitted or the empty string, the full project path will be used, with the extension changed to ”.compiled_library”. If the name of an existing directory is given, the library will be saved there, using the project base name and the extension changed to ”.compiled_library”. Otherwise, the destination name will be interpreted as the path relative to where the current project is.

BR
Martin

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited