gistfile1.txt
# basic NSIS bookkeeping. Nothing special |
OutFile gehn_shard.exe |
RequestExecutionLevel admin |
Name 'Gehn Shard' |
Var CYAN_URULIVE_DIR |
Var INSTALL_TO_URU |
Function .onInit |
StrCpy $INSTDIR '$PROGRAMFILESGehn Shard' |
FunctionEnd |
Function findUruDir |
StrCmp $INSTALL_TO_URU 'true' skip_this_step |
ReadRegStr $CYAN_URULIVE_DIR HKLM 'SoftwareMOUL' 'Install_Dir' |
Goto done |
skip_this_step: |
Abort |
done: |
FunctionEnd |
Function verifyUruDir |
# UruExplorer only indicates Uru, not Uru Live. |
# So we also check for a PhysX DLL |
FindFirst $0 $1 $CYAN_URULIVE_DIRUruExplorer.exe |
StrCmp $1 ' bad_uru_dir |
FindClose $0 |
FindFirst $0 $1 $CYAN_URULIVE_DIRNxExtensions.dll |
StrCmp $1 ' bad_uru_dir |
FindClose $0 |
Goto done |
bad_uru_dir: |
MessageBox MB_YESNO|MB_ICONEXCLAMATION |
'The folder you selected does not appear to be a valid Uru Live |
installation. Are you sure you want to use this directory?' |
IDYES done |
Abort |
done: |
FunctionEnd |
Function checkIfDirIsUru |
# UruExplorer only indicates Uru, not Uru Live. |
# So we also check for a PhysX DLL |
FindFirst $0 $1 $INSTDIRUruExplorer.exe |
StrCmp $1 ' done |
FindClose $0 |
FindFirst $0 $1 $INSTDIRNxExtensions.dll |
StrCmp $1 ' done |
FindClose $0 |
MessageBox MB_YESNO|MB_ICONEXCLAMATION |
'Your install folder appears to be a previous Uru Live installation. |
This will work, but you will be unable to use this installation to access |
Cyan's MOULagain shard anymore. Are you sure you want to continue?' |
IDYES set_have_urudir |
Abort |
set_have_urudir: |
StrCpy $INSTALL_TO_URU 'true' |
done: |
FunctionEnd |
PageEx license |
LicenseData LICENSE.txt |
PageExEnd |
PageEx directory |
PageCallbacks ' ' checkIfDirIsUru |
PageExEnd |
PageEx directory |
Caption ': Myst Online Folder' |
DirText 'Setup needs to copy some files from your Uru Live installation. If |
you want to copy from a different Uru Live installation, click browse |
and select another folder.' 'Uru Live Directory' ' ' |
DirVar $CYAN_URULIVE_DIR |
PageCallbacks findUruDir ' verifyUruDir |
PageExEnd |
Page instfiles |
Section 'UruFiles' |
SetOutPath $INSTDIR |
File 'UruLauncher.exe' |
# These are all H'uru-Plasma specific requirements |
# They may not be needed for all shards |
File 'server.ini' |
File 'oalinst.exe' |
File 'vcredist_x86.exe' |
File 'dxwebsetup.exe' |
ExecWait 'vcredist_x86.exe /q' |
ExecWait 'oalinst.exe /s' |
ExecWait 'dxwebsetup.exe /q' |
createShortCut '$SMPROGRAMSGehn Shard.lnk' '$INSTDIRUruLauncher.exe' |
# These are the registry keys for registering the uninstaller for add/remove programs |
WriteRegStr HKLM 'SoftwareMicrosoftWindowsCurrentVersionUninstallGehnShard' |
'DisplayName' 'Gehn Shard' |
WriteRegStr HKLM 'SoftwareMicrosoftWindowsCurrentVersionUninstallGehnShard' |
'UninstallString' '$'$INSTDIRuninstall.exe$' |
writeUninstaller '$INSTDIRuninstall.exe' |
SectionEnd |
Section 'dat' |
StrCmp $INSTALL_TO_URU 'true' skip_this_step |
CreateDirectory $INSTDIRdat |
CopyFiles /Silent /FilesOnly $CYAN_URULIVE_DIRdat* $INSTDIRdat |
skip_this_step: |
SectionEnd |
Section 'sfx' |
StrCmp $INSTALL_TO_URU 'true' skip_this_step |
CreateDirectory $INSTDIRsfx |
# make sure we don't copy the cache |
CopyFiles /Silent /FilesOnly $CYAN_URULIVE_DIRsfx*.ogg $INSTDIRsfx |
skip_this_step: |
SectionEnd |
# If you have a build that supports bink, you probably want to |
# copy avi just like dat or sfx. Here's a good place to put that. |
# Give everyone permissions to write to the shard folder |
# this is needed because the patcher likes to touch itself |
Section 'hack_set_perms' |
ExecWait 'cacls '$INSTDIR' /t /e /g Users:w' |
SectionEnd |
Section 'Uninstall' |
Delete '$SMPROGRAMSGehn Shard.lnk' |
RMDir /r $INSTDIR |
Delete $INSTDIRuninstall.exe |
DeleteRegKey HKLM 'SoftwareMicrosoftWindowsCurrentVersionUninstallGehnShard' |
SectionEnd |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Jul 11, 2011 Can you tell me the differences between vcredistIA64.exe 6.3MB and vcredistx64.exe 3.0MB and vcredistx86.exe I keep getting the message that I need to do the update KB2538242. I have updated it successfully according to my update history but the message to update will not go away. I was referred to a page that said to download the update. Uninstaller: 'C:Program FilesSteamsteam.exe' steaC://uninstall/217860. PhysX Device Module; PhysXExtensions.dll - PhysXExtensions Dynamic Link. Vcredistx86.exe - Microsoft Visual C 2008 Redistributable (Microsoft Visual C.