diff --git a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs index 4ec19a3eaf..eaca7a3a1d 100644 --- a/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs +++ b/OpenRA.Mods.D2k/Widgets/Logic/D2kInstallFromCDLogic.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2012 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2013 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, @@ -78,15 +78,15 @@ namespace OpenRA.Mods.D2k.Widgets.Logic insertDiskContainer.IsVisible = () => false; installingContainer.IsVisible = () => true; - var dest = new string[] { Platform.SupportDir, "Content", "d2k", "Music" }.Aggregate(Path.Combine); + var destMusic = new string[] { Platform.SupportDir, "Content", "d2k", "Music" }.Aggregate(Path.Combine); + var destData = new [] { Platform.SupportDir, "Content", "d2k" }.Aggregate (Path.Combine); var copyFiles = new string[] { "music/ambush.aud", "music/arakatak.aud", "music/atregain.aud", "music/entordos.aud", "music/fightpwr.aud", "music/fremen.aud", "music/hark_bat.aud", "music/landsand.aud", "music/options.aud", "music/plotting.aud", "music/risehark.aud", "music/robotix.aud", "music/score.aud", "music/soldappr.aud", "music/spicesct.aud", "music/undercon.aud", "music/waitgame.aud" }; - // TODO: won't work yet: - //var extractPackage = "setup/setup.z"; - //var extractFiles = new string[] { "DATA.R8", "MOUSE.R8", "BLOXBASE.R8", "BLOXBAT.R8", "BLOXBGBS.R8", "BLOXICE.R8", "BLOXTREE.R8", "BLOXWAST.R8" }; + var extractPackage = "setup/setup.z"; + var extractFiles = new string[] { "SOUND.RS", "DATA.R8", "MOUSE.R8", "BLOXBASE.R8", "BLOXBAT.R8", "BLOXBGBS.R8", "BLOXICE.R8", "BLOXTREE.R8", "BLOXWAST.R8" }; var installCounter = 0; - var installTotal = copyFiles.Count(); //+ extractFiles.Count(); + var installTotal = copyFiles.Count() + extractFiles.Count(); var onProgress = (Action)(s => Game.RunAfterTick(() => { @@ -107,15 +107,15 @@ namespace OpenRA.Mods.D2k.Widgets.Logic { try { - if (!InstallUtils.CopyFiles(source, copyFiles, dest, onProgress, onError)) + if (!InstallUtils.CopyFiles(source, copyFiles, destMusic, onProgress, onError)) return; - //if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, dest, onProgress, onError)) - // return; + if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, destData, onProgress, onError)) + return; Game.RunAfterTick(() => { - statusLabel.GetText = () => "Music has been copied."; + statusLabel.GetText = () => "Game assets have been extracted."; backButton.IsDisabled = () => false; continueLoading(); }); diff --git a/mods/d2k/chrome/gameinit.yaml b/mods/d2k/chrome/gameinit.yaml index b5231e5655..28cfb35b06 100644 --- a/mods/d2k/chrome/gameinit.yaml +++ b/mods/d2k/chrome/gameinit.yaml @@ -60,7 +60,7 @@ Background@INSTALL_PANEL: Y:250 Width:PARENT_RIGHT Height:25 - Text: Put in your Dune 2000 CD and click "Copy Music" to (optionally) download the tracks. + Text: Put in your Dune 2000 CD and click "From CD" to extract game assets including music. Align:Center Button@EXTRACT_BUTTON: X:PARENT_RIGHT - 280 @@ -74,7 +74,7 @@ Background@INSTALL_PANEL: Y:PARENT_BOTTOM - 45 Width:90 Height:25 - Text:Copy Music + Text:From CD Font:Bold Button@DOWNLOAD_BUTTON: X:PARENT_RIGHT - 560 @@ -147,7 +147,7 @@ Background@INSTALL_FROMCD_PANEL: Y:20 Width:PARENT_RIGHT Height:25 - Text:Installing (Music) from CD + Text:Installing Game Assets from CD Align:Center Font:Bold Container@INSTALLING: