Author Topic: "Run Freespace" Drop-In Fix  (Read 4029 times)

0 Members and 1 Guest are viewing this topic.

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
"Run Freespace" Drop-In Fix
The mention of setting up FRED2 to run a batch file instead of fs2.exe (or fs.exe which it tries now) got me thinking about ways to get FRED2 to run any copy of Freespace 2 without having to have the code and compiling it. :) So I made an extremely simple program called FS.exe that will try to run the batch file RunFS.bat. You can put whatever commands into RunFS.bat that you want. It could run FS2.exe, a modified exe (like FS2b.exe) or if you can make one you could have it run some other program.

(If you don't know how to make a batch file, just make a text file named RunFS.txt with one line: FS2.exe and change it's .txt extention to .bat. Then tell Windows you really do want to change that extention when it complains. :))

You can get my drop-in FS.exe file here:
http://members.aol.com/ArisKalzar/FS.exe
:cool:
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
"Run Freespace" Drop-In Fix
Try looking in FredView for the line:
Code: [Select]
CreateProcess("..\\..\\Fs.exe", NULL, NULL, NULL, FALSE, 0, NULL, "..\\..", &si, &pi); :nod:
-C

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
"Run Freespace" Drop-In Fix
lol, the easiest way is just to remove the "2" of fs2.exe :)
SCREW CANON!

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
"Run Freespace" Drop-In Fix
I know I could change the line in FRED2, but it wouldn't do any good since I cannot compile it. And it wouldn't help the non-programmers out there who can't compile it or other programmers without VC++ 6.0. At least until FRED2 gets ported to GCC. Also, with my thing you can do command line options and can have a batch script that does things like swap data folders, move VPs, and other stuff. It also won't break the launcher which I'm sure expects a fs2.exe. (I know you could copy it instead of renaming it, but that means more used disk space and again, no command line options.)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
"Run Freespace" Drop-In Fix
Quote
Originally posted by venom2506
lol, the easiest way is just to remove the "2" of fs2.exe :)


I'm glad someone realized that. :rolleyes: :p

Quote
Originally posted by EdrickV
I know you could copy it instead of renaming it, but that means more used disk space ...


Puh-leese... 2.21 megabytes is going to matter to someone nowadays?
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
"Run Freespace" Drop-In Fix
Quote
Originally posted by sandwich

Puh-leese... 2.21 megabytes is going to matter to someone nowadays?


It matters to me but wasn't my main concern. The -window command line option was. I'd have to do it twice and I already have multiple copies of FS2's exe (source built ones plus the original) in one of my folders. And I just wasted 400 MB to see if my computer would work in 1024x768. 2MB may not seem like much to you, but all those little files add up quickly. My 60 Gig HD is getting full.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline neimad

  • 23
"Run Freespace" Drop-In Fix
Why not add a simple configuration dialog that allows you to select the program to launch when you click the "Launch FreeSpace" menu item.

You could also include a way to include optional command line parameters.

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
"Run Freespace" Drop-In Fix
Quote
Originally posted by neimad
Why not add a simple configuration dialog that allows you to select the program to launch when you click the "Launch FreeSpace" menu item.

You could also include a way to include optional command line parameters.


I personally can't do that within FRED2, though I could make a seperate program to do something like that, because I cannot compile FRED2. (The fact that I cannot compile FRED2 is in fact the reason I made this. AFAIK nobody who's changed FS.exe to FS2.exe has posted their FRED2.exe online. DTP changed his FRED2 to run a batch file so he could do command line options.) If someone else did that they'd have to post their exe online so other people could download it and use it otherwise it wouldn't do anyone else any good. The program I made lets you chose what program(s) to run, plus add any other commands, and lets you use whatever command line options you want. And my program works with the regular :v: made FRED2. Once I get my custom launcher for my second FS2 (which uses a different registry key for it's setup options) I'll probably set the batch file to run fs2x.exe or maybe make a fs.exe program to chose which to run when I do it.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 
Re: "Run Freespace" Drop-In Fix
Quote
Originally posted by EdrickV
... So I made an extremely simple program called FS.exe that will try to run the batch file RunFS.bat. You can put whatever commands into RunFS.bat that you want. It could run FS2.exe, a modified exe (like FS2b.exe) or if you can make one you could have it run some other program.


Well, I for one understand the usefulness of this program.  Thanks, I'm sure I'll be using it.

FYI, folks - BAT files are NICE (of course, I think Micro$oft's OSes should've stopped at DOS 6.22 - but that's just me.  [grin])

  --TurboNed
"It is the year 2000, but where are the flying cars? I was promised flying cars! I don't see any flying cars. Why? Why? Why?" - [size=-2]Avery Brooks from an IBM commercial[/size]

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Re: "Run Freespace" Drop-In Fix
Quote
Originally posted by TurboNed
FYI, folks - BAT files are NICE (of course, I think Micro$oft's OSes should've stopped at DOS 6.22...


:yes2::nod::yes:
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Re: "Run Freespace" Drop-In Fix
Quote
Originally posted by EdrickV
(If you don't know how to make a batch file, just make a text file named RunFS.txt with one line: FS2.exe and change it's .txt extention to .bat. Then tell Windows you really do want to change that extention when it complains.


late, but I just thought of it.

If you cannot change the extension it is because you have the default settings for viewing files and maps.

start explorer(mind not the Internet explorer)
Go to View, select map settings / properties

select show/view
and now unmark the radio button that says "hide file name extensions on known filetypes" or something in that way as i have a Danish version.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 
"Run Freespace" Drop-In Fix
Or do this - it's so much simpler.

Start->Run: "Command.com"

Then type in "cd\Progra~1\Games\Freesp~1" unless you have Freespace 1 installed (and installed it before you installed Freespace 2) in which case you'll want to type in "cd\Progra~1\Games\Freesp~2".  (Make sure you don't actually use the quotes)

Replace the above with the correct path if it's not installed in one of those two places.

Then type "rename fs2.txt fs2.bat" (w/out the quotes, of course).

Then type exit.  There, wasn't that simple?  It doesn't require any mucking about in menus or anything - so much cleaner.

Told you DOS was good.  [grin]

  --TurboNed
"It is the year 2000, but where are the flying cars? I was promised flying cars! I don't see any flying cars. Why? Why? Why?" - [size=-2]Avery Brooks from an IBM commercial[/size]

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
"Run Freespace" Drop-In Fix
Quote
Originally posted by TurboNed
Told you DOS was good.  [grin]

  --TurboNed


Windows XP Hell!

 

Offline YodaSean

  • 27
  • i am so special
    • http://www.geocities.com/radioactiveyeti
"Run Freespace" Drop-In Fix
I'm not sure I understand all of this...
Why can't the problem be resolved by making a copy of fs2.exe and renaming it fs.exe?  I can't seem to find the reason in this thread...

 
"Run Freespace" Drop-In Fix
Quote
Originally posted by YodaSean
I'm not sure I understand all of this...
Why can't the problem be resolved by making a copy of fs2.exe and renaming it fs.exe?  I can't seem to find the reason in this thread...


One word: Flexibility.

The problem CAN be solved by simply renaming or copying fs2.exe into fs.exe.  However, if there were a program named fs.exe which called a batch file, one could incorporate all kinds of command-line arguments into the launching of FS2 through FRED2.  When one decided that he or she wanted different command line arguments, they simply edit said batch file.

  --TurboNed
"It is the year 2000, but where are the flying cars? I was promised flying cars! I don't see any flying cars. Why? Why? Why?" - [size=-2]Avery Brooks from an IBM commercial[/size]

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
"Run Freespace" Drop-In Fix
One of the main reasons I made that little program (and it really is little, 1 line of real code.) was so that I could have FRED2 run my exe (FS2X.exe) without having to name it FS.exe or have to edit and compile the FRED2 source code. (I can edit it just fine, but I can't compile it 'cause it hasn't been ported to GCC yet AFAIK. And I'm not entirely sure if it'll be able to be.)
Another reason was I wanted to have it run with the -window command line option, so I could actually catch any error messages. Once I can get -window working on this computer. (Usually when I'm switching from FRED2 to FS2 I'm testing a mission, ship, weapon, or some other modification.)
Yet another reason is that with my dual FS2 install, my modified exe, and the others I've gotten my FS2.exe files are taking up about 31MB already! (Just noticed that my GCC made ones take up 11.3 MB each. Dang.)
I may make a more full featured program later to act as a launcher/multiple FS2 exe config. (My FS2X exe uses a different registry key so I can change it's settings around without affecting my regular ones, but that means I can't use the regular launcher to configure it. I can use modified registry export files though.)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
"Run Freespace" Drop-In Fix
You really need a new / Bigger hard-drive.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
"Run Freespace" Drop-In Fix
This computer's only a bit over a year old I think. And I basically have a 50 gig HD. And I found out that stripping the debug info from my gcc exes reduced their size to about 2.80 megs which is much better. (So for all you GCC compilers, if your exes are 11 megs try running strip on them. :) ) What I should do is move my 15 gigs of Anime digi-subs to CD-Rs. Already moved about 3 gigs off my drive so Windows isn't going to complain for a while. But I can fill up any drive, this one just took a lot longer. :) My last computer had a 1.9 gig and an 8.4 gig (the latter partioned into about 2 gig logical drives) so I really got an upgrade when I got this CPU. On the other hand, I haven't even installed all of my games. :D If I wanted to I could clear up a couple gigs easily I'm sure. If my Zip drive worked I'd dump stuff on zip disks but for now that's not an option. I should clean out my drive and get rid of some old junk though.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline ZylonBane

  • The Infamous
  • 29
"Run Freespace" Drop-In Fix
Quote
Originally posted by YodaSean
Why can't the problem be resolved by making a copy of fs2.exe and renaming it fs.exe?  I can't seem to find the reason in this thread...
You ever considered applying for a programming position at Microsoft? This attitude is exactly why we NEED 50 gig harddrives for all the bloatware that's coming out these days.
ZylonBane's opinions do not represent those of the management.

 
"Run Freespace" Drop-In Fix
Quote
Originally posted by ZylonBane
You ever considered applying for a programming position at Microsoft? This attitude is exactly why we NEED 50 gig harddrives for all the bloatware that's coming out these days.


Zylon - no matter what anyone else says about you...I like you.  (-:

  --TurboNed
"It is the year 2000, but where are the flying cars? I was promised flying cars! I don't see any flying cars. Why? Why? Why?" - [size=-2]Avery Brooks from an IBM commercial[/size]