extracting d2k setup.z works now, adapting the UI
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#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
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -78,15 +78,15 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
insertDiskContainer.IsVisible = () => false;
|
insertDiskContainer.IsVisible = () => false;
|
||||||
installingContainer.IsVisible = () => true;
|
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" };
|
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 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 extractFiles = new string[] { "DATA.R8", "MOUSE.R8", "BLOXBASE.R8", "BLOXBAT.R8", "BLOXBGBS.R8", "BLOXICE.R8", "BLOXTREE.R8", "BLOXWAST.R8" };
|
|
||||||
|
|
||||||
var installCounter = 0;
|
var installCounter = 0;
|
||||||
var installTotal = copyFiles.Count(); //+ extractFiles.Count();
|
var installTotal = copyFiles.Count() + extractFiles.Count();
|
||||||
|
|
||||||
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
|
var onProgress = (Action<string>)(s => Game.RunAfterTick(() =>
|
||||||
{
|
{
|
||||||
@@ -107,15 +107,15 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!InstallUtils.CopyFiles(source, copyFiles, dest, onProgress, onError))
|
if (!InstallUtils.CopyFiles(source, copyFiles, destMusic, onProgress, onError))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, dest, onProgress, onError))
|
if (!InstallUtils.ExtractFromPackage(source, extractPackage, extractFiles, destData, onProgress, onError))
|
||||||
// return;
|
return;
|
||||||
|
|
||||||
Game.RunAfterTick(() =>
|
Game.RunAfterTick(() =>
|
||||||
{
|
{
|
||||||
statusLabel.GetText = () => "Music has been copied.";
|
statusLabel.GetText = () => "Game assets have been extracted.";
|
||||||
backButton.IsDisabled = () => false;
|
backButton.IsDisabled = () => false;
|
||||||
continueLoading();
|
continueLoading();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ Background@INSTALL_PANEL:
|
|||||||
Y:250
|
Y:250
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
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
|
Align:Center
|
||||||
Button@EXTRACT_BUTTON:
|
Button@EXTRACT_BUTTON:
|
||||||
X:PARENT_RIGHT - 280
|
X:PARENT_RIGHT - 280
|
||||||
@@ -74,7 +74,7 @@ Background@INSTALL_PANEL:
|
|||||||
Y:PARENT_BOTTOM - 45
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:90
|
Width:90
|
||||||
Height:25
|
Height:25
|
||||||
Text:Copy Music
|
Text:From CD
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Button@DOWNLOAD_BUTTON:
|
Button@DOWNLOAD_BUTTON:
|
||||||
X:PARENT_RIGHT - 560
|
X:PARENT_RIGHT - 560
|
||||||
@@ -147,7 +147,7 @@ Background@INSTALL_FROMCD_PANEL:
|
|||||||
Y:20
|
Y:20
|
||||||
Width:PARENT_RIGHT
|
Width:PARENT_RIGHT
|
||||||
Height:25
|
Height:25
|
||||||
Text:Installing (Music) from CD
|
Text:Installing Game Assets from CD
|
||||||
Align:Center
|
Align:Center
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Container@INSTALLING:
|
Container@INSTALLING:
|
||||||
|
|||||||
Reference in New Issue
Block a user