Skip to content

One mod just won't install

I'm in the middle of doing a fresh install of a load of mods for BG2EE. I'm installing onto a MacBook Pro. All of them have installed absolutely fine until the "Unofficial Item Pack".

I'm using "Mac WeiDU Launcher". When I click on that and then click on "Setup-Unofficial Item Pack", I get a box with;

ln: Pack: No such file or directory
ln: Pack: No such file or directory (1)

I can then press edit and it looks like I can edit some script;

(my game directory is; EskaliaMacbook⁩ ▸ ⁨Users⁩ ▸ ⁨eskalia23⁩ ▸ ⁨Beamdog Library⁩ ▸ ⁨00783⁩)

Any ideas what's stopping the install. All the other mods Ive installed have had no problems.
global BG_path

tell application "Finder"
	set this_folder to (the container of (path to me)) as alias
	set my_path to POSIX path of this_folder
	set BG_path to quoted form of my_path
end tell

set weidu_path to my_path & "weidu"

tell application "Finder" to set weidu_exists to exists my POSIX file weidu_path

if weidu_exists is false then
	
	tell application "Finder"
		set bundled_path to my_path & "Mac WeiDU Launcher.app/Contents/Resources/weidu"
		set bundled_weidu to quoted form of bundled_path
	end tell
	
	do shell script ("cp " & bundled_weidu & " " & BG_path)
	
end if

set mod_files to (do shell script "find " & BG_path & " -iname *.tp2") as text

try
	set oldDelims to AppleScript's text item delimiters
	
	set AppleScript's text item delimiters to {".tp2"}
	
	set tp2_list to text items of mod_files as list
	
	set AppleScript's text item delimiters to oldDelims
on error
	set AppleScript's text item delimiters to oldDelims
end try

set mod_list to {}

repeat with an_item in tp2_list
	try
		set oldDelims to AppleScript's text item delimiters
		set AppleScript's text item delimiters to {"/"}
		set mod_list to mod_list & last text item of an_item
		set AppleScript's text item delimiters to oldDelims
	on error
		set AppleScript's text item delimiters to oldDelims
	end try
end repeat

set chosen_mod to {choose from list mod_list} as text

try
	set oldDelims to AppleScript's text item delimiters
	set AppleScript's text item delimiters to {"setup-"}
	set corrected_mod to last text item of chosen_mod
	set AppleScript's text item delimiters to oldDelims
on error
	set AppleScript's text item delimiters to oldDelims
end try

set setup_mod to "setup-" & corrected_mod as string

set mod_path to (my_path) & (setup_mod) as string

set escaped_path to "'" & my_path & setup_mod & "'" as string

tell application "Finder" to set mod_weidu_exists to exists my POSIX file mod_path

if mod_weidu_exists is false then
	do shell script ("ln -s " & BG_path & "weidu " & BG_path & setup_mod)
else
	try
		do shell script ("rm " & escaped_path)
		do shell script ("ln -s " & BG_path & "weidu " & BG_path & setup_mod)
	end try
end if

tell application "Terminal"
	activate
	delay 1
	if (count of windows) is 0 then
		do script ("cd " & BG_path)
	else
		do script ("cd " & BG_path) in window 1
	end if
	delay 1
	do script ("./" & setup_mod) in window 1
end tell

tell application "Terminal" to activate

Comments

  • artificial_sunlightartificial_sunlight Member Posts: 601
    Is the mod using the same naming convention as the other mod. It just looks like weidu can't find the mod
Sign In or Register to comment.