Auto update - waegari/waegari.github.io GitHub Wiki
flutter_distributor๋ฅผ ์จ์ ๋ง๋ฆ
- ๋ํ ์ผํ ์ค์ ์ ์ํด์๋ inno_setup.iss ํธ์ง ํ์
- inno_setup์์ ์ฐ์ด๋ ํ๋ผ๋ฏธํฐ ๋ฑ์ ๋ํด ์์๋๋ฉด ์ข๋ค.
- ๋ ๋ฒ์ ์ ํ
์คํธ์ฉ ์ฑ ์ ์
- test100.exe (v1.0.0)
- test101.exe (v1.0.1)
-
inno_setup ๊ณต์ ๋ฌธ์์ ๊ธฐํ ์ฐธ๊ณ ์ฌํญ ํญ๋ชฉ์ ๋ด์ฉ
To easily auto update your application, first make your application somehow detect a new version of your Setup.exe and make it locate or download this new version. Then, to auto update, start your Setup.exe from your application with for example the following command line:
/SP- /silent /noicons "/dir=expand:{autopf}\My Program"
After starting setup.exe, exit your application as soon as possible. Note that to avoid problems with updating your .exe, Setup has an auto retry feature. Optionally you could also use the skipifsilent and skipifnotsilent flags and make your application aware of a '/updated' parameter to for example show a nice message box to inform the user that the update has completed.
- ์์ ์ค๋ช
์ ๋ฐ๋ผ, cmd.exe์์
test101.exe /SP- /SILENT /NOICONS
๋ฅผ ์คํํ๋ฉด ์ฌ์ฉ์๊ฐ ๋ฌด์ธ๊ฐ๋ฅผ ์ ํํ์ง ์์๋ ์ค์น(์ ๋ฐ์ดํธ)๊ฐ ์งํ๋๋ค. ์ฌ์ฉ์๋ ์ค์ง ์งํ๋ฅ ์ ๋๋ง ํ๋ฉด์์ ํ์ธํ ์ ์๋ค.
- ๋จผ์ , win+R ๋จ์ถํค๋ฅผ ์ ๋ ฅํ๊ณ iexpress.exe๋ฅผ ์ ๋ ฅํด iexpress wizard๋ฅผ ์คํํ๋ค.
- ์งํ๋จ๊ณ๋ณ ์ ํํ ์ต์
, ์
๋ ฅ๊ฐ
- Welcome page
- Create new Self Extraction Directive file
- Package purpose
- Extract files and run an installation command
- Package title
- ์ ๋นํ ํ์ดํ ์ ๋ ฅ ('test101')
- Confirmation prompt
- No prompt.
- License agreement
- Do not display a license.
- Packaged files
- Add๋ฅผ ๋๋ฌ ์์์ ์ ์ํ test101.exe ์ถ๊ฐ
- Install Program to Launch
- Install Program ์
๋ ฅ์นธ
- cmd.exe /c โtest101.exe /SP- /SILENT /NOICONSโ ์ ๋ ฅ
- โcmd.exe๋ฅผ ์ด์ด์ ๋ค์ ๋ช ๋ น์ด(โ...โ)๋ฅผ ์ํํด๋ผ(/c)โ๋ผ๋ ์๋ฏธ
- Post Install Command ์
๋ ฅ์นธ
- ์ธ ์ฑ๋ก ๋
- Install Program ์
๋ ฅ์นธ
- Show window
- Hidden ์ ํ
- ์ค์ํ๋ค. โDefaultโ ์ต์ ์ ๊ถ์ฅํ๋ ๋ชจ์์ด์ง๋ง, Default๋ฅผ ์ ํํ๋ฉด test101.exe๊ฐ ์คํ๋์ด ์ ๋ฐ์ดํธ๋ฅผ ์ํํ๋ ๋์ ๋น ์ปค๋งจ๋ ์ฐฝ์ด ๊ณ์ํด์ ๋ ์๊ฒ ๋๋ค. Hidden์ ์ปค๋งจ๋ ์ฐฝ์ ๊ฐ์ถ๋ ์ต์ ์ด๋ค.
- Hidden ์ ํ
- Finished message
- No message.
- ์๋ฃ ๋ฉ์์ง ๋ฐ์ ํ์ ์๋ค.
- No message.
- Package Name and Options
- ์์ฑํ ํ์ผ์ ๊ฒฝ๋ก์ ์ด๋ฆ ์ง์ . 'test101_update' ์ ๋ ฅํ๋ค.
- Configure restart
- No restart
- ์ค์น ์ดํ PC ์ฌ์์ ์ฌ๋ถ ์ ํ
- No restart
- Save Self Extraction Directive
- Self Extraction Directive File์ ์ ์ฅํ ๊ฒ์ธ์ง ์ ํํ๋ ๋จ๊ณ
- Save Self Extraction Directive (SED) file:
- ์๋ ์ ๋ ฅ๋ ๊ฒฝ๋ก์ ํ์ผ๋ช ๊ทธ๋๋ก ์ ํ.
- Create package
- '๋ค์'์ ๋๋ฅด๋ฉด ์์์ ์ง์ ํ ๊ฒฝ๋ก์ ํ์ผ์ด ๋ง๋ค์ด์ง๋ค.
- ์) ๊ฒฝ๋ก\test101_update.exe
- '๋ค์'์ ๋๋ฅด๋ฉด ์์์ ์ง์ ํ ๊ฒฝ๋ก์ ํ์ผ์ด ๋ง๋ค์ด์ง๋ค.
- Welcome page
updat์ ํตํ ์ ๋ฐ์ดํธ ํ ์คํธ
-
1.0.0 ๋ฒ์ ์ ์ค์นํ ํ ์คํํ๋ค. ํ์ฌ ์ฑ ๋ฒ์ ์ 1.0.0์ด๋ค. ์๋ฒ๊ฐ โ์ต์ ๋ฒ์ ์ 1.0.1์ด์ผ. (+ ๊ฒฝ๋ก โฆ์ ์ ๋ฐ์ดํธ ํ์ผ์ด ์์ด)โ๋ผ๊ณ ์๋ ค ์ค๋ค.
install now๋ฅผ ๋๋ฅด๋ฉด,
์ปค์คํฐ๋ง์ด์งํ updat๊ฐ 1.0.0 ๋ฒ์ ์ ํ๋ก๊ทธ๋จ์ ๋ซ๊ณ , ์๊น ๋ง๋ค์ด์ ์๋ฒ์ ์ฌ๋ ค๋๋ test101_update.exe๋ฅผ ๋ค์ด๋ก๋ํ ๋ค ์คํํ๋ค.
๊ทธ๋ฌ๋ฉด test101_update.exe๊ฐ ๋ช ๋ น์ด
cmd.exe /c โtest101.exe /SP- /SILENT /NOICONSโ
๋ฅผ ์ํํ๋ค.์ฌ์ฉ์ ๊ณ์ ์ปจํธ๋กค์ด โ์ด ์ฑ์ด ๋๋ฐ์ด์ค๋ฅผ ๋ณ๊ฒฝํ๋ ๊ฒ์ ํ์ฉํ๊ฒ ๋โ๊ณ ๋ฌป๋๋ค. ์ฌ์ฉ์๊ฐ โ์โ๋ฅผ ๋๋ฅด๋ฉด, ๋ฐ๋ก ์ ๋ฐ์ดํธ๊ฐ ์งํ๋๋ค. ์์์ ์ธ๊ธํ inno_setup.iss์์, silent ์ค์น์ธ ๊ฒฝ์ฐ์๋ ์ค์น๊ฐ ์ข ๋ฃ๋๋ฉด ์ฑ์ ์คํํ๋๋ก ์ค์ ํด ๋๊ธฐ ๋๋ฌธ์, ์ ๋ฐ์ดํธ๊ฐ ๋๋๋ฉด ์๋์ผ๋ก 1.0.1 ๋ฒ์ ์ ์ฑ์ด ์คํ๋๋ค.