Commit efc197e5 authored by Claes Sjofors's avatar Claes Sjofors

Wb function to build directory, import and export

parent b18698e1
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_applexport.wb_load -- Defines the class ApplExport.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures export of applications.
! The ApplExport object configures export of files to other projects.
!
! One ApplExport object causes one or several files (with wildcard
! specification) to be copied from the development project environment
! to a directory where it is available for other projects.
!
! The object reside in the project volume beneath an Export object.
!
! The distribution is carried out when Export in the configurator men
! is activated.
!
! @b See also
! @classlink Export pwrb_export.html
!*/
Object ApplExport $ClassDef 624
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! @Summary Source file specification.
! Source file specification.
! The asterisk (*) wild card character can be used in the file
! specification.
!
! Example
! $pwrp_load/*.flw
!*/
Object Source $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! @Summary Target file specification.
! Target file specification.
! Should only be supplied if the target path or filename differs
! from the source.
!*/
Object Target $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_applimport.wb_load -- Defines the class ApplImport.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures import of applications.
! The ApplImport object configures import of files from other projects.
!
! One ApplImport object causes one or several files (with wildcard
! specification) to be copied from the import directory to the project.
!
! The object reside in the project volume beneath an Import object.
!
! The import is carried out when Import in the configurator men
! is activated.
!
! @b See also
! @classlink Import pwrb_import.html
!*/
Object ApplImport $ClassDef 626
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! @Summary Source file specification.
! Source file specification.
! The asterisk (*) wild card character can be used in the file
! specification.
!
! Example
! *.flw
!*/
Object Source $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! @Summary Target file specification.
! Target file specification.
! Only the path to the target has to be specified.
!*/
Object Target $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_buildconfig.wb_load -- Defines the class BuildConfig.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfig
! @Summary Build configuration root object.
! The BuildConfig is the root object for the build configuration.
!
! @b See also
! @classlink BuildDirectory pwrb_builddirectory.html
! @classlink BuildCopy pwrb_buildcopy.html
! @classlink BuildExecute pwrb_buildexecute.html
!*/
Object BuildConfig $ClassDef 630
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
Attr Flags |= pwr_mClassDef_TopObject
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_buildcopy.wb_load -- Defines the class BuildCopy.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures export of applications.
! The ApplExport object configures export of files to other projects.
!
! One ApplExport object causes one or several files (with wildcard
! specification) to be copied from a directory in the src tree to the
! bld tree.
!
! The object reside in the project volume beneath an BuildDirectory object.
!
! The distribution is carried out when Build Project in the configurator menu
! is activated.
!
! @b See also
! @classlink BuildConfig pwrb_buildconfig.html
! @classlink BuildDirectory pwrb_builddirectory.html
! @classlink BuildExecute pwrb_buildexecute.html
!*/
Object BuildCopy $ClassDef 628
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! @Summary Source file specification.
! Source file specification.
! The asterisk (*) wild card character can be used in the file
! specification.
!
! Example
! $pwrp_load/*.flw
!*/
Object Source $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Target file specification.
! Only the path need to be specified.
!*/
Object Target $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_builddirectory.wb_load -- Defines the class BuildDirectory.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures build of a directory.
! The BuildDirectory object configures build of a directory.
!
! @b See also
! @classlink BuildConfig pwrb_buildconfig.html
! @classlink BuildCopy pwrb_buildcopy.html
! @classlink BuildExecute pwrb_buildexecute.html
!*/
Object BuildDirectory $ClassDef 627
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Directory specification.
!
! Example
! $pwrp_pop
!*/
Object Directory $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String256"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_buildexecute.wb_load -- Defines the class BuildExecute.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures build actions with shell commands.
! The ApplExport object configures build actions performed with shell commands,
! for example executing make files or shell scripts.
!
! The object reside in the project volume beneath an BuildDirectory object.
!
! The distribution is carried out when Build Project in the configurator men
! is activated.
!
! @b See also
! @classlink BuildConfig pwrb_buildconfig.html
! @classlink BuildDirectory pwrb_builddirectory.html
! @classlink BuildCopy pwrb_buildcopy.html
!*/
Object BuildExecute $ClassDef 629
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Shell command that is executed when the directory is built.
!
! Example
! make
!*/
Object Command $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_export.wb_load -- Defines the class Export.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures export of files to other projects.
! The Export object configures export of files from the
! project to other projects in the development environment.
!
! The object reside in the project volume beneath a NodeConfig object.
!
! The collected files are specified in the Components attribute, which is
! a bitmask.
!
! Description of the bits in Compontents:
!
! @b LoadFiles
! Loadfiles are included, i.e.
! - loadfiles for volumes configured with RootVolumeLoad, SubVolumeLoad
! and ClassVolumeLoad objects, and volumes referenced by these volumes,
! - rtt crossreference files.
! @b GraphFiles
! All Ge graph files $pwrp_exe/*.pwg are included.
! @b FlowFiles
! The plc trace files $pwrp_load/*.flw are included.
!
! Other files can be included with an ApplExport object.
!
! @b See also
! @classlink ApplExport pwrb_applexport.html
!*/
Object Export $ClassDef 623
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Export directory.
! The files specified for export are copied to a directory
! from where they can be imported by other projects.
!*/
Object TargetDirectory $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String256"
EndBody
EndObject
!/**
! @Summary Specification of components included in the export.
! Specification of components that are included in the export.
!*/
Object Components $Attribute 3
Body SysBody
Attr TypeRef = "pwrb:Type-ExportImportMask"
EndBody
EndObject
EndObject
Object Template Export
Body DevBody
Attr TargetDirectory = "/usr/local/pwrp/common"
Attr Components = 15
EndBody
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_import.wb_load -- Defines the class Import.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures import of files from other projects.
! The Import object configures import of files from the
! project from other projects in the development environment.
!
! The object reside in the project volume beneath the $System object.
!
! The collected files are specified in the Components attribute, which is
! a bitmask.
!
! Description of the bits in Compontents:
!
! @b LoadFiles
! Loadfiles are included, i.e.
! - loadfiles for volumes configured with RootVolumeLoad, SubVolumeLoad
! and ClassVolumeLoad objects, and volumes referenced by these volumes,
! - rtt crossreference files.
! @b GraphFiles
! All Ge graph files $pwrp_exe/*.pwg are included.
! @b FlowFiles
! The plc trace files $pwrp_load/*.flw are included.
!
! Other files can be included with an ApplImport object.
!
! @b See also
! @classlink ApplImport pwrb_applimport.html
!*/
Object Import $ClassDef 625
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Import directory.
! Directory from which files should be imported.
!*/
Object SourceDirectory $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String256"
EndBody
EndObject
!/**
! @Summary Specification of components included in the import.
! Specification of components that are included in the import.
!*/
Object Components $Attribute 3
Body SysBody
Attr TypeRef = "pwrb:Type-ExportImportMask"
EndBody
EndObject
EndObject
Object Template Import
Body DevBody
Attr SourceDirectory = "/usr/local/pwrp/common"
Attr Components = 15
EndBody
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! This program is free software; you can redistribute it and/or
! modify it under the terms of the GNU General Public License as
! published by the Free Software Foundation, either version 2 of
! the License, or (at your option) any later version.
!
! This program is distributed in the hope that it will be useful
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_td_exportimportmask.wb_load -- Defines the mask type ExportImportMask
!
SObject pwrb:Type
!/**
! @Version 1.0
! @Group Types
! Defines mask for export and import.
!*/
Object ExportImportMask $TypeDef 76
Body SysBody
Attr TypeRef = "pwrs:Type-$Mask"
Attr PgmName = "ExportImportMask"
EndBody
!/**
! Loadfiles are included, i.e.
! - loadfiles for volumes configured with RootVolumeLoad, SubVolumeLoad
! and ClassVolumeLoad objects, and volumes referenced by these volumes,
! - rtt crossreference files.
!*/
Object LoadFiles $Bit
Body SysBody
Attr PgmName = "LoadFiles"
Attr Text = "LoadFiles"
Attr Value = 1
EndBody
EndObject
!/**
! All includefiles in $pwrp_inc are exported or imported.
!*/
Object IncludeFiles $Bit
Body SysBody
Attr PgmName = "IncludeFiles"
Attr Text = "IncludeFiles"
Attr Value = 2
EndBody
EndObject
!/**
! All Ge graph files $pwrp_exe/*.pwg are exported or imported.
!*/
Object GraphFiles $Bit
Body SysBody
Attr PgmName = "GraphFiles"
Attr Text = "GraphFiles"
Attr Value = 4
EndBody
EndObject
!/**
! The plc trace files $pwrp_load/*.flw are exported or imported.
!*/
Object FlowFiles $Bit
Body SysBody
Attr PgmName = "FlowFiles"
Attr Text = "FlowFiles"
Attr Value = 8
EndBody
EndObject
EndObject
EndSObject
......@@ -602,6 +602,7 @@ topobjects ProjectNavigatorW2
class FriendNodeConfig
class SevNodeConfig
class BusConfig
class BuildConfig
}
palette ProjectNavigatorPalette
......@@ -639,6 +640,20 @@ palette ProjectNavigatorPalette
class SharedVolumeLoad
class SubVolumeLoad
class $System
menu Build
{
class BuildConfig
class BuildDirectory
class BuildCopy
class BuildExecute
}
menu Export/Import
{
class ApplExport
class ApplImport
class Export
class Import
}
}
}
......
This diff is collapsed.
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expw_gtk_h
#define wb_expw_gtk_h
/* wb_expw_gtk.h -- Backupfile display window */
#ifndef wb_expw_h
# include "wb_expw.h"
#endif
#ifndef cow_wow_gtk_h
# include "cow_wow_gtk.h"
#endif
#include <gtk/gtk.h>
class WbExpWGtk : public WbExpW {
public:
WbExpWGtk(
void *l_parent_ctx,
GtkWidget *l_parent_wid,
ldh_tSession l_ldhses,
const char *l_name,
int type,
int l_editmode,
pwr_tStatus *status);
~WbExpWGtk();
GtkWidget *parent_wid;
GtkWidget *toplevel;
GtkWidget *form;
GtkWidget *nav_widget;
GtkWidget *edit_check_all;
GtkWidget *edit_check_clear;
GtkWidget *edit_check_reset;
GtkWidget *edit_show_all;
GtkWidget *file_export;
CoWowFocusTimerGtk focustimer;
CoWowFocusTimerGtk maptimer;
void print();
void set_title( char *title);
static gboolean action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data);
static void activate_exit( GtkWidget *w, gpointer data);
static void activate_export( GtkWidget *w, gpointer data);
static void activate_update( GtkWidget *w, gpointer data);
static void activate_check_all( GtkWidget *w, gpointer data);
static void activate_check_clear( GtkWidget *w, gpointer data);
static void activate_check_reset( GtkWidget *w, gpointer data);
static void activate_show_all(GtkWidget *w, gpointer data);
static void activate_zoom_in( GtkWidget *w, gpointer data);
static void activate_zoom_out( GtkWidget *w, gpointer data);
static void activate_zoom_reset( GtkWidget *w, gpointer data);
static void activate_help( GtkWidget *w, gpointer data);
};
#endif
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
/* wb_expwnav_gtk.cpp -- Backupfile display window */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_dcli.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "flow_browwidget_gtk.h"
#include "wb_ldh.h"
#include "wb_expwnav_gtk.h"
WbExpWNavGtk::WbExpWNavGtk (
void *l_parent_ctx,
GtkWidget *l_parent_wid,
ldh_tSession l_ldhses,
int l_type,
int l_editmode,
GtkWidget **w) :
WbExpWNav( l_parent_ctx, l_ldhses, l_type, l_editmode), parent_wid(l_parent_wid)
{
form_widget = scrolledbrowwidgetgtk_new(
WbExpWNav::init_brow_cb, this, &brow_widget);
gtk_widget_show_all( brow_widget);
// Create the root item
*w = form_widget;
}
//
// Delete ev
//
WbExpWNavGtk::~WbExpWNavGtk()
{
delete brow;
gtk_widget_destroy( form_widget);
}
void WbExpWNavGtk::set_input_focus()
{
gtk_widget_grab_focus( brow_widget);
}
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expwnav_gtk_h
#define wb_expwnav_gtk_h
/* wb_expwnav_gtk.h -- Backup display window */
#ifndef wb_expwnav_h
# include "wb_expwnav.h"
#endif
class WbExpWNavGtk : public WbExpWNav {
public:
WbExpWNavGtk(
void *expw_parent_ctx,
GtkWidget *expw_parent_wid,
ldh_tSession expw_ldhses,
int l_type,
int l_editmode,
GtkWidget **w);
~WbExpWNavGtk();
GtkWidget *parent_wid;
GtkWidget *brow_widget;
GtkWidget *form_widget;
GtkWidget *toplevel;
void set_input_focus();
};
#endif
......@@ -72,6 +72,7 @@ extern "C" {
#include "wb_utl_gtk.h"
#include "wb_xcrr_gtk.h"
#include "wb_bckw_gtk.h"
#include "wb_expw_gtk.h"
#define max(Dragon,Eagle) ((Dragon) > (Eagle) ? (Dragon) : (Eagle))
#define min(Dragon,Eagle) ((Dragon) < (Eagle) ? (Dragon) : (Eagle))
......@@ -476,65 +477,20 @@ WbBckW *WNavGtk::bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status)
return new WbBckWGtk( this, parent_wid, ldhses, name, list, editmode, status);
}
void WNavGtk::wge_subwindow_loop( WGe *wge)
WbExpW *WNavGtk::expw_new( char *name, int type, pwr_tStatus *status)
{
gtk_main();
#if 0
XEvent Event;
for (;;) {
XtAppNextEvent( XtWidgetToApplicationContext( parent_wid), &Event);
XtDispatchEvent( &Event);
if ( wge->subwindow_release) {
wge->subwindow_release = 0;
break;
}
}
#endif
return new WbExpWGtk( this, parent_wid, ldhses, name, type, 1, status);
}
void WNavGtk::wge_modal_loop( WGe *wge)
void WNavGtk::wge_subwindow_loop( WGe *wge)
{
gtk_main();
#if 0
XEvent Event;
for (;;) {
XtAppNextEvent( XtWidgetToApplicationContext( parent_wid), &Event);
XtDispatchEvent( &Event);
if ( wge->terminated) {
appl.remove( (void *)wge);
delete wge;
break;
}
}
#endif
}
#if 0
static char *wnav_dialog_convert_text( char *text)
void WNavGtk::wge_modal_loop( WGe *wge)
{
char *s, *t;
static char new_text[200];
for ( s = text, t = new_text; *s; s++, t++)
{
if ( *s == '\\' && *(s+1) == 'n')
{
*t = 10;
s++;
}
else
*t = *s;
if ( t > &new_text[sizeof(new_text)-1])
break;
}
*t = *s;
return new_text;
gtk_main();
}
#endif
static void wnav_message_dialog_ok( GtkWidget *w, gint arg1, gpointer wnav)
{
......
......@@ -97,6 +97,7 @@ class WNavGtk : public WNav {
void (* bc_success)( void *), void (* bc_cancel)( void *), pwr_tStatus *status);
WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status);
WbBckW *bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status);
WbExpW *expw_new( char *name, int type, pwr_tStatus *status);
static void trace_scan( WNavGtk *wnav);
static void sel_lose_cb( GtkWidget *w, GdkEventSelection *event,
......
This diff is collapsed.
......@@ -112,6 +112,9 @@ class WttGtk : public Wtt {
GtkWidget *menu_buildobject_w;
GtkWidget *menu_buildvolume_w;
GtkWidget *menu_buildnode_w;
GtkWidget *menu_buildproject_w;
GtkWidget *menu_buildexport_w;
GtkWidget *menu_buildimport_w;
GtkWidget *menu_distribute_w;
GtkWidget *menu_change_value_w;
GtkWidget *menu_edit_w;
......@@ -237,6 +240,9 @@ class WttGtk : public Wtt {
static void activate_openclasseditor( GtkWidget *w, gpointer data);
static void activate_buildvolume( GtkWidget *w, gpointer data);
static void activate_buildnode( GtkWidget *w, gpointer data);
static void activate_buildproject( GtkWidget *w, gpointer data);
static void activate_buildimport( GtkWidget *w, gpointer data);
static void activate_buildexport( GtkWidget *w, gpointer data);
static void activate_distribute( GtkWidget *w, gpointer data);
static void activate_showcrossref( GtkWidget *w, gpointer data);
static void activate_updateclasses( GtkWidget *w, gpointer data);
......
......@@ -1413,4 +1413,101 @@ void wb_build::classdef( pwr_tOid oid)
}
void wb_build::project( char *dir)
{
pwr_tFileName fname;
char line[400];
char line_item[4][250];
pwr_tFileName found_file;
int num;
int sts;
pwr_tCmd cmd;
dcli_translate_filename( fname, load_cNameDistribute);
ifstream is( fname);
while ( is.getline( line, sizeof(line))) {
dcli_trim( line, line);
if ( line[0] == '#' || line[0] == '!')
continue;
num = dcli_parse( line, " ", "", (char *)line_item,
sizeof(line_item)/sizeof(line_item[0]),
sizeof(line_item[0]), 0);
if ( !num)
continue;
if ( dir && strncmp( dir, line_item[1], strlen(dir)) != 0)
continue;
if ( strcmp( cdh_Low(line_item[0]), "buildcopy") == 0) {
if ( num != 4) {
printf("File corrupt " load_cNameDistribute);
continue;
}
for ( sts = dcli_search_file( line_item[2], found_file, DCLI_DIR_SEARCH_INIT);
ODD(sts);
sts = dcli_search_file( line_item[2], found_file, DCLI_DIR_SEARCH_NEXT)) {
// Check if file should be updated
int update = 0;
pwr_tFileName source, target;
pwr_tTime source_time, target_time;
strncpy( source, found_file, sizeof(source));
strncpy( target, line_item[3], sizeof(target));
sts = dcli_file_time( source, &source_time);
if ( target[strlen(target)-1] == '/') {
// Target is a directory, add file name
char *s = strrchr( source, '/');
if ( !s)
strncat( target, source, sizeof(target));
else
strncat( target, s+1, sizeof(target));
}
dcli_translate_filename( target, target);
sts = dcli_file_time( target, &target_time);
if ( ODD(sts) && time_Acomp( &source_time, &target_time) != 1)
update = 0;
else
update = 1;
if ( !opt.force && !update)
continue;
sprintf( cmd, "cp -a %s %s", source, target);
// system( cmd);
sprintf( cmd, "Build: %s %s -> %s", line_item[1], source, target);
MsgWindow::message( 'I', cmd, msgw_ePop_No);
// wb_log::log( wlog_eCategory_GeBuild, name, 0);
m_sts = PWRB__SUCCESS;
}
dcli_search_file( line_item[1], found_file, DCLI_DIR_SEARCH_END);
}
else if ( strcmp( cdh_Low(line_item[0]), "buildexec") == 0) {
if ( num != 4) {
printf("File corrupt " load_cNameDistribute);
continue;
}
sprintf( cmd, "cd %s;%s", line_item[2], line_item[3]);
// system( cmd);
sprintf( cmd, "Build: executed %s %s", line_item[2], line_item[3]);
MsgWindow::message( 'I', cmd, msgw_ePop_No);
// wb_log::log( wlog_eCategory_GeBuild, name, 0);
m_sts = PWRB__SUCCESS;
}
}
is.close();
}
......@@ -66,6 +66,7 @@ class wb_build : public wb_status
void appgraph( pwr_tOid oid);
void application( pwr_tOid oid);
void classdef( pwr_tOid oid);
void project( char *dir);
wb_build_opt opt;
wb_session m_session;
......
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
/* wb_bckw.cpp -- Backupfile display window */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_dcli.h"
#include "co_lng.h"
#include "cow_xhelp.h"
#include "cow_wow.h"
#include "wb_ldh.h"
#include "wb_expw.h"
WbExpW::WbExpW(
void *l_parent_ctx,
ldh_tSesContext l_ldhses,
const char *expw_name,
int l_type,
int l_editmode,
pwr_tStatus *status) :
parent_ctx(l_parent_ctx), ldhses(l_ldhses), expwnav(NULL),
size(0), max_size(500), type(l_type), editmode(l_editmode), wow(0)
{
*status = 1;
strcpy( name, expw_name);
if ( type == expw_eType_Export) {
strcpy( action, "Export files");
strcpy( btext, "_Export files");
strcpy( typetext, "export");
}
else if ( type == expw_eType_Import) {
strcpy( action, "Import files");
strcpy( btext, "_Import files");
strcpy( typetext, "import");
}
else if ( type == expw_eType_BuildProject) {
strcpy( action, "Build Project");
strcpy( btext, "_Build Project");
strcpy( typetext, "build");
}
}
WbExpW::~WbExpW() {
}
void WbExpW::show()
{
expwnav->show();
}
void WbExpW::activate_export()
{
char text[80];
sprintf( text, "Do you want to %s to marked files", typetext);
wow->DisplayQuestion( this, action, text,
export_ok, 0, 0);
}
void WbExpW::export_ok( void *ctx, void *data)
{
WbExpW *expw = (WbExpW *)ctx;
expw->expwnav->exp();
}
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expw_h
#define wb_expw_h
/* wb_expw.h -- Backupfile display window */
#ifndef pwr_h
# include "pwr.h"
#endif
#ifndef wb_bck_h
# include "wb_bck.h"
#endif
#ifndef wb_expwnav_h
# include "wb_expwnav.h"
#endif
class CoWow;
class CoWowFocusTimer;
#include "cow_wow.h"
class WbExpW {
public:
WbExpW(
void *l_parent_ctx,
ldh_tSesContext l_ldhses,
const char *expw_name,
int l_type,
int l_editmode,
pwr_tStatus *status);
~WbExpW();
virtual void set_title( char *title) {}
void show();
void activate_export();
void activate_update() { expwnav->show();}
void activate_check_all() { expwnav->check_all();}
void activate_check_clear() { expwnav->check_clear();}
void activate_check_reset() { expwnav->check_reset();}
static void export_ok( void *ctx, void *data);
void *parent_ctx;
ldh_tSesContext ldhses;
char name[80];
char action[20];
char btext[20];
char typetext[20];
WbExpWNav *expwnav;
int size;
int max_size;
int type;
int editmode;
CoWow *wow;
};
#endif
This diff is collapsed.
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expwnav_h
#define wb_expwnav_h
/* wb_expwnav.h -- Backupfile display window */
#ifndef pwr_h
# include "pwr.h"
#endif
#ifndef flow_h
#include "flow.h"
#endif
#ifndef flow_browctx_h
#include "flow_browctx.h"
#endif
#ifndef flow_browapi_h
#include "flow_browapi.h"
#endif
#ifndef wb_bck_h
#include "wb_bck.h"
#endif
typedef enum {
expw_mOpen_All = ~0,
expw_mOpen_Children = 1 << 0,
} expw_mOpen;
typedef enum {
expw_eType_Export,
expw_eType_Import,
expw_eType_BuildProject
} expw_eType;
typedef enum {
expwitem_eItemType_Exp,
expwitem_eItemType_Dir
} expwitem_eItemType;
typedef enum {
expw_eListType_Dir,
expw_eListType_Copy,
expw_eListType_Exec,
} expw_eListType;
class ExpWList {
public:
int update;
ExpWList() : update(0) {}
};
class ExpWCopy : public ExpWList {
public:
ExpWCopy *next;
ExpWCopy *prev;
pwr_tFileName source;
pwr_tFileName target;
ExpWCopy() : next(0), prev(0) {}
};
class ExpWExec : public ExpWList {
public:
ExpWExec *next;
ExpWExec *prev;
pwr_tCmd command;
pwr_tFileName dir;
ExpWExec() : next(0), prev(0) {}
};
class ExpWDir : public ExpWList {
public:
ExpWDir *next;
ExpWDir *prev;
ExpWCopy *copylist;
ExpWExec *execlist;
int open;
char name[80];
char description[80];
ExpWDir() : next(0), prev(0), copylist(0), execlist(0), open(0) {}
ExpWCopy *copy_insert( char *source, char *target, int update);
ExpWExec *exec_insert( char *dir, char *command, int update);
};
class WbExpWNavBrow {
public:
WbExpWNavBrow( BrowCtx *brow_ctx, void *lwnav) : ctx(brow_ctx), expwnav(lwnav) {};
~WbExpWNavBrow();
BrowCtx *ctx;
void *expwnav;
brow_tNodeClass nc_exp;
brow_tNodeClass nc_eexp;
flow_sAnnotPixmap *pixmap_export;
flow_sAnnotPixmap *pixmap_map;
flow_sAnnotPixmap *pixmap_openmap;
flow_sAnnotPixmap *pixmap_leaf;
void free_pixmaps();
void allocate_pixmaps();
void create_nodeclasses();
void brow_setup();
};
class WbExpWNav {
public:
WbExpWNav( void *l_parent_ctx, ldh_tSesContext l_ldhses, int l_type, int l_editmode);
virtual ~WbExpWNav();
void *parent_ctx;
ldh_tSesContext ldhses;
WbExpWNavBrow *brow;
int type;
int editmode;
int show_all;
ExpWDir *dirlist;
virtual void set_input_focus() {}
void show();
void show_export_import();
void show_buildproject();
void redraw();
void clear();
void zoom( double zoom_factor);
void unzoom();
pwr_tStatus exp();
void check_all();
void check_clear();
void check_reset();
void set_show_all( int set);
ExpWDir *dir_find( char *name);
ExpWDir *dir_insert( char *name, char *description);
void list_free();
static int init_brow_cb( FlowCtx *fctx, void *client_data);
static int brow_cb( FlowCtx *ctx, flow_tEvent event);
};
class ItemExp {
public:
ItemExp( WbExpWNav *expwnav, char *item_source, char *item_target, ExpWList *item_listp,
brow_tNode dest, flow_eDest dest_code);
expwitem_eItemType type;
WbExpWNav *expwnav;
brow_tNode node;
pwr_tFileName source;
pwr_tFileName target;
int button_value;
ExpWList *listp;
void set( int value);
void update();
virtual ~ItemExp() {}
};
class ItemDir {
public:
ItemDir( WbExpWNav *expwnav, ExpWDir *item_dir, char *item_name, char *item_description,
brow_tNode dest, flow_eDest dest_code);
expwitem_eItemType type;
WbExpWNav *expwnav;
ExpWDir *dir;
brow_tNode node;
char name[80];
char description[80];
int button_value;
int open_children();
int close();
void set( int value);
void update();
virtual ~ItemDir() {}
};
#endif
......@@ -2432,6 +2432,239 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sts = ldh_GetNextSibling( ldhses, dbobjid, &dbobjid);
}
// Export files
pwr_tOid exportoid;
for ( sts = ldh_GetClassList( ldhses, pwr_cClass_Export, &exportoid);
ODD(sts);
sts = ldh_GetNextObject( ldhses, exportoid, &exportoid)) {
pwr_tFileName dir;
char *dir_ptr;
pwr_mExportImportMask *components_ptr;
pwr_tOid appoid;
sts = ldh_GetObjectPar( ldhses, exportoid, "DevBody",
"TargetDirectory", (char **)&dir_ptr, &size);
if ( EVEN(sts)) return sts;
strncpy( dir, dir_ptr, sizeof(dir));
free( dir_ptr);
if ( strcmp( dir, "") == 0) {
MsgWindow::message( 'E', "Export directory is missing", msgw_ePop_Default);
continue;
}
if ( dir[strlen(dir)-1] != '/')
strcat( dir, "/");
sts = ldh_GetObjectPar( ldhses, exportoid, "DevBody",
"Components", (char **)&components_ptr, &size);
if (EVEN(sts)) return sts;
if ( *components_ptr & pwr_mExportImportMask_IncludeFiles)
fprintf( file, "export $pwrp_inc/*.h %s\n", dir);
if ( *components_ptr & pwr_mExportImportMask_GraphFiles)
fprintf( file, "export $pwrp_exe/*.pwg %s\n", dir);
if ( *components_ptr & pwr_mExportImportMask_FlowFiles)
fprintf( file, "export $pwrp_load/*.flw %s\n", dir);
free( components_ptr);
for ( sts = ldh_GetChild( ldhses, exportoid, &appoid);
ODD(sts);
sts = ldh_GetNextSibling( ldhses, appoid, &appoid)) {
sts = ldh_GetObjectClass( ldhses, appoid, &cid);
if ( EVEN(sts)) return sts;
switch ( cid) {
case pwr_cClass_ApplExport: {
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Source", (char **)&source_ptr, &size);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Target", (char **)&target_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "export %s %s%s\n", source_ptr, dir, target_ptr);
free( source_ptr);
free( target_ptr);
break;
}
default: ;
}
}
}
// Import files
pwr_tOid importoid;
for ( sts = ldh_GetClassList( ldhses, pwr_cClass_Import, &importoid);
ODD(sts);
sts = ldh_GetNextObject( ldhses, importoid, &importoid)) {
pwr_tFileName dir;
char *dir_ptr;
pwr_mExportImportMask *components_ptr;
pwr_tOid appoid;
sts = ldh_GetObjectPar( ldhses, importoid, "DevBody",
"SourceDirectory", (char **)&dir_ptr, &size);
if ( EVEN(sts)) return sts;
strncpy( dir, dir_ptr, sizeof(dir));
free( dir_ptr);
if ( strcmp( dir, "") == 0) {
MsgWindow::message( 'E', "Import directory is missing", msgw_ePop_Default);
continue;
}
if ( dir[strlen(dir)-1] != '/')
strcat( dir, "/");
sts = ldh_GetObjectPar( ldhses, importoid, "DevBody",
"Components", (char **)&components_ptr, &size);
if (EVEN(sts)) return sts;
if ( *components_ptr & pwr_mExportImportMask_IncludeFiles)
fprintf( file, "import %s*.h $pwrp_inc/\n", dir);
if ( *components_ptr & pwr_mExportImportMask_GraphFiles)
fprintf( file, "import %s*.pwg $pwrp/exe/\n", dir);
if ( *components_ptr & pwr_mExportImportMask_FlowFiles)
fprintf( file, "import %s*.flw $pwrp_load/\n", dir);
free( components_ptr);
for ( sts = ldh_GetChild( ldhses, importoid, &appoid);
ODD(sts);
sts = ldh_GetNextSibling( ldhses, appoid, &appoid)) {
sts = ldh_GetObjectClass( ldhses, appoid, &cid);
if ( EVEN(sts)) return sts;
switch ( cid) {
case pwr_cClass_ApplImport: {
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Source", (char **)&source_ptr, &size);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Target", (char **)&target_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "import %s%s %s\n", dir, source_ptr, target_ptr);
free( source_ptr);
free( target_ptr);
break;
}
default: ;
}
}
}
// Build files
pwr_tOid builddir_oid;
pwr_tOid coid;
pwr_tObjName oname;
pwr_tOName fullname;
pwr_tOid poid;
for ( sts = ldh_GetClassList( ldhses, pwr_cClass_BuildDirectory, &builddir_oid);
ODD(sts);
sts = ldh_GetNextObject( ldhses, builddir_oid, &builddir_oid)) {
pwr_tFileName dir;
char *dir_ptr;
char *descr_ptr;
sts = ldh_ObjidToName( ldhses, builddir_oid, ldh_eName_Object,
oname, sizeof(oname), &size);
strcpy( fullname, oname);
for ( sts = ldh_GetParent( ldhses, builddir_oid, &poid);
ODD(sts);
sts = ldh_GetParent( ldhses, poid, &poid)) {
pwr_tOName tmp;
pwr_tCid pcid;
sts = ldh_GetObjectClass( ldhses, poid, &pcid);
if ( EVEN(sts)) return sts;
if ( pcid != pwr_cClass_BuildDirectory)
break;
strcpy( tmp, fullname);
sts = ldh_ObjidToName( ldhses, poid, ldh_eName_Object,
oname, sizeof(oname), &size);
if ( EVEN(sts)) return sts;
strcpy( fullname, oname);
strcat( fullname, "-");
strcat( fullname, tmp);
}
sts = ldh_GetObjectPar( ldhses, builddir_oid, "DevBody",
"Directory", (char **)&dir_ptr, &size);
if ( EVEN(sts)) return sts;
strncpy( dir, dir_ptr, sizeof(dir));
free( dir_ptr);
if ( strcmp( dir, "") == 0) {
MsgWindow::message( 'E', "Build directory is missing", msgw_ePop_Default);
continue;
}
if ( dir[strlen(dir)-1] != '/')
strcat( dir, "/");
sts = ldh_GetObjectPar( ldhses, builddir_oid, "DevBody",
"Description", (char **)&descr_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "builddir %s \"%s\"\n", fullname, descr_ptr);
free( descr_ptr);
for ( sts = ldh_GetChild( ldhses, builddir_oid, &coid);
ODD(sts);
sts = ldh_GetNextSibling( ldhses, coid, &coid)) {
sts = ldh_GetObjectClass( ldhses, coid, &cid);
if ( EVEN(sts)) return sts;
switch ( cid) {
case pwr_cClass_BuildCopy: {
sts = ldh_GetObjectPar( ldhses, coid, "DevBody",
"Source", (char **)&source_ptr, &size);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectPar( ldhses, coid, "DevBody",
"Target", (char **)&target_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "buildcopy %s %s%s %s\n", cdh_Low(fullname), dir, source_ptr, target_ptr);
free( source_ptr);
free( target_ptr);
break;
}
case pwr_cClass_BuildExecute: {
char *command_ptr;
sts = ldh_GetObjectPar( ldhses, coid, "DevBody",
"Command", (char **)&command_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "buildexec %s %s \"%s\"\n", cdh_Low(fullname), dir, command_ptr);
free( command_ptr);
break;
}
default: ;
}
}
}
fclose( file);
#if defined OS_VMS
system( "purge/nolog " load_cNameDistribute);
......
......@@ -75,10 +75,6 @@
# include "cow_wow.h"
#endif
//#ifndef cow_xhelp_h
//#include "cow_xhelp.h"
//#endif
#ifndef wb_h
#include "wb.h"
#endif
......@@ -91,6 +87,10 @@
#include "wb_bckw.h"
#endif
#ifndef wb_expw_h
#include "wb_expw.h"
#endif
#define wnav_cVersion "X3.3a"
#define wnav_cScriptDescKey "!** Description"
......@@ -347,6 +347,7 @@ class WNav : public WUtility{
pwr_tStatus *status) { return 0;}
virtual WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status) { return 0;}
virtual WbBckW *bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status) { return 0;}
virtual WbExpW *expw_new( char *name, int type, pwr_tStatus *status) { return 0;}
static int brow_cb( FlowCtx *ctx, flow_tEvent event);
static int init_brow_base_cb( FlowCtx *fctx, void *client_data);
......
......@@ -453,7 +453,7 @@ dcli_tCmdTable wnav_command_table[] = {
"BUILD",
&wnav_build_func,
{ "dcli_arg1", "dcli_arg2", "/FORCE", "/DEBUG", "/CROSSREFERENCE",
"/MANUAL", "/NAME", ""}
"/MANUAL", "/NAME", "/WINDOW", ""}
},
{
"CHECK",
......@@ -474,7 +474,7 @@ dcli_tCmdTable wnav_command_table[] = {
"BACKUP",
&wnav_backup_func,
{ "dcli_arg1", "dcli_arg2", "dcli_arg13", "/FILE", "/FILE1", "/FILE2", "/OUT",
"/WINDOW", ""}
"/WINDOW", ""},
},
{"",}};
......@@ -5150,6 +5150,91 @@ static int wnav_build_func( void *client_data,
free( sel_list);
free( sel_is_attr);
}
else if ( cdh_NoCaseStrncmp( arg1_str, "PROJECT", strlen( arg1_str)) == 0) {
if ( !(CoLogin::privilege() & pwr_mPrv_DevConfig)) {
wnav->message( 'E', "User is not authorized to build");
return WNAV__NOTAUTHORIZED;
}
if ( ODD( dcli_get_qualifier( "/WINDOW", 0, 0))) {
pwr_tStatus sts;
sts = wnav_wccm_get_ldhsession_cb( wnav, &wnav->ldhses);
if ( EVEN(sts)) return sts;
wnav->expw_new( (char *)"Build Project", expw_eType_BuildProject, &sts);
if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts));
}
else {
char arg2_str[200];
int arg2_sts;
char *dirp;
wb_build build( *(wb_session *)wnav->ldhses, wnav);
build.opt.force = ODD( dcli_get_qualifier( "/FORCE", 0, 0));
build.opt.debug = ODD( dcli_get_qualifier( "/DEBUG", 0, 0));
build.opt.crossref = ODD( dcli_get_qualifier( "/CROSSREFERENCE", 0, 0));
build.opt.manual = ODD( dcli_get_qualifier( "/MANUAL", 0, 0));
arg2_sts = dcli_get_qualifier( "dcli_arg2", arg2_str, sizeof(arg2_str));
if ( EVEN(arg1_sts))
dirp = 0;
else
dirp = arg2_str;
build.project( dirp);
wnav->message(' ', wnav_get_message(build.sts()));
}
}
else if ( cdh_NoCaseStrncmp( arg1_str, "EXPORT", strlen( arg1_str)) == 0) {
// command is "BUILD EXPORT"
if ( !(CoLogin::privilege() & pwr_mPrv_DevConfig)) {
wnav->message( 'E', "User is not authorized to export");
return WNAV__NOTAUTHORIZED;
}
if ( ODD( dcli_get_qualifier( "/WINDOW", 0, 0))) {
pwr_tStatus sts;
sts = wnav_wccm_get_ldhsession_cb( wnav, &wnav->ldhses);
if ( EVEN(sts)) return sts;
wnav->expw_new( (char *)"Export", expw_eType_Export, &sts);
if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts));
}
else {
// TODO
}
}
else if ( cdh_NoCaseStrncmp( arg1_str, "IMPORT", strlen( arg1_str)) == 0) {
// command is "BUILD IMPORT"
if ( !(CoLogin::privilege() & pwr_mPrv_DevConfig)) {
wnav->message( 'E', "User is not authorized to import");
return WNAV__NOTAUTHORIZED;
}
if ( ODD( dcli_get_qualifier( "/WINDOW", 0, 0))) {
pwr_tStatus sts;
sts = wnav_wccm_get_ldhsession_cb( wnav, &wnav->ldhses);
if ( EVEN(sts)) return sts;
wnav->expw_new( (char *)"Import", expw_eType_Import, &sts);
if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts));
}
else {
// TODO
}
}
else {
wnav->message('E', "Syntax error");
return WNAV__SYNTAX;
......
......@@ -2071,6 +2071,30 @@ void Wtt::activate_buildnode()
reset_cursor();
}
void Wtt::activate_buildproject()
{
char cmd[80] = "build project/window";
if ( !focused_wnav)
set_focus_default();
focused_wnav->command( cmd);
}
void Wtt::activate_buildimport()
{
char cmd[80] = "build import/window";
if ( !focused_wnav)
set_focus_default();
focused_wnav->command( cmd);
}
void Wtt::activate_buildexport()
{
char cmd[80] = "build export/window";
if ( !focused_wnav)
set_focus_default();
focused_wnav->command( cmd);
}
void Wtt::activate_distribute()
{
......
......@@ -252,6 +252,9 @@ class Wtt : public WUtility {
void activate_openclasseditor();
void activate_buildvolume();
void activate_buildnode();
void activate_buildproject();
void activate_buildimport();
void activate_buildexport();
void activate_distribute();
void activate_showcrossref();
void activate_updateclasses();
......
#define xnav_bitmap_export10_width 10
#define xnav_bitmap_export10_height 10
static char xnav_bitmap_export10_bits[] = {
0x20, 0x00, 0x60, 0x00, 0xbf, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x02,
0x01, 0x01, 0xbf, 0x00, 0x60, 0x00, 0x20, 0x00};
#define xnav_bitmap_export14_width 14
#define xnav_bitmap_export14_height 14
static char xnav_bitmap_export14_bits[] = {
0x80, 0x00, 0x80, 0x01, 0x80, 0x02, 0xff, 0x04, 0x01, 0x08, 0x01, 0x10,
0x01, 0x20, 0x01, 0x20, 0x01, 0x10, 0x01, 0x08, 0xff, 0x04, 0x80, 0x02,
0x80, 0x01, 0x80, 0x00};
#define xnav_bitmap_export16_width 16
#define xnav_bitmap_export16_height 16
static char xnav_bitmap_export16_bits[] = {
0x00, 0x01, 0x00, 0x03, 0x00, 0x05, 0x00, 0x09, 0xff, 0x11, 0x01, 0x20,
0x01, 0x40, 0x01, 0x80, 0x01, 0x80, 0x01, 0x40, 0x01, 0x20, 0xff, 0x11,
0x00, 0x09, 0x00, 0x05, 0x00, 0x03, 0x00, 0x01};
#define xnav_bitmap_export18_width 18
#define xnav_bitmap_export18_height 18
static char xnav_bitmap_export18_bits[] = {
0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x12, 0x00,
0xff, 0x23, 0x00, 0x01, 0x40, 0x00, 0x01, 0x80, 0x00, 0x01, 0x00, 0x01,
0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x80, 0x00,
0x01, 0x40, 0x00, 0xff, 0x23, 0x00, 0x00, 0x12, 0x00, 0x00, 0x0a, 0x00,
0x00, 0x06, 0x00, 0x00, 0x02, 0x00};
#define xnav_bitmap_export20_width 20
#define xnav_bitmap_export20_height 20
static char xnav_bitmap_export20_bits[] = {
0x00, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x14, 0x00, 0x00, 0x24, 0x00,
0xff, 0x47, 0x00, 0x01, 0x80, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x02,
0x01, 0x00, 0x04, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x04,
0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x80, 0x00, 0xff, 0x47, 0x00,
0x00, 0x24, 0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x04, 0x00};
#define xnav_bitmap_export24_width 24
#define xnav_bitmap_export24_height 24
static char xnav_bitmap_export24_bits[] = {
0x00, 0x10, 0x00, 0x00, 0x30, 0x00, 0x00, 0x50, 0x00, 0x00, 0x90, 0x00,
0x00, 0x10, 0x01, 0xff, 0x1f, 0x02, 0x01, 0x00, 0x04, 0x01, 0x00, 0x08,
0x01, 0x00, 0x10, 0x01, 0x00, 0x20, 0x01, 0x00, 0x40, 0x01, 0x00, 0x80,
0x01, 0x00, 0x80, 0x01, 0x00, 0x40, 0x01, 0x00, 0x20, 0x01, 0x00, 0x10,
0x01, 0x00, 0x08, 0x01, 0x00, 0x04, 0xff, 0x1f, 0x02, 0x00, 0x10, 0x01,
0x00, 0x90, 0x00, 0x00, 0x50, 0x00, 0x00, 0x30, 0x00, 0x00, 0x10, 0x00};
#define xnav_bitmap_export8_width 8
#define xnav_bitmap_export8_height 8
static char xnav_bitmap_export8_bits[] = {
0x10, 0x30, 0x5f, 0x81, 0x81, 0x5f, 0x30, 0x10};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment