Development

Mac์šฉ ํŒจํ‚ค์ง€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜ ๋ฐฉ๋ฒ•

JayKim๐Ÿ™‚ 2023. 3. 18. 23:30

๋จผ์ € macdeployqt ๋กœ ํ•ด๋‹น ์•ฑ์ด ์„ค์น˜ ํด๋”๋ฅผ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์‹คํ–‰ ํ•œ๋‹ค.
macdeployqt <app_bundle_path>/foo.app

์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ˆ˜๋™์œผ๋กœ Contents/Frameworks ํด๋”์— ๋ณต์‚ฌ ํ•œ๋‹ค.
cp <original_library_path> foo.app/Contents/Frameworks/<lib_name>
์ฐธ๊ณ ๋กœ ์ •์ƒ์ ์œผ๋กœ ๋””ํ”Œ๋กœ์ด๊ฐ€ ๋˜๋ฉด ์ด ๋ถ€๋ถ„์€ ์•ˆํ•ด๋„ ๋œ๋‹ค.

๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ฒฝ๋กœ๋ฅผ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ํ™•์ธ ํ•œ๋‹ค.
otool -L <binary_file_name>

๊ธฐ๋ณธ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์•„๋‹Œ ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ฒฝ๋กœ๊ฐ€ ์‹œ์Šคํ…œ ๊ฒฝ๋กœ ์‚ฌ์šฉ ์‹œ
์™ธ๋ถ€ ๊ฒฝ๋กœ์— ์žˆ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ @executable_path/../Frameworks/ ๋‹ค์Œ ํด๋”๋กœ ๋ณ€๊ฒฝ ํ•œ๋‹ค.
install_name_tool -change <original_library_path> @executable_path/../Frameworks/<lib_name> <binary_file_name>

๋งŒ์•ฝ malformed object ์—๋Ÿฌ์‹œ
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool
๊ฒฝ๋กœ ๋ช…๋ น์–ด ์‚ฌ์šฉ ํ•˜๋ฉด ๋จ

์ฐธ๊ณ ) <binary_file_name> foo.app/Contents/MacOS/ ํด๋”์— ์žˆ๋Š” ์‹ค์ œ ๋ฐ”์ด๋„ˆ๋ฆฌ ํŒŒ์ผ์ด๋‹ค.

๋ฐ˜์‘ํ˜•

'Development' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

OpenSSL BIGNUM ( W = G(A)^d x g^D mod n ) ์˜ˆ์ œ  (0) 2023.04.27
QT์—์„œ MAC OS ์•ฑ dmg ๋งŒ๋“ค๊ธฐ  (0) 2023.03.19
[OpenSSL] Hash Value ํ•จ์ˆ˜  (0) 2022.12.09
How to add new object id in openssl library.  (0) 2017.07.17
[LDAP] This is ldif data of country code.  (0) 2017.03.15