key-screen-framework 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/installer.nsh ADDED
@@ -0,0 +1,90 @@
1
+ ; Public NSIS integration for key-screen-framework.
2
+ ; Define KEY_SCREEN_MANUAL_HOOKS before including to compose existing hooks.
3
+ !ifndef KEY_SCREEN_INSTALLER_INCLUDED
4
+ !define KEY_SCREEN_INSTALLER_INCLUDED
5
+
6
+ !ifndef BUILD_UNINSTALLER
7
+ !include nsDialogs.nsh
8
+ Var keyScreenMediaOverwriteCheckbox
9
+ Var keyScreenMediaOverwriteSelected
10
+
11
+ !macro KeyScreenMediaPage
12
+ Page custom KeyScreenMediaOptionsCreate KeyScreenMediaOptionsLeave
13
+
14
+ Function KeyScreenMediaOptionsCreate
15
+ !insertmacro MUI_HEADER_TEXT "리소스 설치 옵션" "기존 media 파일을 덮어쓸지 선택하세요."
16
+ nsDialogs::Create 1018
17
+ Pop $0
18
+ ${If} $0 == error
19
+ Abort
20
+ ${EndIf}
21
+
22
+ ${NSD_CreateLabel} 0 0 100% 36u "기본값은 기존 파일 보존입니다. 덮어쓰기를 선택하면 같은 이름의 파일을 인스톨러에 포함된 media 파일로 교체합니다."
23
+ Pop $0
24
+ ${NSD_CreateCheckbox} 0 44u 100% 20u "기존 리소스 덮어쓰기"
25
+ Pop $keyScreenMediaOverwriteCheckbox
26
+ ${If} $keyScreenMediaOverwriteSelected == ${BST_CHECKED}
27
+ ${NSD_SetState} $keyScreenMediaOverwriteCheckbox ${BST_CHECKED}
28
+ ${Else}
29
+ ${NSD_SetState} $keyScreenMediaOverwriteCheckbox ${BST_UNCHECKED}
30
+ ${EndIf}
31
+ nsDialogs::Show
32
+ FunctionEnd
33
+
34
+ Function KeyScreenMediaOptionsLeave
35
+ ${NSD_GetState} $keyScreenMediaOverwriteCheckbox $keyScreenMediaOverwriteSelected
36
+ FunctionEnd
37
+ !macroend
38
+ !endif
39
+
40
+ !macro KeyScreenInstallMedia
41
+ Push $0
42
+ !ifmacrodef KeyScreenBeforeMediaInstall
43
+ !insertmacro KeyScreenBeforeMediaInstall
44
+ !endif
45
+ DetailPrint "Installing default media..."
46
+ ClearErrors
47
+ ${If} $keyScreenMediaOverwriteSelected == ${BST_CHECKED}
48
+ ExecWait '"$INSTDIR\${APP_EXECUTABLE_FILENAME}" --install-media --overwrite-media' $0
49
+ ${Else}
50
+ ExecWait '"$INSTDIR\${APP_EXECUTABLE_FILENAME}" --install-media' $0
51
+ ${EndIf}
52
+ ${If} ${Errors}
53
+ DetailPrint "Unable to start media installation."
54
+ Abort "Media installation failed."
55
+ ${EndIf}
56
+ ${If} $0 != 0
57
+ DetailPrint "Media installation failed (exit code $0)."
58
+ Abort "Media installation failed."
59
+ ${EndIf}
60
+ !ifmacrodef KeyScreenAfterMediaInstall
61
+ !insertmacro KeyScreenAfterMediaInstall
62
+ !endif
63
+ Pop $0
64
+ !macroend
65
+
66
+ !ifndef KEY_SCREEN_MANUAL_HOOKS
67
+ !ifndef BUILD_UNINSTALLER
68
+ !ifmacrodef customPageAfterChangeDir
69
+ !error "customPageAfterChangeDir already exists. Define KEY_SCREEN_MANUAL_HOOKS and insert KeyScreenMediaPage in your hook."
70
+ !endif
71
+ !macro customPageAfterChangeDir
72
+ !ifmacrodef KeyScreenBeforeMediaPage
73
+ !insertmacro KeyScreenBeforeMediaPage
74
+ !endif
75
+ !insertmacro KeyScreenMediaPage
76
+ !ifmacrodef KeyScreenAfterMediaPage
77
+ !insertmacro KeyScreenAfterMediaPage
78
+ !endif
79
+ !macroend
80
+
81
+ !ifmacrodef customInstall
82
+ !error "customInstall already exists. Define KEY_SCREEN_MANUAL_HOOKS and insert KeyScreenInstallMedia in your hook."
83
+ !endif
84
+ !macro customInstall
85
+ !insertmacro KeyScreenInstallMedia
86
+ !macroend
87
+ !endif
88
+ !endif
89
+
90
+ !endif
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "key-screen-framework",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Screen framework for Keyescape desktop projects.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,6 +44,7 @@
44
44
  "import": "./shared/index.js"
45
45
  },
46
46
  "./package.json": "./package.json",
47
+ "./installer.nsh": "./installer.nsh",
47
48
  "./shared/types": {
48
49
  "types": "./types/shared/types.d.ts",
49
50
  "import": "./shared/types.js"
@@ -73,7 +74,8 @@
73
74
  "chunks",
74
75
  "types",
75
76
  "cli",
76
- "templates"
77
+ "templates",
78
+ "installer.nsh"
77
79
  ],
78
80
  "sideEffects": [
79
81
  "**/*.css"
@@ -49,7 +49,7 @@
49
49
  "nsis": {
50
50
  "oneClick": false,
51
51
  "allowToChangeInstallationDirectory": true,
52
- "include": "build/installer.nsh"
52
+ "include": "node_modules/key-screen-framework/installer.nsh"
53
53
  },
54
54
  "win": {
55
55
  "icon": "build/favicon.ico",
@@ -1,51 +0,0 @@
1
- !ifndef BUILD_UNINSTALLER
2
- !include nsDialogs.nsh
3
- Var mediaOverwriteCheckbox
4
- Var mediaOverwriteSelected
5
-
6
- !macro customPageAfterChangeDir
7
- Page custom MediaOptionsCreate MediaOptionsLeave
8
-
9
- Function MediaOptionsCreate
10
- !insertmacro MUI_HEADER_TEXT "리소스 설치 옵션" "기존 media 파일을 덮어쓸지 선택하세요."
11
- nsDialogs::Create 1018
12
- Pop $0
13
- ${If} $0 == error
14
- Abort
15
- ${EndIf}
16
-
17
- ${NSD_CreateLabel} 0 0 100% 36u "기본값은 기존 파일 보존입니다. 덮어쓰기를 선택하면 같은 이름의 파일을 인스톨러에 포함된 media 파일로 교체합니다."
18
- Pop $0
19
- ${NSD_CreateCheckbox} 0 44u 100% 20u "기존 리소스 덮어쓰기"
20
- Pop $mediaOverwriteCheckbox
21
- ${If} $mediaOverwriteSelected == ${BST_CHECKED}
22
- ${NSD_SetState} $mediaOverwriteCheckbox ${BST_CHECKED}
23
- ${Else}
24
- ${NSD_SetState} $mediaOverwriteCheckbox ${BST_UNCHECKED}
25
- ${EndIf}
26
- nsDialogs::Show
27
- FunctionEnd
28
-
29
- Function MediaOptionsLeave
30
- ${NSD_GetState} $mediaOverwriteCheckbox $mediaOverwriteSelected
31
- FunctionEnd
32
- !macroend
33
- !endif
34
-
35
- !macro customInstall
36
- DetailPrint "Installing default media..."
37
- ClearErrors
38
- ${If} $mediaOverwriteSelected == ${BST_CHECKED}
39
- ExecWait '"$INSTDIR\${APP_EXECUTABLE_FILENAME}" --install-media --overwrite-media' $0
40
- ${Else}
41
- ExecWait '"$INSTDIR\${APP_EXECUTABLE_FILENAME}" --install-media' $0
42
- ${EndIf}
43
- ${If} ${Errors}
44
- DetailPrint "Unable to start media installation."
45
- Abort "Media installation failed."
46
- ${EndIf}
47
- ${If} $0 != 0
48
- DetailPrint "Media installation failed (exit code $0)."
49
- Abort "Media installation failed."
50
- ${EndIf}
51
- !macroend