building under WinXP

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
CtV
Trader
Trader
Posts: 25
Joined: Mon Mar 24, 2008 10:11 pm

building under WinXP

Post by CtV »

hi,

After triing for about 8hours in total I'm still not able to build the project. The best result i got was with VS2008 which crashed after about 15Minutes with a internal compiler bug an descibed here: http://connect.microsoft.com/VisualStud ... kID=374739. Using Code::Blocks with the VC++9 -toolchain, caused a hard crash to the whole machine (propably on the same error. Both were reproduceable. Then i tried cmake but i don't get it to work at all. Can anyone PLEASE tell me a way to get this sh*t running? The tuts are old as hell and reading the forum doesn't bring enlightement, either as anybody seems to have trouble compiling and running into the same mess.

Maybe there would be more contributers to the project if there were a way of compiling without the need of running linux.

Update:
Now my best result is an error with libpng3 when linking...
actual setup: Code:Blocks, VS 2005 toolchain and VS 2008 libs+includes...
i start hating the project...


greetings...
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: building under WinXP

Post by JsnMtth »

I'm working on getting a successful build using free tools. It doesn't work yet, hopefully it will soon. I'm having trouble with linking python ATM.

http://vegastrike.sourceforge.net/forum ... =5&t=14909
CtV
Trader
Trader
Posts: 25
Joined: Mon Mar 24, 2008 10:11 pm

Re: building under WinXP

Post by CtV »

After three days of trying to get the SVN compiled, i give it up.
I really wanted to take part in the project an do abit of bugfixing or maybe implement some new features I have in mind, but without compiling there's no debugging and without debugging there's no coding...

Code:Blocks, VC9, VC8, cygwin... i tried it all. I can't beleive there's no way for getting the thing compile under XP...

Here's my "best" result:

Code: Select all

Linking executable: ..\win32\bin\vegastrikeRVC7.exe
   Bibliothek "..\win32\bin\vegastrikeRVC7.lib" und Objekt "..\win32\bin\vegastrikeRVC7.exp" werden erstellt.
libpng3.lib(pngerror.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__iob" in Funktion "_png_default_error".
libpng3.lib(pngwutil.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__iob".
libpng3.lib(pngrutil.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__iob".
..\win32\bin\vegastrikeRVC7.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.
Process terminated with status 1120 (19 minutes, 58 seconds)
4 errors, 6 warnings
 
JsnMtth
Bounty Hunter
Bounty Hunter
Posts: 174
Joined: Wed May 27, 2009 6:38 am
Location: Fresno, California - United States of America
Contact:

Re: building under WinXP

Post by JsnMtth »

I understand your frustration. I'm making progress on the mingw build. I'm not going to give up either, its just a matter of time. I'll post here when I'm successful so keep tracking it.
RedAdder
Bounty Hunter
Bounty Hunter
Posts: 149
Joined: Sat Jan 03, 2009 8:11 pm
Location: Germany, Munich
Contact:

Re: building under WinXP

Post by RedAdder »

I am not sure this is helpful, but I remember building libpng with Visuals Studio 2005 first before having success with building Vegastrike.
redpirate37
Explorer
Explorer
Posts: 13
Joined: Fri Oct 30, 2009 8:22 am

Question Re: building under WinXP

Post by redpirate37 »

@which place i have to add this ??
:arrow:


Index: src/cmd/basecomputer.cpp
===================================================================
--- src/cmd/basecomputer.cpp (revision 12389)
+++ src/cmd/basecomputer.cpp (working copy)
@@ -2125,6 +2125,8 @@
}
*/

+std::string OwnerStarshipLocation(Cockpit *cockpit, int i);
+
//string buildShipDescription(Cargo &item,string & descriptiontexture); //Redundant definition
// Update the controls when the selection for a transaction changes.
void BaseComputer::updateTransactionControlsForSelection(TransactionList* tlist) {
@@ -2226,27 +2228,43 @@
} else {
// Do the money.
switch(tlist->transaction) {
+ case SELL_CARGO:
case BUY_CARGO:
- if (item.GetDescription()==""||item.GetDescription()[0]!='@'){
- buildShipDescription(item,descriptiontexture); //Check for ship
- item.description=buildCargoDescription(item); // do first, so can override default image, if so desired
+ if (item.GetDescription()==""||item.GetDescription()[0]!='@'){
+ buildShipDescription(item,descriptiontexture); //Check for ship
+ item.description=buildCargoDescription(item); // do first, so can override default image, if so desired
string temp;
temp+=item.description;
if((string::npos!=temp.find('@'))&&(""!=descriptiontexture)){// not already pic-annotated, has non-null ship pic
item.description="@"+descriptiontexture+"@"+item.description;
}
- }
- if(item.GetCategory().find("My_Fleet") != string::npos) {
+ }
+ if (item.mission) {
+ sprintf(tempString, "Destroy evidence of mission cargo. Credit received: 0.00.");
+ } else if(item.GetCategory().find("My_Fleet") != string::npos) {
// This ship is in my fleet -- the price is just the transport cost to get it to
// the current base. "Buying" this ship makes it my current ship.
sprintf(tempString, "#b#Transport cost: %.2f#-b#n1.5#", item.price);
- } else {
- sprintf(tempString, "Price: #b#%.2f#-b#n#", baseUnit->PriceCargo(item.content));
descString += tempString;
- sprintf(tempString, "Cargo volume: %.2f; Mass: %.2f#n1.5#", item.volume, item.mass);
- }
- descString += tempString;
- break;
+ tempString[0] = '\0';
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ for (int i=1; i<cockpit->unitfilename.size(); i+=2) {
+ if (cockpit->unitfilename == item.GetContent())
+ {
+ sprintf(tempString, "#b#Current Location: %s#-b#n1.5#", cockpit->unitfilename[i+1].c_str());
+ break;
+ }
+ }
+ } else if (tlist->transaction == SELL_CARGO) {
+ sprintf(tempString, "Value: #b#%.2f#-b, purchased for %.2f#n#",
+ baseUnit->PriceCargo(item.content), item.price);
+ } else { //BUY_CARGO
+ sprintf(tempString, "Price: #b#%.2f#-b#n#", baseUnit->PriceCargo(item.content));
+ }
+ descString += tempString;
+ sprintf(tempString, "Cargo volume: %.2f; Mass: %.2f#n1.5#", item.volume, item.mass);
+ descString += tempString;
+ break;
case BUY_UPGRADE:
if(item.content == BASIC_REPAIR_NAME) {
// Basic repair is implemented entirely in this module.
@@ -2283,6 +2301,16 @@
// This ship is in my fleet -- the price is just the transport cost to get it to
// the current base. "Buying" this ship makes it my current ship.
sprintf(tempString, "#b#Transport cost: %.2f#-b#n1.5#", item.price);
+ descString += tempString;
+ tempString[0] = '\0';
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ for (int i=1; i<cockpit->unitfilename.size(); i+=2) {
+ if (cockpit->unitfilename == item.GetContent())
+ {
+ sprintf(tempString, "#b#Current Location: %s#-b#n1.5#", cockpit->unitfilename[i+1].c_str());
+ break;
+ }
+ }
} else {

sprintf(tempString, "Price: #b#%.2f#-b#n#", baseUnit->PriceCargo(item.content));
@@ -2294,26 +2322,6 @@
}
descString += tempString;
break;
- case SELL_CARGO:
- if (item.GetDescription()==""||item.GetDescription()[0]!='@'){
- buildShipDescription(item,descriptiontexture); //Check for ship
- item.description=buildCargoDescription(item); // do first, so can override default image, if so desired
- string temp;
- temp+=item.description;
- if((string::npos!=temp.find('@'))&&(""!=descriptiontexture)){// not already pic-annotated, has non-null ship pic
- item.description="@"+descriptiontexture+"@"+item.description;
- }
- }
- if (item.mission) {
- sprintf(tempString, "Destroy evidence of mission cargo. Credit received: 0.00.");
- }else {
- sprintf(tempString, "Value: #b#%.2f#-b, purchased for %.2f#n#",
- baseUnit->PriceCargo(item.content), item.price);
- }
- descString += tempString;
- sprintf(tempString, "Cargo volume: %.2f; Mass: %.2f#n1.5#", item.volume, item.mass);
- descString += tempString;
- break;
case SELL_UPGRADE:


@@ -2518,7 +2526,17 @@
// Either you are buying this ship for your fleet, or you already own the
// ship and it will be transported to you.
if(baseUnit) {
- if(item.price*quantity <= cockpit->credits) {
+
+ int i = cockpit->unitfilename.size();
+ if (originalItem.GetCategory().find("My_Fleet")!=string::npos) {
+ for (i=1; i < cockpit->unitfilename.size()-1; i+=2) {
+ if (cockpit->unitfilename == originalItem.GetContent())
+ break;
+ }
+ }
+ if ((i < cockpit->unitfilename.size()-1) && (cockpit->unitfilename[i+1].find("Cargo")!=string::npos)) {
+ color_prohibited_upgrade_flag = true;
+ } else if(item.price*quantity <= cockpit->credits) {
return true;
} else {
color_insufficient_money_flag=true;
@@ -2729,6 +2747,8 @@

extern int SelectDockPort (Unit * utdw, Unit * parent);

+Cargo CreateCargoForOwnerStarship(Unit *baseUnit, Cockpit* cockpit, int i);
+
void BaseComputer::loadCargoControls(void) {
// Make sure there's nothing in the transaction lists.
resetTransactionLists();
@@ -2753,6 +2773,22 @@
}

loadMasterList(m_base.GetUnit(), vector<string>(),donttakethis, true, m_transList1); // Anything but a mission.
+
+ // if no docking port AND no permission, no ships (different from above for VS compatibility)
+ if (!(((SelectDockPort (m_player.GetUnit(), m_player.GetUnit()) < 0 ) && (requireportforlaunch)) || (!starship_purchase)))
+ {
+ // Add in the starships owned by this player.
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ for (int i=1; i<cockpit->unitfilename.size(); i+=2) {
+ //if it's not already cargo somewhere
+ if (cockpit->unitfilename[i+1].find("Cargo")==string::npos) {
+ CargoColor cargoColor;
+ cargoColor.cargo=CreateCargoForOwnerStarship(m_base.GetUnit(), cockpit, i);
+ m_transList1.masterList.push_back(cargoColor);
+ }
+ }
+ }
+
SimplePicker* basePicker = static_cast<SimplePicker*>( window()->findControlById("BaseCargo") );
assert(basePicker != NULL);
loadListPicker(m_transList1, *basePicker, BUY_CARGO);
@@ -2927,8 +2963,26 @@
//Cargo itemCopy = *item; // Copy this because we reload master list before we need it.
int quantity = (requestedQuantity <= 0? item->quantity : requestedQuantity);
quantity = maxQuantityForPlayer(*item, quantity);
- playerUnit->BuyCargo(item->content, quantity, baseUnit, _Universe->AccessCockpit()->credits);
- eliminateZeroCargo(playerUnit);
+
+ //Have to handle our ships differently because we don't reduce base supply
+ if (item->GetCategory().find("My_Fleet") != string::npos) {
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ Cargo soldcargo= *item;
+ if (quantity>(unsigned int)soldcargo.quantity)
+ quantity=soldcargo.quantity;
+ playerUnit->BuyCargo(soldcargo,cockpit->credits);
+
+ //now to update the ship to show it's inside
+ for (int i=1; i<cockpit->unitfilename.size(); i+=2) {
+ if (cockpit->unitfilename==item->GetContent()) {
+ cockpit->unitfilename[i+1] = cockpit->unitfilename[0] + "/Cargo";
+ break;
+ }
+ }
+ } else {
+ playerUnit->BuyCargo(item->content, quantity, baseUnit, _Universe->AccessCockpit()->credits);
+ eliminateZeroCargo(playerUnit);
+ }
// Reload the UI -- inventory has changed. Because we reload the UI, we need to
// find, select, and scroll to the thing we bought. The item might be gone from the
// list (along with some categories) after the transaction.
@@ -2967,12 +3021,25 @@
Cargo itemCopy = *item; // Not sure what "sold" has in it. Need copy of sold item.
Cargo sold;
const int quantity = (requestedQuantity <= 0? item->quantity : requestedQuantity);
- if (item->mission) {
+ //This is mission cargo, or our ship, so we just want it out of the hold...
+ if ((item->mission)||(item->GetCategory().find("My_Fleet") != string::npos)) {
vector <Cargo>::iterator mycargo = std::find (playerUnit->image->cargo.begin(),playerUnit->image->cargo.end(),*item);
if (mycargo!=playerUnit->image->cargo.end()) {
playerUnit->RemoveCargo(mycargo-playerUnit->image->cargo.begin(),quantity,true);
}
- }else {
+
+ //This is our ship, so put it back in the fleet where it's supposed to be
+ if (item->GetCategory().find("My_Fleet") != string::npos) {
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ for (int i=1; i<cockpit->unitfilename.size(); i+=2) {
+ if (cockpit->unitfilename==item->GetContent()) {
+ cockpit->unitfilename[i+1] = _Universe->activeStarSystem()->getFileName();
+ break;
+ }
+ }
+ }
+
+ } else {
playerUnit->SellCargo(item->content, quantity, _Universe->AccessCockpit()->credits, sold, baseUnit);
}
eliminateZeroCargo(playerUnit);
@@ -4194,26 +4261,78 @@
return true;
}

+std::string OwnerStarshipLocation(Cockpit *cockpit, int i)
+{
+
+ assert(i+1 < cockpit->unitfilename.size());
+
+ if (i == 0) {
+ return _Universe->activeStarSystem()->getFileName();
+ }
+
+ std::string shipLocation = cockpit->unitfilename[i+1];
+
+ while (shipLocation.find("Cargo") != string::npos)
+ {
+ int j=0;
+ if(shipLocation.find(cockpit->unitfilename[j]) != string::npos) {
+ shipLocation = _Universe->activeStarSystem()->getFileName();
+ } else {
+ for (j = 1; j < cockpit->unitfilename.size()-1; j +=2) {
+ if(shipLocation.find(cockpit->unitfilename[j]) != string::npos) {
+ shipLocation = cockpit->unitfilename[j+1];
+ break;
+ }
+ }
+ }
+
+ if(j >= cockpit->unitfilename.size()-1)
+ {
+ //This is bad... this means we've corrupted the ship list...
+ fprintf(stderr, "Corrupt Ship List detected: %s is located at %s, but location doesn't exist!\n", cockpit->unitfilename.c_str(), shipLocation.c_str());
+ return shipLocation;
+ }
+ }
+
+ return shipLocation;
+}
+
+bool IsOwnerStarshipInSystem(Cockpit* cockpit, int i)
+{
+ return (OwnerStarshipLocation(cockpit,i) == _Universe->activeStarSystem()->getFileName());
+}
+
// Create a Cargo for the specified starship.
-Cargo CreateCargoForOwnerStarship(Cockpit* cockpit, int i) {
+Cargo CreateCargoForOwnerStarship(Unit * baseUnit, Cockpit* cockpit, int i) {
Cargo cargo;
- cargo.quantity = 1;
- cargo.volume = 1;
- cargo.price = 0;

- bool needsTransport = true;
+ static unsigned int one = 1;
+ Cargo* shipCargo;

- if(i+1 < cockpit->unitfilename.size()) {
- if(cockpit->unitfilename[i+1] == _Universe->activeStarSystem()->getFileName()) {
- // Ship is in this system -- doesn't need transport.
- needsTransport = false;
- }
+ if (baseUnit != NULL)
+ shipCargo = baseUnit->GetCargo(cockpit->unitfilename, one);
+
+ if (shipCargo==NULL) {
+ shipCargo=UniverseUtil::GetMasterPartList()->GetCargo(cockpit->unitfilename,one);
}

+ if (shipCargo != NULL) {
+ cargo.mass = shipCargo->mass;
+ cargo.volume = shipCargo->volume;
+ } else {
+ cargo.quantity = 1;
+ cargo.volume = 1;
+ }
+
+ bool needsTransport = !IsOwnerStarshipInSystem(cockpit,i);
+
if(needsTransport) {
static const float shipping_price = XMLSupport::parse_float (vs_config->getVariable ("physics","shipping_price","50000"));
cargo.price = shipping_price;
}
+ else {
+ cargo.price = 0;
+ }

cargo.content = cockpit->unitfilename;
cargo.category = "starships/My_Fleet";
@@ -4222,11 +4341,11 @@
}

// Create a Cargo for an owned starship from the name.
-Cargo CreateCargoForOwnerStarshipName(Cockpit* cockpit, std::string name, int& index) {
+Cargo CreateCargoForOwnerStarshipName(Unit * baseUnit, Cockpit* cockpit, std::string name, int& index) {
for(int i=1; i < cockpit->unitfilename.size(); i+=2) {
if(cockpit->unitfilename==name) {
index = i;
- return CreateCargoForOwnerStarship(cockpit, i);
+ return CreateCargoForOwnerStarship(baseUnit, cockpit, i);
}
}

@@ -4386,16 +4505,16 @@
Cockpit* cockpit = _Universe->AccessCockpit();
for (int i=1; i<cockpit->unitfilename.size(); i+=2) {
CargoColor cargoColor;
- cargoColor.cargo=CreateCargoForOwnerStarship(cockpit, i);
+ cargoColor.cargo=CreateCargoForOwnerStarship(m_base.GetUnit(), cockpit, i);
m_transList1.masterList.push_back(cargoColor);
}

//remove the descriptions, we don't build them all here, it is a time consuming operation
- vector<CargoColor>* items = &m_transList1.masterList;
+ /*vector<CargoColor>* items = &m_transList1.masterList;
for (vector<CargoColor>::iterator it=items->begin();it!=items->end();it++) {
(*it).cargo.description="";

- }
+ }*/


// Load the picker from the master list.
@@ -4414,9 +4533,24 @@
shipCargo=UniverseUtil::GetMasterPartList()->GetCargo(shipname,tempInt);
}
if (shipCargo) {
+
//now we can actually do the selling
for(int i=1; i < cockpit->unitfilename.size(); i+=2) {
if (cockpit->unitfilename[i]==shipname) {
+
+ //check to see if the ship being sold is Cargo -- can't sell it... Perhaps if one day the Cargo system is sane...
+ if (cockpit->unitfilename[i+1].find("Cargo") != string::npos)
+ return false;
+
+ //check to see if we have another ship as Cargo, and move that one out.
+ for(int j = 1; j < cockpit->unitfilename.size()-1; j+=2) {
+ if (shipname == cockpit->unitfilename[j+1])
+ {
+ //move that ship out of the cargo bay to wherever the ship being sold is...
+ cockpit->unitfilename[j+1] = cockpit->unitfilename[i+1];
+ }
+ }
+
if (Network && !_Universe->netLocked()) {
Network[0].shipRequest(shipname, Subcmd::SellShip);
return false;
@@ -4466,8 +4600,23 @@
int swappingShipsIndex = -1;
if(myfleet) {
// Player owns this starship.
+
+
+ //don't allow ships which are currently cargo to be bought... Perhaps someday when the cargo system is sane....
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ for (int i=1; i < cockpit->unitfilename.size()-1; i+=2)
+ {
+ if (cockpit->unitfilename[i]==content) {
+ //found the ship to be bought
+ if (cockpit->unitfilename[i+1].find("Cargo") != string::npos)
+ return false;
+ else
+ break;
+ }
+ }
+
shipCargo = &myFleetShipCargo;
- myFleetShipCargo = CreateCargoForOwnerStarshipName(_Universe->AccessCockpit(), content, swappingShipsIndex);
+ myFleetShipCargo = CreateCargoForOwnerStarshipName(baseUnit, cockpit, content, swappingShipsIndex);
if(shipCargo->GetContent().empty()) {
// Something happened -- can't find ship by name.
shipCargo = NULL;
Index: src/cmd/beam_generic.cpp
===================================================================
--- src/cmd/beam_generic.cpp (revision 12389)
+++ src/cmd/beam_generic.cpp (working copy)
@@ -564,6 +564,29 @@
Cargo adder = *c;
adder.quantity=1;
if (un->CanAddCargo(adder)) {
+
+ if ((_Universe->isPlayerStarship(firer))&&(!isnotcargo) && (adder.GetCategory().find("starships") != string::npos)) {
+
+ //its a ship, so try to add it to our fleet, but
+ //only allow player to own 1 ship of each filename
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ int i;
+ for (i= 1; i < cockpit->unitfilename.size()-1; i+=2) {
+ if (cockpit->unitfilename[i] == adder.GetContent())
+ break;
+ }
+
+ if ((i>=cockpit->unitfilename.size()-1)&&(cockpit->unitfilename[0] != adder.GetContent())) {
+ //add to fleet
+ adder.category = "starships/My_Fleet";
+ cockpit->unitfilename.push_back(adder.GetContent());
+ cockpit->unitfilename.push_back(cockpit->unitfilename[0] + "/Cargo");
+
+ target->WriteUnit(cockpit->GetUnitModifications().c_str()); //save its data
+ }
+ //else just add
+ }
+
un->AddCargo(adder);
if (_Universe->isPlayerStarship(un)) {
static int tractor_onboard = AUDCreateSoundWAV(vs_config->getVariable("unitaudio","player_tractor_cargo","tractor_onboard.wav"));
Index: src/cmd/ai/firekeyboard.cpp
===================================================================
--- src/cmd/ai/firekeyboard.cpp (revision 12389)
+++ src/cmd/ai/firekeyboard.cpp (working copy)
@@ -777,7 +777,7 @@

void FireKeyboard::DockWithMe (const KBData&,KBSTATE k) {
if (k==PRESS) {
- LeadMe ("g","Get in front of me and prepare to be tractored in.", false);
+ LeadMe ("e","Get in front of me and prepare to be tractored in.", false);

}
}
Index: src/cmd/unit_generic.cpp
===================================================================
--- src/cmd/unit_generic.cpp (revision 12389)
+++ src/cmd/unit_generic.cpp (working copy)
@@ -8626,6 +8626,8 @@
if ((!tmp->mission)&&memcmp (tmp->GetCategory().c_str(),"starships",sslen)==0) {
string ans = tmpcontent;
string::size_type blank = ans.find (".blank");
+ std::string newModifications = "";
+
if (blank != string::npos) {
ans = ans.substr (0,blank);
}
@@ -8636,7 +8638,23 @@
++(fg->nr_ships);
++(fg->nr_ships_left);
}
- cargo = UnitFactory::createUnit (ans.c_str(),false,faction,"",fg,fgsnumber,NULL,getUniqueSerial());
+
+ if (tmp->GetCategory().find("My_Fleet")) {
+ Cockpit* cockpit = _Universe->AccessCockpit();
+ newModifications = cockpit->GetUnitModifications();
+ printf("Ejecting ship with modifications: %s\n",newModifications.c_str());
+
+ //remove ship from fleet
+ for (int i = 1; i < cockpit->unitfilename.size()-1; i+=2) {
+ if (cockpit->unitfilename[i] == ans) {
+ cockpit->unitfilename.erase(cockpit->unitfilename.begin()+i); //remove ejected ship
+ cockpit->unitfilename.erase(cockpit->unitfilename.begin()+i); //remove ejected ship's location
+ break;
+ }
+ }
+ }
+
+ cargo = UnitFactory::createUnit (ans.c_str(),false,faction,newModifications,fg,fgsnumber,NULL,getUniqueSerial());
cargo->PrimeOrders();
cargo->SetAI (new Orders::AggressiveAI ("default.agg.xml"));
cargo->SetTurretAI();
@@ -9446,7 +9464,7 @@
std::sort (un->image->cargo.begin(),un->image->cargo.end());

for (unsigned int i=0;i+1<un->image->cargo.size();++i) {
- if (un->image->cargo[i].content==un->image->cargo[i+1].content) {
+ if ((un->image->cargo[i].content==un->image->cargo[i+1].content) && (un->image->cargo[i].category == un->image->cargo[i+1].category)) {
float tmpmass = un->image->cargo[i].quantity*un->image->cargo[i].mass+un->image->cargo[i+1].quantity*un->image->cargo[i+1].mass;
float tmpvolume = un->image->cargo[i].quantity*un->image->cargo[i].volume+un->image->cargo[i+1].quantity*un->image->cargo[i+1].volume;
un->image->cargo[i].quantity+=un->image->cargo[i+1].quantity;

:?: :roll:

I want to use my fleet as cargo in a ox, mule {clydesdale? :| not working i think :cry:] , tractor the ships back in and so on ....
RedAdder
Bounty Hunter
Bounty Hunter
Posts: 149
Joined: Sat Jan 03, 2009 8:11 pm
Location: Germany, Munich
Contact:

Re: building under WinXP

Post by RedAdder »

I don't get it ..
The patch contains your newly written code?
redpirate37
Explorer
Explorer
Posts: 13
Joined: Fri Oct 30, 2009 8:22 am

Re: building under WinXP

Post by redpirate37 »

RedAdder wrote:I don't get it ..
The patch contains your newly written code?
No, the code is from the Forum here, but there is no description or readme.txt where to add it .....

i tryed v-cfg but this doesnt match ...
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: building under WinXP

Post by CLoneWolf »

all the references to files are like this:
src/cmd/basecomputer.cpp
so place the file in the directory that contains the src one (it should be called vegastrike) and try to apply the patch.
redpirate37
Explorer
Explorer
Posts: 13
Joined: Fri Oct 30, 2009 8:22 am

Re: building under WinXP

Post by redpirate37 »

CLoneWolf wrote:all the references to files are like this:
src/cmd/basecomputer.cpp
so place the file in the directory that contains the src one (it should be called vegastrike) and try to apply the patch.
So u mean i must change the file ending 2 *cpp and give the comand _src/cmd/*cpp@ console? ?

I found alot cpp files but they are only in my civilization folder ...
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: building under WinXP

Post by CLoneWolf »

The file you've found is food for the program called patch (in Unix-like environments at least).
Here you can find, among other utilities, a patch program working on windows.
Put the executable and the patch file in the vegastrike folder, read how to run the program, run it feeding it the patch file, compile, enjoy.
redpirate37
Explorer
Explorer
Posts: 13
Joined: Fri Oct 30, 2009 8:22 am

Re: building under WinXP

Post by redpirate37 »

thanks,

the first link says error and the other files are to much 4 me, im a noob in progs, i know how 2 make the hardware work but the file programming things are not mine. :roll:

Any other idear how i can take back control over a capship from the ejectpod or how to make it stay in orbit after quit and reload a savegame?
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: building under WinXP

Post by CLoneWolf »

redpirate37 wrote:the first link says error and the other files are to much 4 me, im a noob in progs, i know how 2 make the hardware work but the file programming things are not mine. :roll:
Sorry, unluckily the solution you found to your problem is not a ready-made one; maybe some gentle soul who plays on Windows might compile a modified executable for you, but I can't help you there as I play on Linux, no Windows at all on my home PC :roll:
shenle
Confed Special Operative
Confed Special Operative
Posts: 381
Joined: Thu Jan 31, 2008 3:25 am
Location: hiding in a dark corner

Re: building under WinXP

Post by shenle »

read my tutorial under the thread "compiling with code:blocks", it still works for me. I'll try to attach a recent binary that I compiled with it. You will need to rename "vegastrikeRVC7-092209.7z.zip" to "vegastrikeRVC7-092209.7z" (because the forum doesn't allow the extension 7z, grrr) and decompress with 7Zip http://www.7-zip.org/
You do not have the required permissions to view the files attached to this post.
make me a sandwich
make: *** No rule to make target 'me'. Stop.
redpirate37
Explorer
Explorer
Posts: 13
Joined: Fri Oct 30, 2009 8:22 am

Re: building under WinXP

Post by redpirate37 »

Thanks a lot, but im total noob in this things....

i ve dld cc++ 2008 tool from microshit and installed it and unpacked the file ( but dont know where to ... :roll: ) but the exe says runtime error after a short picture from the
vegatrike startingscreen ...

(Microsoft Visual Studio \Common7\IDE\vbexpress.exe, .... got no folder bin at it )
RedAdder
Bounty Hunter
Bounty Hunter
Posts: 149
Joined: Sat Jan 03, 2009 8:11 pm
Location: Germany, Munich
Contact:

Re: building under WinXP

Post by RedAdder »

redpirate37 wrote:Thanks a lot, but im total noob in this things....

i ve dld cc++ 2008 tool from microshit and installed it and unpacked the file ( but dont know where to ... :roll: ) but the exe says runtime error after a short picture from the
vegatrike startingscreen ...

(Microsoft Visual Studio \Common7\IDE\vbexpress.exe, .... got no folder bin at it )
You probably linked it with a library that has not been compiled with c++ 2008, for example python or libpng. Maybe try acquiring a lib compiled with one, or get the source for the library and compile it with c++ 2008.

There should also be files named stdout and stderr where the vegastrike program is located which should end with an error description or what it was doing last.

P.S.:There is also some code in a thread where I had problems compiling which describes a better way to run python.
redpirate37
Explorer
Explorer
Posts: 13
Joined: Fri Oct 30, 2009 8:22 am

Re: building under WinXP

Post by redpirate37 »

:?

Yo, thanks alot, i know what u mean but i dont understand how 2 ..

First time i work at such stuff. :|
I mean thats bloody bullshit , i doc at my own ship in my fleet, can go to hangar, mainconcourse, tradehall, and to the bloody
fu Bar where the dull confedofficer and the fat merchantguy is sitting IN My OWN SHIP !!!
:shock: , hey , im Pirate !!! ... but i cant click at a cockpitdoor instead of the Fu Bar to get my Pilotseat back , thats weird !! :mrgreen:

DATADIR - No datadir specified in config file, using ; C:\Program Files\Vega Strike\Vegastrike-0.5.0
SIMULATION_ATOM: 0.05
['C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\bin\\python25.zip', '.\\DLLs', '.\\lib', '.\\lib\\plat-win', '.\\lib\\lib-tk', 'C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\bin']
['C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\modules\\builtin', 'C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\modules\\quests', 'C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\modules\\missions', 'C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\modules\\ai', 'C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\modules', 'C:\\Program Files\\Vega Strike\\Vegastrike-0.5.0\\bases']
Setting Screen to w 1024 h 768 and pitch of 4096 and 32 bpp 4 bytes per pix mode
0 joysticks were found.

The names of the joysticks are:
FactionXML:LoadXML factions.xml
Contents of star system:
<system name="Empty" background="backgrounds/black" nearstars="0" stars="0" starspread="0" y="0" z="0" x="0">

</system>


No such command: Flight::Mode::CommDockWithMe
CREATING A LOCAL SHIP : dumbfire
Hi helper play 0
redpirate37
Explorer
Explorer
Posts: 13
Joined: Fri Oct 30, 2009 8:22 am

Re: building under WinXP

Post by redpirate37 »

Finally after a few hours i found a solution, not the best but one that it does it ...

btw .. The vegawiki about the german keyboard controls is a little bit out of date ... :!:

bind key="[" modifier="none" command="TurretControl"/> @ german keyboard only turretview , but no control over turret …!?

bind key="x" modifier="none" command="CommDockWithMe"
I bound it at x, anyway, the wingmans run away at fullspeed when given this order, so useless … its not in the standardinstallation or manual cfg written...

bind key="F" modifier="alt" command="CommFormUp" works like the comman dockwith me should do … together with alt 0 zero makes 9 of 10 wingmans return 2 tractorrange, nr. 10 runs away or makes a kamikaze @ my ship…
its also a wrong description @ wiki manual germankb.


bind key="x" modifier="alt" command="SwitchControl" /> its not in the german manual and not in the vegacfg …but it works ! thats what i was searching 4 , its not in the default cfg and not in the manual <!-- Achtung -->
thanks a lot

next is, how 2 make save games realy work is under dev, isnt it?
Post Reply