rubrapack 매뉴얼←↑→

5 바로가기, 아이콘, "설치된 앱" 항목

목표: 시작 메뉴에 "Example Software" 폴더를 만들어 Hello 와 그 읽어보기를 넣고, 자기 아이콘을 가진 바탕화면 바로가기를 두고, "설치된 앱"의 Hello 에 아이콘과 링크를 단다.

원본 옆에 아이콘 파일 hello.ico 가 있어야 한다(아무 .ico 나 된다. 많은 그림 편집기가 저장할 수 있다).

5.1 원본#

# tutorial 05: hello.toml
format = 1

[package]
name = "Hello"
manufacturer = "Example Software"
version = "$(VERSION)"
arch = "x64"
upgrade-code = "{3F2A6C1D-8B4E-4F7A-9C2D-5E6F7A8B9C0D}"

[define]
VERSION = "1.3.0"

[arp]
icon = "hello.ico"
help = "https://example.com/hello/help"
about = "https://example.com/hello"
no-repair = true

[dir.INSTALLDIR]
path = "$(ProgramFiles)/Hello"

[dir.MenuFolder]
path = "$(Programs)/Example Software"

[file.Hello]
dir = "INSTALLDIR"
source = "dist/hello.exe"

[file.Readme]
dir = "INSTALLDIR"
source = "dist/readme.txt"

[shortcut.StartMenu]
dir = "MenuFolder"
name = "Hello"
target = "file:Hello"
description = "Says hello"
working-dir = "INSTALLDIR"

[shortcut.ReadmeLink]
dir = "MenuFolder"
name = "Hello - read me"
target = "file:Readme"

[shortcut.Desktop]
dir = "Desktop"
name = "Hello"
target = "file:Hello"
args = "--greet \"[ProductName] user\""
icon = "hello.ico"

5.2 바로가기: [shortcut.ID]#

rubrapack 이 바로가기를 위해 만든 시작 메뉴 폴더는 바로가기와 함께 제품을 지울 때 사라진다.

5.3 "설치된 앱" 항목: [arp]#

("ARP" 는 이 목록의 옛 이름 Add or Remove Programs(프로그램 추가/제거)다.)

키효과
icon = "hello.ico"목록의 아이콘
help = "https://..."Windows 가 제품과 함께 보이는 지원 링크
about = "https://..."제품의 웹 페이지
no-repair = true이 제품에 복구가 없다
no-modify = true수정/변경이 없다(패키지에 바꿀 것이 없을 때 쓸모 있다. 8장이 바꿀 것을 더한다)
no-remove = true제거가 없다. 제품은 수정에서 패키지 자신의 대화창으로 지운다(입력기나 셸 확장에 - 참조를 보라)

5.4 다른 글자로 된 이름#

name 은 어느 언어로든 쓸 수 있다(name = "안녕"). 그런데 .msi 파일 자체의 속성(자세히 탭)은 ASCII 글자만 보일 수 있어서, 그런 이름에는 ASCII 형태도 준다: [package] 의 summary-name = "Annyeong". 없으면 rubrapack 이 경고하고(RP1203) 속성에는 "rubrapack package" 가 보인다.

5.5 해 보기#

빌드하고 설치한 뒤 시작 메뉴를 연다: "Example Software" 에 "Hello" 와 "Hello - read me" 가 있고, 바탕화면에는 준 아이콘을 단 "Hello" 가 있다. "설치된 앱"에는 아이콘과 함께 Hello 가 보인다. 지우면 바로가기와 시작 메뉴 폴더도 사라진다.

5.6 안에서 무슨 일이 일어났나#

C:\work\hello> rubrapack inspect hello.msi Shortcut
Shortcut	Directory_	Name	Component_	Target	Arguments	Description	Hotkey
...
Desktop	DesktopFolder	Hello	C_2ea6d5bfd9b4a9073b30	[INSTALLDIR]hello.exe	--greet "[ProductName] user"
ReadmeLink	MenuFolder	HELLO-~1|Hello - read me	C_1643d000d3751c809248	[INSTALLDIR]readme.txt
StartMenu	MenuFolder	Hello	C_a7452f86f3da3f7d2a6c	[INSTALLDIR]hello.exe		Says hello

아이콘은 패키지 안(Icon 표)에 저장되고, "설치된 앱" 설정은 Property 표에 들어 있다:

ARPHELPLINK	https://example.com/hello/help
ARPNOREPAIR	1
ARPPRODUCTICON	RpIcon1.ico
ARPURLINFOABOUT	https://example.com/hello