Installer 50% done. Uninstall sections need to be written.
This commit is contained in:
@@ -19,12 +19,13 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace OpenRA
|
namespace OpenRA
|
||||||
{
|
{
|
||||||
public static class Log
|
public static class Log
|
||||||
{
|
{
|
||||||
static StreamWriter writer = File.CreateText("log.txt");
|
static StreamWriter writer = File.CreateText(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + Path.DirectorySeparatorChar + "openra.log.txt");
|
||||||
|
|
||||||
static Log()
|
static Log()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
!include "MUI2.nsh"
|
!include "MUI2.nsh"
|
||||||
!include "ZipDLL.nsh"
|
!include "ZipDLL.nsh"
|
||||||
|
!include "x64.nsh"
|
||||||
|
|
||||||
Name "OpenRA"
|
Name "OpenRA"
|
||||||
OutFile "OpenRA.exe"
|
OutFile "OpenRA.exe"
|
||||||
@@ -9,8 +10,10 @@ SetCompressor lzma
|
|||||||
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
!insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
|
!insertmacro MUI_PAGE_LICENSE "..\..\COPYING"
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
;!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
@@ -40,10 +43,20 @@ SectionGroup /e "Mods"
|
|||||||
Section "Red Alert" RA
|
Section "Red Alert" RA
|
||||||
SetOutPath "$INSTDIR\mods\ra"
|
SetOutPath "$INSTDIR\mods\ra"
|
||||||
File /r "..\..\mods\ra\*.*"
|
File /r "..\..\mods\ra\*.*"
|
||||||
|
|
||||||
|
SetOutPath "$OUTDIR\packages"
|
||||||
|
NSISdl::download http://open-ra.org/packages/ra-packages.zip ra-packages.zip
|
||||||
|
ZipDLL::extractall "ra-packages.zip" "$OUTDIR"
|
||||||
|
Delete ra-packages.zip
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Command & Conquer" CNC
|
Section "Command & Conquer" CNC
|
||||||
SetOutPath "$INSTDIR\mods\cnc"
|
SetOutPath "$INSTDIR\mods\cnc"
|
||||||
File /r "..\..\mods\cnc\*.*"
|
File /r "..\..\mods\cnc\*.*"
|
||||||
|
|
||||||
|
SetOutPath "$OUTDIR\packages"
|
||||||
|
NSISdl::download http://open-ra.org/packages/cnc-packages.zip cnc-packages.zip
|
||||||
|
ZipDLL::extractall "cnc-packages.zip" "$OUTDIR"
|
||||||
|
Delete cnc-packages.zip
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Red Alert: Aftermath" Aftermath
|
Section "Red Alert: Aftermath" Aftermath
|
||||||
SetOutPath "$INSTDIR\mods\aftermath"
|
SetOutPath "$INSTDIR\mods\aftermath"
|
||||||
@@ -64,16 +77,37 @@ SectionEnd
|
|||||||
;Dependency Sections
|
;Dependency Sections
|
||||||
;***************************
|
;***************************
|
||||||
Section "-OpenAl" OpenAl
|
Section "-OpenAl" OpenAl
|
||||||
SetOutPath "$TEMP"
|
IfFileExists $SYSDIR\OpenAL32.dll done installal
|
||||||
NSISdl::download http://connect.creativelabs.com/openal/Downloads/oalinst.zip oalinst.zip
|
installal:
|
||||||
!insertmacro ZIPDLL_EXTRACT oalinst.zip OpenAL oalinst.exe
|
SetOutPath "$TEMP"
|
||||||
ExecWait "$TEMP\OpenAL\oalinst.exe"
|
NSISdl::download http://connect.creativelabs.com/openal/Downloads/oalinst.zip oalinst.zip
|
||||||
|
!insertmacro ZIPDLL_EXTRACT oalinst.zip OpenAL oalinst.exe
|
||||||
|
ExecWait "$TEMP\OpenAL\oalinst.exe"
|
||||||
|
done:
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "-Sdl" SDL
|
Section "-Sdl" SDL
|
||||||
SetOutPath "$TEMP"
|
IfFileExists $SYSDIR\SDL.dll done installsdl
|
||||||
NSISdl::download http://www.libsdl.org/release/SDL-1.2.14-win32.zip sdl.zip
|
installsdl:
|
||||||
!insertmacro ZIPDLL_EXTRACT sdl.zip $SYSDIR SDL.dll
|
SetOutPath "$TEMP"
|
||||||
|
NSISdl::download http://www.libsdl.org/release/SDL-1.2.14-win32.zip sdl.zip
|
||||||
|
!insertmacro ZIPDLL_EXTRACT sdl.zip $SYSDIR SDL.dll
|
||||||
|
done:
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "-Freetype" Freetype
|
||||||
|
IfFileExists $SYSDIR\freetype6.dll done installft
|
||||||
|
installft:
|
||||||
|
SetOutPath "$TEMP"
|
||||||
|
NSISdl::download http://downloads.sourceforge.net/project/gnuwin32/freetype/2.3.5-1/freetype-2.3.5-1-bin.zip freetype.zip
|
||||||
|
!insertmacro ZIPDLL_EXTRACT freetype.zip $OUTDIR bin\freetype6.dll
|
||||||
|
;Epic hack to get around bug in CopyFiles
|
||||||
|
${If} ${RunningX64}
|
||||||
|
CopyFiles "$OUTDIR\bin\freetype6.dll" $WINDIR\SysWOW64
|
||||||
|
Goto done
|
||||||
|
${EndIf}
|
||||||
|
CopyFiles "$OUTDIR\bin\freetype6.dll" $SYSDIR
|
||||||
|
done:
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
;***************************
|
;***************************
|
||||||
|
|||||||
Reference in New Issue
Block a user