diff --git a/README.md b/README.md index 072f273e3..61395ade3 100644 --- a/README.md +++ b/README.md @@ -63,10 +63,12 @@ alone: one of us can't write C++, and the other can't hear the chirping. Prerequisites (one time): +Download the MacOS Vulkan SDK from https://vulkan.lunarg.com/sdk/home and install locally. + ```sh # Toolchain xcode-select --install -brew install cmake ninja meson pkgconf +brew install cmake ninja meson pkgconf libpng ffmpeg brew install --cask steamcmd # vcpkg (full clone — a shallow clone breaks manifest baselines) @@ -84,7 +86,7 @@ git clone https://github.com/ammaarreshi/Generals-Mac-iOS-iPad.git GeneralsX cd GeneralsX ./scripts/build/macos/build-macos-zh.sh # checks deps, configures, builds ./scripts/build/macos/deploy-macos-zh.sh # creates ~/GeneralsX/GeneralsZH + run.sh -./scripts/get-assets.sh # fetches game data you own +./scripts/get-assets.sh # fetches game data you own. Note that this will prompt you for your Steam Guard code, etc. cd ~/GeneralsX/GeneralsZH && ./run.sh -win ``` @@ -104,10 +106,78 @@ GX_TEAM_ID= GX_BUNDLE_ID=com.you.generalszh \ ./scripts/build/ios/package-ios-zh.sh --install # assembles, signs, installs ``` -Find your team id in Xcode → Settings → Accounts. Assets ship inside the app -bundle (self-contained install); `--dev` skips the ~2.7 GB copy for fast code +Assets ship inside the app bundle (self-contained install); `--dev` skips the ~2.7 GB copy for fast code iteration. +Note that you will need to register your device in XCode before the deployment. + +### Finding your Apple Developer Account Team ID + +If you have a paid Apple Developer account, you can find your team id in Xcode → Settings → Accounts. + +Altnernatively if you have a free Apple Developer account: + +- Open Xcode on your Mac. +- Go to Settings then Accounts. +- Sign in with your Apple ID. +- Click Manage Certificates and add a new certificate. +- Open the Mac app Keychain Access and go to the login keychain. +- Under My Certificates, double click your Apple Development certificate. +- Your Team ID is the string of letters and numbers next to Organizational Unit + +### Fixing Missing Vulcan Headers Error + +When running `cmake --build build/ios-vulkan --target z_generals` you may see an error referring to missing Vulcan headers. This requires the path to the header include files to be set explicity using the commands below. + +``` +export C_INCLUDE_PATH=$VULKAN_SDK/include +export CPLUS_INCLUDE_PATH=$VULKAN_SDK/include +``` + +### Fixing Missing d3d11_4.h file not found Error + +When running `cmake --build build/ios-vulkan --target z_generals` you may see an error referring to a missing d3d11_4.h file. + +You can check if the files are missing by running `find references/fbraz3-dxvk -name d3d11_4.h`. If nothing is returned, then this requires fixing the DXVK submodule using the commands below + +``` +git submodule update --init --recursive +``` + +### Fixing Bundle Identifier Errors + +You may get a Bundle Identifier error when attemtping to run the XCode project from within XCode. + +> Failed Registering Bundle Identifier +> The app identifier "me.ammaar.generalszh" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again. + +This can be fixed by changing the Product Bundle Identifier under `Build Settings` -> `Signing & Capabilities` -> `Bundle Identifier` in XCode to the another value - e.g. `me.myname.generalszh`. Save the project but do not attempt to run and deploy the app from XCode at this stage. + +### Fixing ERROR: The specified device was not found + +You may see ann error when you attempt to install the app using the `./scripts/build/ios/package-ios-zh.sh --install` command. + +``` +ERROR: The specified device was not found. +(Name: 13-inch) +``` + +This can be fixed by manually installing the app using `xcrun devicectl device install app --device "YOUR DEVICE NAME" GeneralsX/build/ios-package/GeneralsXZH.app`, where you device name can be obtained by running `xcrun xctrace list devices` (exluding the iOS version number) + +### Fixing this application cannot be launched errors + +After a number of days, if you are using a free Apple Developer account, your certificate will expire and you will need to rebuilt and re-upload the application. + +This can be done by executing the steps below which will re-package and sign the application, after which we will install it using `xcrun devicectl device install app --device "YOUR DEVICE NAME" GeneralsX/build/ios-package/GeneralsXZH.app` + +``` +GX_TEAM_ID= GX_BUNDLE_ID=com.you.generalszh \ + ./scripts/build/ios/package-ios-zh.sh +xcrun devicectl device install app --device "YOUR DEVICE NAME" GeneralsX/build/ios-package/GeneralsXZH.app +``` + + + ## Where things are | Path | What it is |