forked from Nexus/nexus
Fix macOS/iOS CI: chmod needs sudo, Nix store frameworks are root-owned
This commit is contained in:
parent
3019449e0b
commit
12d552e4a6
9 changed files with 39 additions and 39 deletions
13
.github/workflows/ios.yml
vendored
13
.github/workflows/ios.yml
vendored
|
|
@ -22,7 +22,18 @@ jobs:
|
||||||
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
|
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build ios --release --no-codesign"
|
run: |
|
||||||
|
nix develop --command bash -c '
|
||||||
|
set -e
|
||||||
|
flutter pub get
|
||||||
|
dart scripts/generate.dart
|
||||||
|
flutter pub run build_runner build
|
||||||
|
|
||||||
|
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
|
||||||
|
sudo find -L "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} +
|
||||||
|
|
||||||
|
flutter build ios --release --no-codesign
|
||||||
|
'
|
||||||
|
|
||||||
# Unsigned IPA: SideStore/AltStore re-sign this on-device with the
|
# Unsigned IPA: SideStore/AltStore re-sign this on-device with the
|
||||||
# user's own Apple ID at install time, so no certificate is needed here.
|
# user's own Apple ID at install time, so no certificate is needed here.
|
||||||
|
|
|
||||||
13
.github/workflows/macos.yml
vendored
13
.github/workflows/macos.yml
vendored
|
|
@ -22,7 +22,18 @@ jobs:
|
||||||
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
|
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build macos --release"
|
run: |
|
||||||
|
nix develop --command bash -c '
|
||||||
|
set -e
|
||||||
|
flutter pub get
|
||||||
|
dart scripts/generate.dart
|
||||||
|
flutter pub run build_runner build
|
||||||
|
|
||||||
|
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
|
||||||
|
sudo find -L "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} +
|
||||||
|
|
||||||
|
flutter build macos --release
|
||||||
|
'
|
||||||
|
|
||||||
- name: Upload installer artifact
|
- name: Upload installer artifact
|
||||||
uses: actions/upload-artifact@v6
|
uses: actions/upload-artifact@v6
|
||||||
|
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -42,3 +42,6 @@ password.txt
|
||||||
|
|
||||||
# Nix
|
# Nix
|
||||||
/result
|
/result
|
||||||
|
|
||||||
|
# Local IPA builds
|
||||||
|
*.ipa
|
||||||
|
|
@ -336,7 +336,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export PATH=\"$PROJECT_DIR/scripts:$PATH\"\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||||
};
|
};
|
||||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
@ -351,7 +351,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export PATH=\"$PROJECT_DIR/scripts:$PATH\"\n/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||||
};
|
};
|
||||||
EE82EC529EB6C0F1FA480659 /* [CP] Check Pods Manifest.lock */ = {
|
EE82EC529EB6C0F1FA480659 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Workaround for NixOS/nixpkgs#405066: frameworks copied from the Nix store
|
|
||||||
# stay read-only, so lipo can't write its temporary output file when Flutter
|
|
||||||
# thins them during the build. Make the framework writable before delegating
|
|
||||||
# to the real lipo.
|
|
||||||
for arg in "$@"; do
|
|
||||||
case "$arg" in
|
|
||||||
*/*.framework/*)
|
|
||||||
fw_dir="${arg%.framework/*}.framework"
|
|
||||||
chmod -R +w "$fw_dir" 2>/dev/null
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
exec /usr/bin/lipo "$@"
|
|
||||||
|
|
@ -234,7 +234,10 @@ class Composer extends HookConsumerWidget {
|
||||||
child: TextField(
|
child: TextField(
|
||||||
maxLines: 12,
|
maxLines: 12,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
autofocus: true,
|
autofocus:
|
||||||
|
Platform.isLinux ||
|
||||||
|
Platform.isMacOS ||
|
||||||
|
Platform.isWindows,
|
||||||
decoration: .new(
|
decoration: .new(
|
||||||
hintText: "Your message here...",
|
hintText: "Your message here...",
|
||||||
border: .none,
|
border: .none,
|
||||||
|
|
|
||||||
|
|
@ -467,6 +467,8 @@ class RoomChat extends HookConsumerWidget {
|
||||||
AsyncData(:final value?) ||
|
AsyncData(:final value?) ||
|
||||||
AsyncLoading(:final value?) => CustomScrollView(
|
AsyncLoading(:final value?) => CustomScrollView(
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
|
keyboardDismissBehavior:
|
||||||
|
ScrollViewKeyboardDismissBehavior.onDrag,
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
|
||||||
|
|
@ -349,7 +349,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export PATH=\"$PROJECT_DIR/scripts:$PATH\"\necho \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
||||||
};
|
};
|
||||||
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
@ -369,7 +369,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export PATH=\"$PROJECT_DIR/scripts:$PATH\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||||
};
|
};
|
||||||
446C82D5FE82BD05F78EDA6A /* [CP] Check Pods Manifest.lock */ = {
|
446C82D5FE82BD05F78EDA6A /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Workaround for NixOS/nixpkgs#405066: frameworks copied from the Nix store
|
|
||||||
# stay read-only, so lipo can't write its temporary output file when Flutter
|
|
||||||
# thins FlutterMacOS.framework during the build. Make the framework writable
|
|
||||||
# before delegating to the real lipo.
|
|
||||||
for arg in "$@"; do
|
|
||||||
case "$arg" in
|
|
||||||
*/*.framework/*)
|
|
||||||
fw_dir="${arg%.framework/*}.framework"
|
|
||||||
chmod -R +w "$fw_dir" 2>/dev/null
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
exec /usr/bin/lipo "$@"
|
|
||||||
Loading…
Reference in a new issue