CUI에서 apk~Unity부터 구성편 만들기

개시하다


이번에는 주로 유니티 빌딩을 정리했다.
구축할 때 사용하는 리눅스는 여러 가지 이유가 아니라 사쿠라의 VPS다.

컨디션

  • Unity 터미널 설치
  • Android Project에서 apk로 구축된 Linux
  • Android SDK 또는 ADT가 설정되어 있어야 합니다.
    다음을 참조하십시오.
    CUI의 apk 창설 ~ 환경 설정 편
    http://qiita.com/nofrmm/items/d54f4b095026de98bc88
    Get the Android SDK
    http://developer.android.com/sdk/index.html

    Unity에서 SDK 경로가 설정되지 않은 경우


    키스토어가 프로젝트 파일을 제작하고 Export할 때 설정한 경보가 나왔습니다.
    의식적으로 설정할 때는 아래의 내용에 따라 설정하시오
    Unity에서 Unity Pleferences 선택


    구축할 프로젝트 파일


    확인하는 방법은 다음과 같습니다.
  • android 명령으로 제작
  • Eclipse로 제작
  • Unity를 통한 제작
  • 이번 처리는 Unity의 안드로이드 프로그램 구축에서 나온 것입니다.

    Unity에서 프로젝트 파일 만들기


    유량

  • 유니티로 키스토어 만들기
  • Unity에서 안드로이드용 프로젝트 파일 쓰기
  • Linux 서버에서 빌드
  • 로 변환
  • release용 apk
  • 제작

    유닛으로 키스토어 만들기.



    keystore password, Confirm keystore password 추가
    Keystore 찾아보기 버튼을 누릅니다.

    keystore를 파일로 저장

    Alias에서 Createa newkey 선택

    여러 가지를 설정한 후 크리에이트 키 버튼을 누릅니다. ※설정 값이 적합

    Alias 추가

    작성 완료

    Android에 대한 프로젝트 파일 나열


    Unity에서 File>Build Settings 선택

    구글 안드로이드 프로젝트 선택

    Export할 폴더 선택

    되다

    사전에 준비를 길게 했어요.

    Android Project 작성


    release 버전을 제작 중입니다.

    프로젝트 파일 변환


    AndroidSDK의 android 명령을 사용합니다.
    명령 사용 방법 정보
    android --help
    확인
    참고 자료
    http://qiita.com/nofrmm/items/d54f4b095026de98bc88#2-10
    폴더 이름(New Unity Project 4)이 적합하므로 알기 어렵습니다.
    $android 업데이트 프로젝트-p[Android Project 디렉토리]
    예제
    $ android update project -p ./New\Unity\Project\4/
    결과의 한 예.
    $ android update project -p ./New\Unity\Project\4/
    Updated local.properties
    No project name specified, using Activity name 'QCARPlayerNativeActivity'.
    If you wish to change it, edit the first line of build.xml.
    Added file ./New Unity Project 4/build.xml
    Added file ./New Unity Project 4/proguard-project.txt
    build.xml 및 Projecttxt가 추가되었습니다.
    ※ ant.잠시 후properties를 준비하세요.

    Ant를 통해 APK 만들기


    ant.properties가 없기 때문에 프로젝트 파일을 새로 만들어서 거기서 가져옵니다.
    $android create 프로젝트-t1-k [포장 이름]-p[프로젝트 이름]-a[Activity 이름]
    변환된 Android 프로젝트 폴더 바로 아래에 놓습니다.

    Ant 설정


    키스토어의 배치 위치 및 Alias 이름을 지정합니다.
    ant.properties
    # This file is used to override default values used by the Ant build system.
    #
    # This file must be checked into Version Control Systems, as it is
    # integral to the build system of your project.
    
    # This file is only used by the Ant script.
    
    # You can use this to override default values such as
    #  'source.dir' for the location of your java source folder and
    #  'out.dir' for the location of your output folder.
    
    # You can also use it define how the release builds are signed by declaring
    # the following properties:
    #  'key.store' for the location of your keystore and
    #  'key.alias' for the name of the key to use.
    # The password will be asked during the build when you use the 'release' target.
    
    key.store=../../keystore/user.keystore
    key.alias=testtest
    
    이렇게 실행하면 비밀번호가 요구될 것이다.
    나 그거 싫어.
    build.참조 추가 xml

    프로파일에서


    android-sdk-linux/tools/ant/build.xml
        <!-- properties for signing in release mode -->
        <condition property="has.keystore">
            <and>
                <isset property="key.store" />
                <length string="${key.store}" when="greater" length="0" />
                <isset property="key.alias" />
            </and>
        </condition>
        <condition property="has.password">
            <and>
                <isset property="has.keystore" />
                <isset property="key.store.password" />
                <isset property="key.alias.password" />
            </and>
        </condition>
    
    에 암호 매개변수 추가
    ant.properties
    (略)
    key.store=../../keystore/user.keystore
    key.alias=testtest
    key.store.password=
    key.alias.password=
    
    이렇게 하면 운행 중에 비밀번호를 묻지 않을 것이다.

    Ant 빌딩에 있어요.


    $ ant release

    하면, 만약, 만약...


    /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
    기다리다
    부족한 것은 더한 느낌으로 설정한다.
    ※ 공유 서버의 다른 사용자는 환경 설정에 유의하십시오.
    참고 자료
    http://qiita.com/nofrmm/items/d54f4b095026de98bc88#3-4

    최후


    해변의 곳은 잠시 후에 추서하겠습니다.
    Unity Export 에서 제작된 Android Manifest 입니다.xml과 안드로이드SDK의 차이점 있다
    SDK가 64비트를 고려하지 않은 경우 시간이 지나면 Google이 처리할 것입니다.
    개발기에 있는 유니티도 ADT가 필요 없고 SDK를 의식할 필요가 있다.특히 안드로이드 매니저를 사용하기 위해 GUI에 의존하면 버릴 수 있다.
    서버 사용의 장점은 작업 기계의 자원을 보호하고
    만약 많은 구성원이 있다면 환경을 구축하는 데 낭비하는 시간을 줄일 수 있다
    단점은 환경 구축과 유니티와 안드로이드의 규격 변경이 대응한다는 점이다.
    CI 환경의 구축은 매우 어렵다고 상상할 수 있다.

    좋은 웹페이지 즐겨찾기