Skip to content

Commit

Permalink
0024816: Tool for upgrading OCCT and dependent code
Browse files Browse the repository at this point in the history
A new script adm/upgrade.tcl defines a Tcl procedure occt_upgrade, to be used for upgrading code of OCCT and applications for changes introduced by OCCT 7.0.
Batch script upgrade.bat is provided for convenience.
File upgrade.dat contains data (lists of classes) required for some upgrade steps.
Details on upgrade procedure are put in dox/dev_guides/upgrade/upgrade.md.

OCCT code corrected to improve compatibility with code based on previous versions of OCCT:
- Added conversion operator of handle to bool, for use in conditional expressions.
- Forward declaration of argument class restored in macro DEFINE_STANDARD_HANDLE.
- Includes of used classes added in some headers to avoid problem of missing includes in dependent code
- Type cast operators to base curve and surface added in GC and GCE2d classes to reduce porting issues.

Added test for local reference to handle initialized by temporary handle to derived class.

WOK and CDL User Guides removed.
  • Loading branch information
a-betenev committed Aug 19, 2015
1 parent 39bff09 commit d1a67b9
Show file tree
Hide file tree
Showing 84 changed files with 2,901 additions and 5,855 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ UDLIST eol=lf
tests/* eol=lf
tests/*/* eol=lf
tests/*/*/* eol=lf
adm/upgrade.dat eol=lf
*.bat eol=crlf
*.cmd eol=crlf
*.rc eol=crlf
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Release
/adm/mac
/adm/make
*.vcproj*user
*.vcxproj*user
*.csproj*user
*.ncb
*.suo
Expand Down
26 changes: 24 additions & 2 deletions adm/genconf.tcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
#!/usr/bin/tclsh

package require Tk
# =======================================================================
# Created on: 2012-01-26
# Created by: Kirill GAVRILOV
# Copyright (c) 2012 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.

source "./adm/genconfdeps.tcl"
# =======================================================================
# GUI procedure for search of third-party tools and generation of environment
# customization script
# =======================================================================

# load tools
source [file join [file dirname [info script]] genconfdeps.tcl]

package require Tk

set aRowIter 0
frame .myFrame -padx 5 -pady 5
Expand Down
21 changes: 20 additions & 1 deletion adm/genconfdeps.tcl
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
#!/usr/bin/tclsh
# =======================================================================
# Created on: 2012-01-26
# Created by: Kirill GAVRILOV
# Copyright (c) 2012 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.

# =======================================================================
# Tools for search of third-party libraries and generation on environment
# customization script
# =======================================================================

set ARCH "64"

Expand Down
9 changes: 7 additions & 2 deletions adm/gendoc.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
#
# Brief: This script compiles OCCT documents from *.md files to HTML pages

# =======================================================================
# This script defines command gendoc compiling OCCT documents
# from *.md files to HTML pages
# =======================================================================

# load auxiliary tools
source [file join [file dirname [info script]] occaux.tcl]

# ======================================
# Common functions
# ======================================
Expand Down
28 changes: 21 additions & 7 deletions adm/genproj.tcl
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# =======================================================================
# This script generates project files for different IDEs:
# "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "amk" "xcd"
# Created on: 2014-07-24
# Created by: SKI
# Copyright (c) 2014 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.

# =======================================================================
# This script defines Tcl command genproj generating project files for
# different IDEs:
# "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "cbp" "amk" "xcd"
#
# Example:
# genproj -path=D:/occt -target=vc10
# genproj -target=xcd -ios -static
# =======================================================================

source [file join [file dirname [info script]] genconfdeps.tcl]

set path ""
set fBranch ""
switch -exact -- "$tcl_platform(platform)" {
Expand All @@ -18,8 +37,6 @@ switch -exact -- "$tcl_platform(os)" {
"Darwin" {set targetStation "mac"}
}

source "./adm/genconfdeps.tcl"

proc _get_options { platform type branch } {
global path
set res ""
Expand Down Expand Up @@ -3793,6 +3810,3 @@ proc osutils:xcdx { theOutDir theExecutable theGuidsMap } {
puts $aPlistFile $aPlistTmpl
close $aPlistFile
}

# launch generation
genproj {*}$::argv
7 changes: 4 additions & 3 deletions adm/occaux.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
#
# Brief: This script contains auxilary functions which can be used
# in documentation generation process

# =======================================================================
# This script contains auxilary functions which can be used
# in documentation generation process
# =======================================================================

# ==============================================
Expand Down
32 changes: 27 additions & 5 deletions adm/start.tcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
#!/usr/bin/tclsh

# Command-line starter for occdoc command, use it as follows:
# tclsh> source dox/start.tcl [arguments]
# =======================================================================
# Created on: 2014-03-21
# Created by: OMY
# Copyright (c) 1996-1999 Matra Datavision
# Copyright (c) 1999-2014 OPEN CASCADE SAS
#
# This file is part of Open CASCADE Technology software library.
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 2.1 as published
# by the Free Software Foundation, with special exception defined in the file
# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
# distribution for complete text of the license and disclaimer of any warranty.
#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.

if { [llength $argv] < 1 } {
puts "Command-line starter for Tcl command defined in same-named file."
puts "Use it as follows:"
puts "\> tclsh start.tcl command \[arguments\]"
return
}

source [file join [file dirname [info script]] occaux.tcl]
source [file join [file dirname [info script]] gendoc.tcl]
gendoc {*}$::argv
set cmdname [lindex $argv 0]
source [file join [file dirname [info script]] $cmdname.tcl]

eval $cmdname [lrange $argv 1 end]
Loading

0 comments on commit d1a67b9

Please sign in to comment.