環境構築

「環境構築」の編集履歴(バックアップ)一覧はこちら

環境構築」(2012/09/16 (日) 05:47:16) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

#contents() ---- *OSX **XCode -OSX10.5.3以上必須。 ***XCode3.1+SDK2.1でコンパイルする方法 +iPhone SDK2.1をインストール +証明書を作成 ここを参考にしながら"iPhone Developer"という名前で証明書を作成 ttp://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html +証明書をTrustにする 作成した証明書をAlways Trustに変更 +Info.plistを修正 以下のInfo.plistを2カ所修正 /Developer/Platforms/iPhoneOS.platform/Info.plist 1)PROVISIONING_PROFILE_ALLOWEDをNOに変更 <key>PROVISIONING_PROFILE_ALLOWED</key> <string>YES</string> ↓ <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> 2)PROVISIONING_PROFILE_REQUIREDをNOに変更 <key>PROVISIONING_PROFILE_REQUIRED</key> <string>YES</string> ↓ <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> ***XCode3.1+SDK2.2でコンパイルする方法 +iPhone SDK2.2をインストール +証明書を作成 ここを参考にしながら"iPhone Developer"という名前で証明書を作成 ttp://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html +証明書をTrustにする 作成した証明書をAlways Trustに変更 +Info.plistを修正 ++以下のInfo.plistにキーを追記 /Developer/Platforms/iPhoneOS.platform/Info.plist ++追記するキー <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> ++追加する箇所 <key>PLIST_FILE_OUTPUT_FORMAT</key> <string>binary</string> →ここにキーを追記 <key>SDKROOT</key> <string>iphoneos2.2</string> ++最終的な内容は以下 <key>PLIST_FILE_OUTPUT_FORMAT</key> <string>binary</string> <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> <key>SDKROOT</key> <string>iphoneos2.2</string> ***XCode3.1+SDK2.2.1でコンパイルする方法 +以下のInfo.plistにキーを追記 /Developer/Platforms/iPhoneOS.platform/Info.plist +内容は以下 <key>CODE_SIGN_CONTEXT_CLASS</key> <string>XCiPhoneOSCodeSignContext</string> ... <key>SDKROOT</key> <string>iphoneos2.2.1</string> <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> ***XCode3.1+SDK2.2.1でコンパイルする方法2 正規の開発環境と同等の環境構築 [[元ネタはこちら>http://sassandroid.blogspot.com/2009/03/how-to-building-apps-on-jailbroken.html]] +Cydiaから"Mobile Installation Patch"をインストール Cydiaのリポジトリに以下のURLを追加 http://www.iphone.org.hk/apt/ Tweaksセクションから"Mobile Installation Patch"2.2.1用をインストール iPhoneを再起動 +証明書を作成 1.Macのキーチェーンアクセスを起動 2.メニューの[キーチェーンアクセス]→[証明書アシスタント]→[証明書を作成] 3.名前:"iPhone Pwned Developer"、タイプ:自己署名ルート、デフォルトを無効化にチェック 4.シリアル番号:使われていない数字なら何でもいい、有効期間:適当に設定、証明書のタイプ:コード署名 5.証明書情報:適当に入力(不要かも) 6.後は最後まで[続ける]ボタンを押す 7.できあがった証明書を"常に信頼する"に変更 +プロジェクトフォルダの"Info.plist"に以下を追加 <key>SignerIdentity</key> <string>Apple iPhone OS Application Signing</string> +プロジェクトを開き[プロジェクト]→[プロジェクト設定を編集] +ビルドタブを開き以下のユーザ定義の設定を追加する PROVISIONING_PROFILE_ALLOWED NO PROVISIONING_PROFILE_REQUIRED NO +コード署名IDの値を以下に変更 iPhone Pwned Developer +iPhoneを接続しオーガナイザに登録 +Deviceを選択してビルド ***Xcode 3.1.3+SDK3.0でコンパイルする方法 +SDK3.0をインストール、SDK2.2.1を/Developer/221にインストール sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk \ /Developer/221/Platforms/iPhoneOS.platform/Developer/SDKs sudo ln -s "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)" \ /Developer/221/Platforms/iPhoneOS.platform/DeviceSupport sudo mv /Developer/221/Platforms/iPhoneOS.platform/Developer/usr \ /Developer/221/Platforms/iPhoneOS.platform/Developer/_usr sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr \ /Developer/221/Platforms/iPhoneOS.platform/Developer +/Developer/221/Platforms/iPhoneOS.platform/Info.plist、プロジェクトのInfo.plistを以前のように編集。 +iPhone Pwned Developerの証明書を作成。 +プロジェクトのコード署名IDをiPhone Pwned Developerに設定。 +ユーザ定義の設定にPROVISIONING NOを追加。 +CydiaからInstalld Patch for OS 3.0をインストール。http://iphone.org.hk/apt/ +iPhoneを再起動。 +オーガナイザに登録し直し。 +シミュレータはXcode3.1.3でテスト。 +実機はXcode3.1.2でテスト。 いざやってみると Code Sign error: a valid provisioning profile matching the application's Identifier(r ってなったけど http://www.iphonedevsdk.com/forum/iphone-sdk-tools-utilities/20983-sdk-3-0-xcode-3-1-3-build-go-jailbroken-device-2.html#post98724 これしたら動いた ***iPhone OS 3.0.1 OS3.0の方法に加えて、 ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0\ \(7A341\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1 詳しくは http://adcdownload.apple.com/iphone/iphone_sdk_3.0__final/iphone_os_3.0.1_advisory.pdf ***Xcode 3.2+SDK3.0でコンパイルする方法 #!/bin/bash cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/ dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 count=300752 printf "\xc8\x2f\x00\x00" >> working dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=300756 seek=300756 /bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original /bin/mv working iPhoneOS\ Build\ System\ Support chmod a+x iPhoneOS\ Build\ System\ Support http://www.alexwhittemore.com/?p=270&cpage=4#comment-601 - @MBP Snow Leopard, XCode 3.2, SDK 3.0 -- XCode は前バージョンのコピーとか、消すとかいろいろする必要は無い -- 要は上のパッチと、AppSync -- AppSync は効力が消える場合があったが、再インストールでOk ***Xcode 3.2.1+SDK3.1.2でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html ***Xcode 3.2.2+SDK3.2でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html -- I want to compile. 全部 -- I want to install and debug too. は面倒なので 4. までやって -- [[ここ>http://www.iphonetechie.com/2010/05/appsync-for-ipad-3-2-firmare-how-to-install-ipa-files-on-your-ipad-detailed-tutorial/#more-1624]]とかから appsync をデバイス側でcydiaインストール -- iPad は armv7 だから ldid を[[アップデート>http://code.google.com/p/networkpx/downloads/detail?name=ldid]]する ***Xcode 3.2.5+SDK4.2でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html -- I want to compile. 全部 --- s/XCiPhoneOSCodeSignContext/XCCodeSignContext/ が一箇所増えてるがそれもやっておいた -- I want to install and debug too. 4. まで -- appsync 4.0+ をデバイス側でcydiaインストール ***Xcode 4.4+SDK5.1でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html -- I want to compile. 全部 --- フォルダが変わった /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist --- s/XCiPhoneOSCodeSignContext/XCCodeSignContext/ とりあえず全部 -- I want to install and debug too. 4. まで --- フォルダが変わった /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/Resources/iPhoneCodeSign.xcspec -- appsync 5.x+ をデバイス側でcydiaインストール ~ ~ **w/o appsync - http://codeopfer.de/?p=23 - http://www.iosopendev.com/ ~ ~ ~ ~ **MacPorts -未記載 ~ ~ ---- *Windows **Cygwin+Toolchain+iPhoneSDK -おおよその手順としては以下 +[[Cygwin>http://www.cygwin.com/]]のインストール。 +[[winChain>http://code.google.com/p/winchain/]]のpreBuiltToolchainを解凍してcygwinディレクトリにコピー。 +iPhoneSDKからヘッダとライブラリを抽出。 +コピーしたpreBuiltToolchainディレクトリにヘッダとライブラリをコピー。 ***留意点 -iPhoneSDK --AppleサイトからダウンロードするiPhoneSDKは.dmg形式なので[[HFSExplorer>http://hem.bredband.net/catacombae/index2.html]]を使って開く。 --開いた後にまた手順がある。とりあえず[[ここ>http://www.theiphonewiki.com/wiki/index.php?title=Toolchain_2.0]]参照。 -winChain --インストーラはまともに動かないので無視。 --コンパイラなどが若干古い。気になる人は[[iPhone-dev>http://code.google.com/p/iphone-dev/]]からソース取ってきてビルド。 ~ ~ ---- *Linux/Unix -http://www.saurik.com/id/4 ~ ~ ---- *iPhone **iPhoneにGCC4iPhoneとToolchain入れて、iPhoneSDKのヘッダとライブラリをコピーしてネイティブビルド ***留意点 --iPhoneでやる場合にiPhoneSDKのライブラリをiPhone元々のライブラリに上書きするとiPhoneが起動しなくなった。つまり、/libや/usr/libを上書きするなってこと。 --3.0はlibgccの問題でgccが入りません。saurik先生がlibgccをどうにかしてくれるのをまちましょう。 --3.1.2でも、どこかから取ってきたlibgcc_4.2-20080410-1-6_iphoneos-arm.deb、fake-libgcc_1.0_iphoneos-arm.deb 辺りを入れたら、cydiaからgccがインストールできた。 --標準?で入っているlibstdc++.dylibには、basic_string<wchar_t>が入っていない。wstringを使うとリンクでエラー。 --stat.h、dirent.hの変更内容を誰か教えて。toolchain2.0がinode番号を32bitで定義しているのが悪いのだけど、正しい構造体の定義がわかりません。 ~ ~
#contents() ---- *OSX **XCode -OSX10.5.3以上必須。 ***XCode3.1+SDK2.1でコンパイルする方法 +iPhone SDK2.1をインストール +証明書を作成 ここを参考にしながら"iPhone Developer"という名前で証明書を作成 ttp://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html +証明書をTrustにする 作成した証明書をAlways Trustに変更 +Info.plistを修正 以下のInfo.plistを2カ所修正 /Developer/Platforms/iPhoneOS.platform/Info.plist 1)PROVISIONING_PROFILE_ALLOWEDをNOに変更 <key>PROVISIONING_PROFILE_ALLOWED</key> <string>YES</string> ↓ <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> 2)PROVISIONING_PROFILE_REQUIREDをNOに変更 <key>PROVISIONING_PROFILE_REQUIRED</key> <string>YES</string> ↓ <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> ***XCode3.1+SDK2.2でコンパイルする方法 +iPhone SDK2.2をインストール +証明書を作成 ここを参考にしながら"iPhone Developer"という名前で証明書を作成 ttp://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/chapter_3_section_2.html +証明書をTrustにする 作成した証明書をAlways Trustに変更 +Info.plistを修正 ++以下のInfo.plistにキーを追記 /Developer/Platforms/iPhoneOS.platform/Info.plist ++追記するキー <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> ++追加する箇所 <key>PLIST_FILE_OUTPUT_FORMAT</key> <string>binary</string> →ここにキーを追記 <key>SDKROOT</key> <string>iphoneos2.2</string> ++最終的な内容は以下 <key>PLIST_FILE_OUTPUT_FORMAT</key> <string>binary</string> <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> <key>SDKROOT</key> <string>iphoneos2.2</string> ***XCode3.1+SDK2.2.1でコンパイルする方法 +以下のInfo.plistにキーを追記 /Developer/Platforms/iPhoneOS.platform/Info.plist +内容は以下 <key>CODE_SIGN_CONTEXT_CLASS</key> <string>XCiPhoneOSCodeSignContext</string> ... <key>SDKROOT</key> <string>iphoneos2.2.1</string> <key>PROVISIONING_PROFILE_ALLOWED</key> <string>NO</string> <key>PROVISIONING_PROFILE_REQUIRED</key> <string>NO</string> ***XCode3.1+SDK2.2.1でコンパイルする方法2 正規の開発環境と同等の環境構築 [[元ネタはこちら>http://sassandroid.blogspot.com/2009/03/how-to-building-apps-on-jailbroken.html]] +Cydiaから"Mobile Installation Patch"をインストール Cydiaのリポジトリに以下のURLを追加 http://www.iphone.org.hk/apt/ Tweaksセクションから"Mobile Installation Patch"2.2.1用をインストール iPhoneを再起動 +証明書を作成 1.Macのキーチェーンアクセスを起動 2.メニューの[キーチェーンアクセス]→[証明書アシスタント]→[証明書を作成] 3.名前:"iPhone Pwned Developer"、タイプ:自己署名ルート、デフォルトを無効化にチェック 4.シリアル番号:使われていない数字なら何でもいい、有効期間:適当に設定、証明書のタイプ:コード署名 5.証明書情報:適当に入力(不要かも) 6.後は最後まで[続ける]ボタンを押す 7.できあがった証明書を"常に信頼する"に変更 +プロジェクトフォルダの"Info.plist"に以下を追加 <key>SignerIdentity</key> <string>Apple iPhone OS Application Signing</string> +プロジェクトを開き[プロジェクト]→[プロジェクト設定を編集] +ビルドタブを開き以下のユーザ定義の設定を追加する PROVISIONING_PROFILE_ALLOWED NO PROVISIONING_PROFILE_REQUIRED NO +コード署名IDの値を以下に変更 iPhone Pwned Developer +iPhoneを接続しオーガナイザに登録 +Deviceを選択してビルド ***Xcode 3.1.3+SDK3.0でコンパイルする方法 +SDK3.0をインストール、SDK2.2.1を/Developer/221にインストール sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk \ /Developer/221/Platforms/iPhoneOS.platform/Developer/SDKs sudo ln -s "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0 (7A341)" \ /Developer/221/Platforms/iPhoneOS.platform/DeviceSupport sudo mv /Developer/221/Platforms/iPhoneOS.platform/Developer/usr \ /Developer/221/Platforms/iPhoneOS.platform/Developer/_usr sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr \ /Developer/221/Platforms/iPhoneOS.platform/Developer +/Developer/221/Platforms/iPhoneOS.platform/Info.plist、プロジェクトのInfo.plistを以前のように編集。 +iPhone Pwned Developerの証明書を作成。 +プロジェクトのコード署名IDをiPhone Pwned Developerに設定。 +ユーザ定義の設定にPROVISIONING NOを追加。 +CydiaからInstalld Patch for OS 3.0をインストール。http://iphone.org.hk/apt/ +iPhoneを再起動。 +オーガナイザに登録し直し。 +シミュレータはXcode3.1.3でテスト。 +実機はXcode3.1.2でテスト。 いざやってみると Code Sign error: a valid provisioning profile matching the application's Identifier(r ってなったけど http://www.iphonedevsdk.com/forum/iphone-sdk-tools-utilities/20983-sdk-3-0-xcode-3-1-3-build-go-jailbroken-device-2.html#post98724 これしたら動いた ***iPhone OS 3.0.1 OS3.0の方法に加えて、 ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0\ \(7A341\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1 詳しくは http://adcdownload.apple.com/iphone/iphone_sdk_3.0__final/iphone_os_3.0.1_advisory.pdf ***Xcode 3.2+SDK3.0でコンパイルする方法 #!/bin/bash cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/ dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 count=300752 printf "\xc8\x2f\x00\x00" >> working dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=300756 seek=300756 /bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original /bin/mv working iPhoneOS\ Build\ System\ Support chmod a+x iPhoneOS\ Build\ System\ Support http://www.alexwhittemore.com/?p=270&cpage=4#comment-601 - @MBP Snow Leopard, XCode 3.2, SDK 3.0 -- XCode は前バージョンのコピーとか、消すとかいろいろする必要は無い -- 要は上のパッチと、AppSync -- AppSync は効力が消える場合があったが、再インストールでOk ***Xcode 3.2.1+SDK3.1.2でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html ***Xcode 3.2.2+SDK3.2でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html -- I want to compile. 全部 -- I want to install and debug too. は面倒なので 4. までやって -- [[ここ>http://www.iphonetechie.com/2010/05/appsync-for-ipad-3-2-firmare-how-to-install-ipa-files-on-your-ipad-detailed-tutorial/#more-1624]]とかから appsync をデバイス側でcydiaインストール -- iPad は armv7 だから ldid を[[アップデート>http://code.google.com/p/networkpx/downloads/detail?name=ldid]]する ***Xcode 3.2.5+SDK4.2でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html -- I want to compile. 全部 --- s/XCiPhoneOSCodeSignContext/XCCodeSignContext/ が一箇所増えてるがそれもやっておいた -- I want to install and debug too. 4. まで -- appsync 4.0+ をデバイス側でcydiaインストール ***Xcode 4.4+SDK5.1でコンパイルする方法 http://networkpx.blogspot.com/2009/09/compiling-iphoneos-31-apps-with-xcode.html -- I want to compile. 全部 --- フォルダが変わった /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist --- s/XCiPhoneOSCodeSignContext/XCCodeSignContext/ とりあえず全部 -- I want to install and debug too. 4. まで --- フォルダが変わった /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/Resources/iPhoneCodeSign.xcspec -- appsync 5.x+ をデバイス側でcydiaインストール ~ ~ **w/o appsync - http://codeopfer.de/?p=23 - http://www.iosopendev.com/ ~ ~ **MacPorts -未記載 ~ ~ ---- *Windows **Cygwin+Toolchain+iPhoneSDK -おおよその手順としては以下 +[[Cygwin>http://www.cygwin.com/]]のインストール。 +[[winChain>http://code.google.com/p/winchain/]]のpreBuiltToolchainを解凍してcygwinディレクトリにコピー。 +iPhoneSDKからヘッダとライブラリを抽出。 +コピーしたpreBuiltToolchainディレクトリにヘッダとライブラリをコピー。 ***留意点 -iPhoneSDK --AppleサイトからダウンロードするiPhoneSDKは.dmg形式なので[[HFSExplorer>http://hem.bredband.net/catacombae/index2.html]]を使って開く。 --開いた後にまた手順がある。とりあえず[[ここ>http://www.theiphonewiki.com/wiki/index.php?title=Toolchain_2.0]]参照。 -winChain --インストーラはまともに動かないので無視。 --コンパイラなどが若干古い。気になる人は[[iPhone-dev>http://code.google.com/p/iphone-dev/]]からソース取ってきてビルド。 ~ ~ ---- *Linux/Unix -http://www.saurik.com/id/4 ~ ~ ---- *iPhone **iPhoneにGCC4iPhoneとToolchain入れて、iPhoneSDKのヘッダとライブラリをコピーしてネイティブビルド ***留意点 --iPhoneでやる場合にiPhoneSDKのライブラリをiPhone元々のライブラリに上書きするとiPhoneが起動しなくなった。つまり、/libや/usr/libを上書きするなってこと。 --3.0はlibgccの問題でgccが入りません。saurik先生がlibgccをどうにかしてくれるのをまちましょう。 --3.1.2でも、どこかから取ってきたlibgcc_4.2-20080410-1-6_iphoneos-arm.deb、fake-libgcc_1.0_iphoneos-arm.deb 辺りを入れたら、cydiaからgccがインストールできた。 --標準?で入っているlibstdc++.dylibには、basic_string<wchar_t>が入っていない。wstringを使うとリンクでエラー。 --stat.h、dirent.hの変更内容を誰か教えて。toolchain2.0がinode番号を32bitで定義しているのが悪いのだけど、正しい構造体の定義がわかりません。 ~ ~

表示オプション

横に並べて表示:
変化行の前後のみ表示:
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。