MSFN Forum: Run from CD or HD - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Run from CD or HD Code modifications Rate Topic: -----

#1 User is offline   mritter 

  • WPI Co-Developer
  • Group: Developers
  • Posts: 1,088
  • Joined: 13-November 05

Posted 15 January 2006 - 08:58 PM

It has been brought up several times on how to specify to launch from CD or HD, but hasn't been fully explained or done. This is what would be needed so with new versions we won't have to remember to modify generate.js each time (like I just forgot to do).


It would be the easiest to put this in useroptions.js:

var launchFrom=CD; or =HD;


Then in generate.js do this check in FindCDRom():

if (launchFrom==CD)
{
.....
FileExists(WIN51)
.....
}
else
{
....
FileExists{WPI.ICO)
....
}


The above will only work if you can get the variable from useroptions.js and pass it to generate.js

Or put it in the temp registry entries.


If you can pass it from useroptions.js, then add on option to the configwizard.js to specify our choice.


#2 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,653
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 15 January 2006 - 09:01 PM

So why dont you add a new section to the options wizard?
For install method choices.
Let me know what you figure out...

#3 User is offline   mritter 

  • WPI Co-Developer
  • Group: Developers
  • Posts: 1,088
  • Joined: 13-November 05

Posted 15 January 2006 - 10:13 PM

OK. I modified the code to add this to the Options Wizard:


Install from CD? o Yes o No Launch WPI from CDROM, not from harddrive


(Default is no.)


Then in generate.js it automatically checks what your choice is and checks for either WPI.ICO or WIN51 and sets the path accordingly.

Below is the zipped file with the 3 modified files. It will work fine with your old useroptions.js file, then when you save your new choice for install method, it will add the new line. (backward compatible).

So now, with every new version you will not have to manually edit generate.js!!!



As always, let me know if there are any bugs. It works on my system........Murphy's Law of programming.

#4 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,653
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 15 January 2006 - 10:39 PM

Quick question? Which version of WPI did you get the files from?? Are they from the newest beta?

Looks nice so far thanks.

#5 User is offline   mritter 

  • WPI Co-Developer
  • Group: Developers
  • Posts: 1,088
  • Joined: 13-November 05

Posted 15 January 2006 - 10:46 PM

Yes, 4.3.8b

#6 User is offline   Solid as a rock 

  • So solid as a rock is
  • PipPipPipPipPip
  • Group: Members
  • Posts: 718
  • Joined: 30-May 04

Posted 15 January 2006 - 11:25 PM

mritter, thanks for emailing me, i like your idea too. :thumbup

i make the same mistake as you (forgotting to edit generate.js) and didnt know anymore exactly which files to edit, so i stay at the old version (4.3.5). :blushing:

Now, i hope kelsenellenelvian grab your ideas and put it in the new version. B)

#7 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,653
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 15 January 2006 - 11:35 PM

They will be added into the next version.

#8 User is offline   Solid as a rock 

  • So solid as a rock is
  • PipPipPipPipPip
  • Group: Members
  • Posts: 718
  • Joined: 30-May 04

Posted 15 January 2006 - 11:47 PM

View Postkelsenellenelvian, on Jan 16 2006, 06:35 AM, said:

They will be added into the next version.

Nice to hear that. :thumbup

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy