我想在目錄結構方面幫助您在SVN中設置項目。我已經閱讀了關於這個問題的幾個答案,但由於我對此很陌生,其中大多數都很難理解。組織解決方案,項目和SVN
我建立一個單一的庫,在其上其他幾個不同的項目依賴於:
我需要出口在MyLibrary的能力(頭,只.LIB)很容易通過第三方
MyLibrary1
使用- 取決於外部庫,應該可以管理這些庫的不同版本!
MyLibrary2
- 取決於外部庫FMOD,GLEW,...
項目1,2,4,5,6 ...
- Depends中在MyLibrary1,2或兩者上
- 每個項目可能需要多個平臺的版本(osx,windows ...)
我想知道一個很好的方法來組織這個,請記住,我對此很新 - 一個更迂迴的答案會有幫助。例如,如果您編寫/ src之類的東西,請解釋應該進入的內容!我可以猜到,但我不敢肯定=)
//////////////////////////////// ////////////////////////////////////////////////// //////////////////////////
//編輯
我不能把這個變成一個評論,所以這裏有雲: @JN,感謝您的回覆廣泛,我想澄清一些東西,我希望我明白你的意思正確:
root
library foo
/branches // old versions of foo
/tags // releases of foo
/trunk // current version
/build // stuff required by makefiles
/tools // scripts to launch tests ect
/data // test data needed when running
/output // binaries, .exe files
/dependencies // libraries that foo needs
/lib name
include
lib
/docs // documentation
/releases // generated archives
/sample // sample project that shows how to use foo
/source // *.h, *.cpp
program bar
/branches // old versions of bar
/tags // releases of bar
/trunk // current version
/build // stuff required by makefiles
/tools // scripts to launch tests ect
/data // test data needed when running
/output // binaries, .exe files
/dependencies // libraries that bar needs
/lib name
include
lib
/docs // documentation
/releases // generated archives
/sample // sample project that shows how to use bar
/source // *.h, *.cpp
1)在哪裏的*的.sln文件去?在/構建?
2)我是否需要將foo/source複製到bar/dependencies/foo/include?畢竟吧取決於foo
3)* .dll文件去哪裏?如果foo依賴於dll文件,那麼所有使用foo的程序都需要訪問相同的dll文件。這應該進入root/dll嗎?
是由不同的團隊開發的不同項目?代碼的某些部分是否存在安全訪問限制? – 2012-03-02 13:00:40
是的,它們是由不同的團隊開發的,只有myLibrary 1,2上的訪問約束,但這些約束並不重要 - 只要我可以輕鬆導出庫的一個版本就可以了。 – aCuria 2012-03-02 13:10:41
1)在構建或根夾。 2)在foo中,只關心讓「公共」包含在「源代碼」的特定子文件夾中,易於打包。酒吧可能有自己的結構,與foo無關(因爲也許另一個團隊已經接管了它)。如果foo和bar是以緊密耦合的方式(相同的人,相同的時間)開發的,那麼對於兩者都使用相同的項目文件夾。 3)'/ dependencies/foo/lib/myfoo.dll'。爲了使它更加明確,你可以在/ dependencies/foo/** bin **/myfoo.dll中重新命名它。請記住,所有項目都沒有一個解決方案。 – 2012-03-02 22:16:12