finish MacOS packaging work, app icons
11
README.md
|
@ -12,6 +12,7 @@ This README covers build instructions, for information on Cwtch itself please go
|
|||
- `install.home.sh` installs the app into your home directory
|
||||
- `install.sys.sh` as root to install system wide
|
||||
- or run out of the unziped directory
|
||||
- MacOS: Cwtch.dmg coming soon...
|
||||
|
||||
## Running
|
||||
|
||||
|
@ -46,6 +47,16 @@ You will probably want to disable Analytics on the Flutter Tool: `flutter config
|
|||
- Follow the steps above to fetch `libCwtch-go` and `tor` (these will fetch Android versions of these binaries also)
|
||||
- run `flutter run` with an Android phone connect via USB (or some other valid debug mode)
|
||||
|
||||
### Building on MacOS
|
||||
|
||||
- get https://git.openprivacy.ca/cwtch.im/libcwtch-go/ and run `make macos`
|
||||
- copy the resulting libCwtch.dylib into this folder
|
||||
- Download and install Tor Browser (it's currrently the only way to get tor for macos)
|
||||
- `flutter build macos`
|
||||
- `./macos/package-release.sh`
|
||||
|
||||
results in a Cwtch.dmg that has libCwtch.dylib and tor in it as well and can be installed into Applications
|
||||
|
||||
### Known Platform Issues
|
||||
|
||||
- **Windows**: Flutter engine has a [known bug](https://github.com/flutter/flutter/issues/75675) around the Right Shift key being sticky.
|
||||
|
|
|
@ -115,10 +115,10 @@ class CwtchFfi implements Cwtch {
|
|||
bundledTor = "Tor\\Tor\\tor.exe";
|
||||
} else if (Platform.isMacOS) {
|
||||
cwtchDir = envVars['CWTCH_HOME'] ?? path.join(envVars['HOME']!, "Library/Application Support/Cwtch");
|
||||
if (await File("ui.app/Contents/MacOS/Tor/tor.real").exists()) {
|
||||
bundledTor = "ui.app/Contents/MacOS/Tor/tor.real";
|
||||
} else if (await File("/Volumes/cwtch/ui.app/Contents/MacOS/Tor/tor.real").exists()) {
|
||||
bundledTor = "/Volumes/cwtch/ui.app/Contents/MacOS/Tor/tor.real";
|
||||
if (await File("Cwtch.app/Contents/MacOS/Tor/tor.real").exists()) {
|
||||
bundledTor = "Cwtch.app/Contents/MacOS/Tor/tor.real";
|
||||
} else if (await File("/Volumes/Cwtch/Cwtch.app/Contents/MacOS/Tor/tor.real").exists()) {
|
||||
bundledTor = "/Volumes/Cwtch/Cwtch.app/Contents/MacOS/Tor/tor.real";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
2FFAA895D8F20891DA4D87C5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||
33CC10ED2044A3C60003C045 /* ui.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ui.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10ED2044A3C60003C045 /* Cwtch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Cwtch.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
|
@ -112,7 +112,7 @@
|
|||
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33CC10ED2044A3C60003C045 /* ui.app */,
|
||||
33CC10ED2044A3C60003C045 /* Cwtch.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -192,7 +192,7 @@
|
|||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* ui.app */;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* Cwtch.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
@ -425,6 +425,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_NAME = Cwtch;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
@ -551,6 +552,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_NAME = Cwtch;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
@ -571,6 +573,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_NAME = Cwtch;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "ui.app"
|
||||
BuildableName = "Cwtch.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -31,13 +31,13 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "ui.app"
|
||||
BuildableName = "Cwtch.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
|
@ -54,13 +54,11 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "ui.app"
|
||||
BuildableName = "Cwtch.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
|
@ -73,7 +71,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "ui.app"
|
||||
BuildableName = "Cwtch.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 207 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 6.4 KiB |
|
@ -3,14 +3,22 @@ output_iconset_name="cwtch.iconset"
|
|||
mkdir $output_iconset_name
|
||||
|
||||
sips -z 16 16 $input_filepath --out "${output_iconset_name}/icon_16x16.png"
|
||||
cp "${output_iconset_name}/icon_16x16.png" Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
|
||||
sips -z 32 32 $input_filepath --out "${output_iconset_name}/icon_16x16@2x.png"
|
||||
sips -z 32 32 $input_filepath --out "${output_iconset_name}/icon_32x32.png"
|
||||
cp "${output_iconset_name}/icon_32x32.png" Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
|
||||
sips -z 64 64 $input_filepath --out "${output_iconset_name}/icon_32x32@2x.png"
|
||||
cp "${output_iconset_name}/icon_32x32@2x.png" Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
|
||||
sips -z 128 128 $input_filepath --out "${output_iconset_name}/icon_128x128.png"
|
||||
cp "${output_iconset_name}/icon_128x128.png" Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
|
||||
sips -z 256 256 $input_filepath --out "${output_iconset_name}/icon_128x128@2x.png"
|
||||
sips -z 256 256 $input_filepath --out "${output_iconset_name}/icon_256x256.png"
|
||||
cp "${output_iconset_name}/icon_256x256.png" Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
|
||||
sips -z 512 512 $input_filepath --out "${output_iconset_name}/icon_256x256@2x.png"
|
||||
sips -z 512 512 $input_filepath --out "${output_iconset_name}/icon_512x512.png"
|
||||
cp "${output_iconset_name}/icon_512x512.png" Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
|
||||
sips -z 1024 1024 $input_filepath --out "${output_iconset_name}/icon_1024x1024.png"
|
||||
cp "${output_iconset_name}/icon_1024x1024.png" Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
|
||||
|
||||
iconutil -c icns $output_iconset_name
|
||||
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
# Run from SRCROOT
|
||||
|
||||
cp libCwtch.dylib build/macos/Build/Products/Release/ui.app/Contents/Frameworks/
|
||||
cp -r /Applications/Tor\ Browser.app/Contents/MacOS/Tor build/macos/Build/Products/Release/ui.app/Contents/MacOS/
|
||||
cp libCwtch.dylib build/macos/Build/Products/Release/Cwtch.app/Contents/Frameworks/
|
||||
cp -r /Applications/Tor\ Browser.app/Contents/MacOS/Tor build/macos/Build/Products/Release/Cwtch.app/Contents/MacOS/
|
||||
|
||||
rm cwtch.dmg
|
||||
rm Cwtch.dmg
|
||||
rm -r macos_dmg
|
||||
mkdir macos_dmg
|
||||
cp -r "build/macos/Build/Products/Release/ui.app" macos_dmg/
|
||||
cp -r "build/macos/Build/Products/Release/Cwtch.app" macos_dmg/
|
||||
|
||||
create-dmg \
|
||||
--volname "cwtch" \
|
||||
--volname "Cwtch" \
|
||||
--volicon "macos/cwtch.icns" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 800 400 \
|
||||
--icon-size 100 \
|
||||
--icon "ui.app" 200 190 \
|
||||
--hide-extension "ui.app" \
|
||||
--icon "Cwtch.app" 200 190 \
|
||||
--hide-extension "Cwtch.app" \
|
||||
--app-drop-link 600 185 \
|
||||
"cwtch.dmg" \
|
||||
"Cwtch.dmg" \
|
||||
macos_dmg
|
||||
|
|