remove sdk download workaround
This commit is contained in:
		
							parent
							
								
									897f9cd569
								
							
						
					
					
						commit
						4feeb24123
					
				
					 2 changed files with 2 additions and 30 deletions
				
			
		
							
								
								
									
										8
									
								
								justfile
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								justfile
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,18 +1,14 @@
 | 
			
		|||
bin := "Rush.pdx"
 | 
			
		||||
playdate_sdk_version := "2.6.2"
 | 
			
		||||
export PLAYDATE_SDK_PATH := x"~/.local/bin/PlaydateSDK-" + playdate_sdk_version
 | 
			
		||||
export PLAYDATE_SDK_PATH := `dirname $(which pdc)` / ".."
 | 
			
		||||
 | 
			
		||||
alias b := build
 | 
			
		||||
build:
 | 
			
		||||
    $PLAYDATE_SDK_PATH/bin/pdc src {{ bin }}
 | 
			
		||||
    pdc src {{ bin }}
 | 
			
		||||
 | 
			
		||||
alias s := simu
 | 
			
		||||
simu: build
 | 
			
		||||
    PlaydateSimulator {{ bin }}
 | 
			
		||||
 | 
			
		||||
setup:
 | 
			
		||||
    tools/download-sdk.nu {{ playdate_sdk_version }}
 | 
			
		||||
 | 
			
		||||
alias pxl := pixelorama
 | 
			
		||||
pixelorama:
 | 
			
		||||
    pixelorama
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,24 +0,0 @@
 | 
			
		|||
#!/usr/bin/env nu
 | 
			
		||||
 | 
			
		||||
def main [version: string] {
 | 
			
		||||
  let sdk_path = $"~/.local/bin/PlaydateSDK-($version)" | path expand
 | 
			
		||||
  if ($sdk_path | path exists) {
 | 
			
		||||
    print $"SDK already installed at ($sdk_path)"
 | 
			
		||||
    return
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  let sdk_url = $"https://download.panic.com/playdate_sdk/Linux/PlaydateSDK-($version).tar.gz"
 | 
			
		||||
  let out_path = mktemp --tmpdir $"PlaydateSDK-($version)-XXX.tar.gz"
 | 
			
		||||
  
 | 
			
		||||
  http get $sdk_url | save --raw --progress --force $out_path
 | 
			
		||||
 | 
			
		||||
  let parent_dir = $sdk_path | path dirname
 | 
			
		||||
  mkdir $parent_dir
 | 
			
		||||
  let uncompress = tar xf $out_path --directory $parent_dir | complete
 | 
			
		||||
  if $uncompress.exit_code != 0 {
 | 
			
		||||
    print --stderr $uncompress.stderr
 | 
			
		||||
    exit 1
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  run-external sudo $"($sdk_path)/setup.sh"
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue