DiscussionsIssue archiveOCCT:Configuration

Archived issue #0028622

Configuration - xcode.sh doesn't consider ios case

Open CASCADEOCCT:Configurationclosed8 public notes

Search issues

Description

if genproj is run with "ios" , generated xcode.sh fails due to it contains a hard-coded path to OCCT workspace file (open -a Xcode ./adm/mac/xcd/OCCT.xcworkspace)

Steps to reproduce

./genproj xcd ios

Public activity

8 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Tue Apr 11 15:22:18 2017 +0300

    0028622: Configuration - xcode.sh doesn't consider ios case
    
    xcode.sh is generated from a template taking into account current platform (mac|ios)
02Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
03Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
04Commenter 4
sky, could you review the CR28622 occt branch?
05Commenter 3
-open -a Xcode ./adm/mac/xcd/OCCT.xcworkspace
+open -a Xcode ./adm/__PLATFORM__/xcd/OCCT.xcworkspace
...
-      "xcd"   { file copy -force -- "$::THE_CASROOT/adm/templates/xcode.sh"      "$::path/xcode.sh" }
+      "xcd"   {
+        set aFileTmpl [open "$::THE_CASROOT/adm/templates/xcode.sh.in" "r"]
+        
+        set aContent [read $aFileTmpl]
+        close $aFileTmpl
+
+        regsub -all -- {__PLATFORM__} $aContent "$thePlatform" aContent
+
+        set anXCodeFile [open "$::path/xcode.sh" "w"]
+        fconfigure $anXCodeFile -translation lf
+        puts $anXCodeFile $aContent
+        close $anXCodeFile
+        
+      }

The patch introduces new approach inconsistent to codeblocks.sh, where environment variable $WOKSTATION is used to identify platform in runtime.

Though current way use by env.sh to define $WOKSTATION is not applicable for iOS, since both iOS and macOS targets are equally possible on macOS host - so it can be passed only through additional argument or as independent xcode_ios.sh script file. So that the single working directory can be used for building OCCT for several platforms at once (though there will be a collision with custom.sh).

By the way, the reason why this problem was not handled in the first place is that xcode.sh was useless for iOS (paths to 3rd-parties are hard-coded into XCode project and Draw Harness can not be launched from XCode anyway) - so I have just opened XCode project file and built project without using any xcode.sh script.

Did something changed and xcode.sh become useful somehow for iOS, or patch is just for consistency with other platforms?

06Commenter 6
the patch is only for consistency. considering all the above, there is no need in this patch.
07Commenter 7
dear Commenter 1, please close the issue
08Commenter 2
Branch [archived branch] has been deleted by Commenter 3.

[revision removed]