Author Topic: Svn Repository Reorganization  (Read 2345 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Svn Repository Reorganization
« on: November 24, 2009, 12:38:35 AM »
I've been preparing to add more stuff to the SVN repository, and thought I'd reorganize it a little so stuff can still be found in it afterwards. Level and level related APIs have moved into a LevelsAndMods folder. This is meant to contain anything that needs to be built against the SDK (mainly levels). I'd like to maintain a folder structure along the lines of:
Code: [Select]
LevelsAndMods/
  API/
  Templates/
    Blank/
    Blank-WithComments/
    Hooville/
  Levels/
    ...  (Put your projects here, one folder deep)
    SomeProject/    (Example)
      Main.cpp
      LevelMain.cpp
      OP2Sript.dsp
      OP2Script.dsw
  Mods/
    NetFix/  (Eventually?)

Note: I still need to fix the location of some "trunk" and "tag" folders to get the level structure right. Since the levels must build against the version of API they were designed with, I plan to move the trunk and tag folders to about the LevelsAndMods folder level. Currently, they're still in the level specific project folders (e.g. Hooville). By moving them, the API folder will be tagged along with the level, making it easier to build old versions. It will also ensure a correct folder depth, which means relative paths can be used to the API folder from the level projects.


This reorganization may affect checked out working copies, so I thought I'd leave a note about how to "fix" things, should you run into trouble because of this.

First, try an SVN update. It may just update smoothly, but if not....

The simplest method, if you have no local changes, is simply to delete your old working copy, and checkout another copy. You could also just checkout a new copy to a separate folder without deleting the old copy. This might be an easy way to copy any locally changed files from the old working copy into the new location in the new working copy. This method will solve pretty much any SVN working copy issue (conflicts, tree conflicts, other weird error messages). You can also do this on subfolders, if only a few subfolders present problems (which can save redownload time).

If you want to avoid a possibly large download or long wait checking out the repository, you could also try using svn switch (or Tortoise SVN relocate). That will let you enter a new updated repository path for the file, so it can sync with the server again, without having to redownload it all. This method should help solve problems from moving files within a repository, or moving files between repositories.
« Last Edit: November 24, 2009, 12:38:51 AM by Hooman »

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Svn Repository Reorganization
« Reply #1 on: November 24, 2009, 10:00:14 AM »
*tilts head*  So...it's basically a virtual library?  Why have I never heard of this before?
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Svn Repository Reorganization
« Reply #2 on: November 24, 2009, 10:51:46 PM »
I guess you weren't paying attention when it was posted about last year?
http://forum.outpost2.net/index.php?showto...indpost&p=65213

Anyway, I put the source for the web site in there. Just the main site though, not the forums. I expect there may be some legal issues if I put up the forum code for everyone to download, and I suspect the people that wrote it would actually care. That, and there are security reasons for not posting it, such as files with database passwords in them.
 

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Svn Repository Reorganization
« Reply #3 on: November 27, 2009, 02:52:12 AM »
I've completed a few reorganizations concerning the SDK. If you SVN->CheckOut the LevelsAndMods folder, you should just be able to open and build the projects now (with MSVC 6.0) without anything breaking.

I've also updated Hooville a little. It will now create initial combat vehicles, and random disasters, according to the player's pre-game settings. I've also updated the commenting and organization a little to hopefully make some of it more clear.

The settings in the structure file should also make sharing of source so it builds on someone else's system a little easier. So if you're starting a new project, copying/pasting one of the Template project folders would be a good way to start. (Without the hidden .svn folders please. I don't want those projects overwritten with your level making attempts with an accidental commit). The workspaces also have the Outpost2DLL and OP2Helper API projects included in them, so you can get easy access to their source. It will also auto-rebuild those projects if they are out of date.

There are commented out placeholders for the debug executable (Outpost2.exe), and the Post-build step (copying the compiled DLL to the Outpost 2 folder). They both have "rem" in front of those lines (rem = remark = comment). Just delete the "rem" and they should work, although, you may have to update the paths for your system.
 

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Svn Repository Reorganization
« Reply #4 on: December 21, 2009, 01:02:09 AM »
I've added a number of level building tutorial-like projects to the SVN.
You can find them at svn://68.146.111.58/outpost2/LevelsAndMods/trunk/LevelTutorials/ using an SVN client (such as Tortoise SVN).

The tutorials include:
Code: [Select]
01-DescBlock
02-CreateUnit
03-Bases/Population/Resources
04-Beacons and MiningGroups

I've got a few more planned as well. I've got some stuff done on Victory/Failure conditions, but I think I might want to write a basic Trigger tutorial first. I'd also like to add something concerning Random Disasters, GetSaveRegions and the scriptGlobal method of dealing with those issues, Multiplayer Pre-Game Settings (day/night, morale, disasters, initial units), and DescBlockEx for Multiplayer AIs.


If there's a topic you'd like covered, post it. I'm mainly looking for basic tutorials at the moment. Writing a complete AI is not going to happen. Demonstrating a specific part might, but I'd like to cover core non-AI related functionality first, and stay mainly focused on Outpost2DLL stuff. Using OP2Helper stuff might come after that.

Also, if you have a preferred order for the tutorials, please post the order you think would be best.