-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJellyfinScript_Obsolete.bak
153 lines (109 loc) · 3.56 KB
/
JellyfinScript_Obsolete.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#XaToR's Script for Compiling Jellyfin for Tizen TVs
#A little guide
$wsh = New-Object -ComObject Wscript.Shell
$wsh.Popup("Welcome to Jellyfin for Tizen Compilation Script:
-1. This will check requirements and help to compile Jellyfin.wgt for Tizen TVs
-2. This script will ask you to create a Samsung Certificate using Tizen Studio Certificate Manager.
-3. This script will ask you to add your TVs into Tizen Studio Device Manager.
-4. Check https://github.com/xatornet/Jellyfin-for-Tizen-Compiling-Script for a detailed guide.")
#Checking requirements
#Is Tizen-Studio with Native CLI installed?
$TizenStudioCorrect = Test-Path "C:\tizen-studio\tools\ide\bin\tizen.bat"
if ( $TizenStudioCorrect )
{
$wsh.Popup("Tizen Studio/Native CLI detected.")
}
else
{
$wsh.Popup("Tizen Studio/Native CLI not detected.Please install it properly.
Script exiting...")
Exit
}
#Is GIT installed?
$GitInstalled = Test-Path "C:\Program Files\Git\bin\git.exe"
if ( $GitInstalled )
{
$wsh.Popup("Git detected.")
}
else
{
$wsh.Popup("Git not detected. Please, install it properly.
Script exiting...")
Exit
}
#Is Node & Yarn installed?
$Nodeinstalled = Test-Path "C:\Program Files\nodejs\npm"
if ( $Nodeinstalled )
{
$wsh.Popup("Node.js detected, installing Yarn and resuming script...")
npm install --global yarn --silent
}
else
{
$wsh.Popup("Node.js not detected. Please isntall it properly.
Script exiting...")
Exit
}
#Repo cloning
cls
Write-Output "CREATING DIRECTORIES"
Start-Sleep -Seconds 2
New-Item "C:\Jellyfin" -itemType Directory
Write-Output "DIRECTORY CREATED"
Start-Sleep -Seconds 2
cls
Start-Sleep -Seconds 2
Write-Output "CLONING REPOSITORIES"
Start-Sleep -Seconds 2
cd c:\Jellyfin
git clone https://github.com/jellyfin/jellyfin-web.git -b release-10.8.z jellyfin-web
git clone https://github.com/jellyfin/jellyfin-tizen.git
cls
Start-Sleep -Seconds 2
Write-Output "INSTALLING MODULES"
Start-Sleep -Seconds 2
#Node Requirement (not in wiki)
npm install -g win-node-env
$wsh.Popup("Please, do this now (follow Steps 6 to 9 from WIKI):
-1. Open Tizen Studio Certificate Manager, sign in with your Samsung Account and create a Samsung Certificate.
-2. Add all of your TVs UUID inside this certificate. You can get these adding them inside Tizen Studio Device Manager.
-3. Be sure to have all this TVs with Dev Mode enabled..
-4. Once this is done, press to continue...")
cls
Start-Sleep -Seconds 2
Write-Output "COMPYLING JELLYFIN-WEB"
Start-Sleep -Seconds 2
#jellyfin-web compilation
cd jellyfin-web
$env:SKIP_PREPARE=1
npm ci --no-audit
npm run build:production
cd..
cls
Start-Sleep -Seconds 2
Write-Output "COMPYLING JELLYFIN-TIZEN"
Start-Sleep -Seconds 2
#jellyfin-tizen compilation
cd jellyfin-tizen
#get JELLYFIN_WEB_DIR to the dist folder
$env:JELLYFIN_WEB_DIR="C:\jellyfin\jellyfin-web\dist"
npm ci --no-audit
cls
Start-Sleep -Seconds 2
Write-Output "BUILDING JELLYFIN APP"
Start-Sleep -Seconds 2
#Building App
$env:Path +=";C:\tizen-studio\tools\ide\bin"
tizen.bat build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock"
tizen.bat package -t wgt -o . -- .buildResult
Start-Sleep -Seconds 2
Write-Output "SCRIPT ENDED"
Start-Sleep -Seconds 2
$wsh.Popup("Job Done:
-1. Jellyfin.wgt should be created inside C:\jellyfin\jellyfin-tizen\.
-2. Open Tizen Studio Device Manager and connect to all your TVs.
-3. Right click on them and use PERMIT TO INSTALL APPLICATIONS first on each TV.
-4. Once this is done, right click on them again and use INSTALL APP, and select Jellyfin.wgt.
-5. It should be installed and working.
Goodbye :-)")
Exit