Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing spaces in paths #177

Closed
wants to merge 2 commits into from

Conversation

abdelaziz-mahdy
Copy link

in macos if path has spaces in it the files doesnt get copied
image

so this adds qoutes to command to fix the path space getting escaped

Copy link

vercel bot commented Apr 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
flutter-distributor-website ⬜️ Ignored (Inspect) Visit Preview Apr 16, 2024 11:02pm

@abdelaziz-mahdy
Copy link
Author

i cant find a way to test if this fix worked or not, so if it worked i would if it can be merged

i renamed my app using https://pub.dev/packages/package_rename if it helps

@lijy91
Copy link
Member

lijy91 commented Apr 16, 2024

I think you should modify the file name in make_config.yaml as follows

title: hello_world
contents:
  - x: 448
    y: 344
    type: link
    path: "/Applications"
  - x: 192
    y: 344
    type: file
-    path: anime_Hhere.app
+    path: "Anime Here.app"

My log:


===> Releasing dev-release:macos-dmg
Packaging hello_world 1.0.0+1 as dmg:
$ /Users/lijy91/fvm/versions/3.16.5/bin/flutter build macos --dart-define-from-file env.json --dart-define FLUTTER_BUILD_NAME=1.0.0 --dart-define FLUTTER_BUILD_NUMBER=1

Building macOS application...                                   
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-0004199C0A22401E, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006000-0004199C0A22401E, name:My Mac }
{
  "config": {
    "mode": "release",
    "arguments": {
      "dart-define-from-file": "env.json"
    }
  },
  "outputDirectory": "build/macos/Build/Products/Release",
  "duration": 5187,
  "outputFiles": [
    "./build/macos/Build/Products/Release/Hello World.app"
  ]
}
Successfully built Directory: 'build/macos/Build/Products/Release' in 5s
$ cp -RH build/macos/Build/Products/Release/Hello World.app dist/1.0.0+1/hello_world-1.0.0+1-macos_dmg
$ cp -RH macos/packaging/dmg/. dist/1.0.0+1/hello_world-1.0.0+1-macos_dmg
$ appdmg dist/1.0.0+1/hello_world-1.0.0+1-macos_dmg/make_config.json dist/1.0.0+1/hello_world-1.0.0+1-macos.dmg
[ 1/21] Looking for target...                [ OK ]
[ 2/21] Reading JSON Specification...        [ OK ]
[ 3/21] Parsing JSON Specification...        [ OK ]
[ 4/21] Validating JSON Specification...     [ OK ]
[ 5/21] Looking for files...                 [ OK ]
[ 6/21] Calculating size of image...         [ OK ]
[ 7/21] Creating temporary image...          [ OK ]
[ 8/21] Mounting temporary image...          [ OK ]
[ 9/21] Making hidden background folder...   [ OK ]
[10/21] Copying background...                [SKIP]
[11/21] Reading background dimensions...     [SKIP]
[12/21] Copying icon...                      [SKIP]
[13/21] Setting icon...                      [SKIP]
[14/21] Creating links...                    [ OK ]
[15/21] Copying files...                     [ OK ]
[16/21] Making all the visuals...            [ OK ]
[17/21] Blessing image...                    [ OK ]
[18/21] Unmounting temporary image...        [ OK ]
[19/21] Finalizing image...                  [ OK ]
[20/21] Signing image...                     [SKIP]
[21/21] Removing temporary image...          [ OK ]
[22/21] Removing target image...             [ OK ]

Your image is ready:
dist/1.0.0+1/hello_world-1.0.0+1-macos.dmg
{
  "config": {
    "title": "hello_world",
    "contents": [
      {
        "x": 448,
        "y": 344,
        "type": "link",
        "path": "/Applications"
      },
      {
        "x": 192,
        "y": 344,
        "type": "file",
        "path": "Hello World.app"
      }
    ]
  },
  "artifacts": [
    {
      "type": "file",
      "path": "dist/1.0.0+1/hello_world-1.0.0+1-macos.dmg"
    }
  ]
}
Successfully packaged dist/1.0.0+1/hello_world-1.0.0+1-macos.dmg

RELEASE SUCCESSFUL in 10s

@lijy91 lijy91 closed this Apr 17, 2024
@abdelaziz-mahdy
Copy link
Author

thank you having the path as you mentioned worked perfectly

  # path: anime_here.app
  path: "Anime Here.app"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants