feat: add native macOS menu-bar application shell (#1)
No files matched your search
@@ -0,0 +1,48 @@
|
||||
# macOS metadata
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
|
||||
# Xcode per-user state and source-control metadata
|
||||
xcuserdata/
|
||||
*.xcuserstate
|
||||
*.xccheckout
|
||||
*.xcscmblueprint
|
||||
|
||||
# Local build products and diagnostics
|
||||
/DerivedData/
|
||||
/build/
|
||||
/.build/
|
||||
/Archives/
|
||||
*.app/
|
||||
*.xcarchive/
|
||||
*.xcresult/
|
||||
*.dSYM/
|
||||
*.dSYM.zip
|
||||
|
||||
# SwiftPM local workspace state (keep Package.resolved)
|
||||
.swiftpm/
|
||||
|
||||
# Distribution packages
|
||||
*.dmg
|
||||
*.pkg
|
||||
|
||||
# Local editor configuration and temporary files
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# Local secrets and signing material (keep example configuration)
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
!.env.*.example
|
||||
*.p12
|
||||
*.pfx
|
||||
*.p8
|
||||
*.mobileprovision
|
||||
*.provisionprofile
|
||||
|
||||
# Shared Xcode schemes, asset catalogs, SVG sources and lockfiles are versioned.
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="1254pt" height="1254pt" viewBox="0 0 1254 1254" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="#2e772efc">
|
||||
<path fill="#2d7930" opacity="1.00" d=" M 601.45 64.59 C 679.14 60.55 757.65 73.98 829.70 103.29 C 908.35 135.48 979.54 185.43 1036.92 248.09 C 1065.56 279.17 1090.63 313.46 1112.26 349.76 C 1150.08 411.67 1176.13 481.00 1186.07 552.99 C 1195.09 620.86 1192.57 690.67 1175.03 757.02 C 1149.34 854.46 1094.83 942.92 1024.77 1014.77 C 953.22 1089.22 861.85 1145.02 762.02 1172.04 C 688.96 1191.42 611.80 1195.71 537.13 1183.80 C 505.95 1178.10 474.94 1170.92 445.21 1159.76 C 411.98 1147.24 379.65 1132.12 349.18 1113.85 C 295.77 1081.74 248.11 1040.78 206.13 994.86 C 157.67 939.93 117.44 877.09 91.63 808.35 C 59.29 723.31 52.97 629.74 66.16 540.13 C 73.27 497.60 84.67 455.65 102.14 416.16 C 134.97 339.01 185.48 269.75 247.56 213.53 C 313.72 154.82 392.15 108.93 477.38 84.43 C 517.79 73.14 559.50 66.22 601.45 64.59 M 598.45 126.58 C 530.46 130.81 463.36 149.43 402.93 180.87 C 317.08 224.67 244.83 293.77 195.21 376.21 C 168.14 421.09 146.83 469.86 136.38 521.38 C 126.83 564.22 125.58 608.45 127.67 652.14 C 130.41 699.15 140.59 745.80 158.69 789.31 C 193.46 873.17 248.79 948.31 318.02 1006.97 C 349.79 1033.21 384.55 1056.04 422.28 1072.78 C 485.62 1102.02 555.19 1117.85 625.00 1117.90 C 690.88 1116.87 756.87 1103.83 817.26 1077.23 C 879.09 1050.36 934.19 1009.24 980.01 960.01 C 1020.41 916.17 1055.96 867.28 1080.98 812.99 C 1093.03 787.63 1103.28 761.31 1110.02 734.02 C 1116.30 708.39 1121.93 682.42 1122.91 655.96 C 1128.55 580.84 1116.33 504.43 1086.86 435.07 C 1057.98 369.45 1016.58 308.92 963.73 260.27 C 896.19 196.24 810.08 151.81 718.62 134.37 C 679.23 125.71 638.59 124.80 598.45 126.58 Z" />
|
||||
<path fill="#2d7930" opacity="1.00" d=" M 830.21 313.87 C 860.14 336.16 886.57 362.90 910.50 391.46 C 959.32 450.46 990.22 524.16 997.68 600.39 C 965.12 605.53 932.85 612.37 900.25 617.16 C 890.56 551.73 865.81 487.24 822.27 436.75 C 806.80 418.76 789.07 402.79 770.03 388.67 C 790.24 363.86 811.15 339.60 830.21 313.87 Z" />
|
||||
<path fill="#2d7930" opacity="1.00" d=" M 724.26 457.86 C 770.49 492.68 805.31 542.86 819.95 599.00 C 822.67 608.87 824.49 618.94 826.24 629.02 C 792.14 635.94 757.73 641.25 723.53 647.66 C 719.34 622.21 711.94 596.90 698.11 574.91 C 688.80 559.63 676.12 546.82 662.67 535.17 C 683.69 509.79 703.78 483.67 724.26 457.86 Z" />
|
||||
<path fill="#2d7930" opacity="1.00" d=" M 289.46 697.41 C 298.07 637.64 334.90 582.80 386.85 552.02 C 441.51 638.25 496.90 724.01 552.12 809.89 C 567.46 833.46 582.97 856.96 597.55 881.01 C 558.58 907.81 510.17 921.03 462.99 916.10 C 441.76 914.44 421.57 907.12 402.14 898.84 C 349.37 874.99 307.96 826.81 293.42 770.63 C 287.39 746.77 286.57 721.78 289.46 697.41 M 435.23 710.25 C 424.98 717.09 419.61 729.72 422.25 741.89 C 429.62 740.49 437.62 738.70 442.81 732.80 C 450.94 725.29 455.74 714.63 455.53 703.51 C 448.50 704.74 441.10 705.84 435.23 710.25 M 430.78 745.74 C 422.40 749.40 413.82 743.05 405.85 741.34 C 391.24 738.78 378.47 750.09 372.06 762.07 C 364.44 780.97 369.37 802.63 379.28 819.74 C 384.16 827.75 390.38 836.69 400.14 838.86 C 410.75 839.33 420.35 831.00 431.13 833.87 C 438.78 835.64 446.74 840.27 454.67 836.65 C 467.59 829.80 473.54 815.47 479.04 802.71 C 467.07 798.18 459.77 784.31 463.96 771.96 C 465.16 763.62 472.32 758.39 477.38 752.37 C 472.20 747.65 466.55 743.15 459.61 741.39 C 449.93 738.01 439.62 741.59 430.78 745.74 Z" />
|
||||
<path fill="#2d7930" opacity="1.00" d=" M 593.44 598.53 C 619.15 594.40 646.74 612.16 651.91 638.01 C 658.66 660.77 646.49 686.80 625.99 698.04 C 606.89 709.51 580.56 706.86 563.95 692.06 C 547.37 678.93 542.11 655.45 547.65 635.66 C 554.23 615.91 572.57 600.56 593.44 598.53 Z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,13 @@
|
||||
# Application artwork
|
||||
|
||||
`AppIcon.svg` is the vector master for the application icon. The circular Traccar mark remains dominant; the small Apple silhouette is transparent negative space within the lower-left dish.
|
||||
|
||||
The integrated master uses the agreed solid green `#2d7930`. It preserves the approved vector paths and canvas. The Xcode asset catalog contains the generated macOS application icon slots (16–1024 pixels) and a monochrome 18-point menu-bar template at 1× and 2×.
|
||||
|
||||
The About panel uses the bundled application icon. The menu-bar template follows system appearance and retains the artwork's transparent cutouts.
|
||||
|
||||
## Regeneration
|
||||
|
||||
Normal Xcode builds use the checked-in assets and require no additional packages. To regenerate after editing the SVG, run `node scripts/generate-icons.cjs` from the repository with Node.js and the `sharp` package available. If installed outside this repository, set `NODE_PATH` to that installation's `node_modules` directory. The initial asset generation used sharp 0.35.5.
|
||||
|
||||
The generator writes `TraccarClient/Resources/Assets.xcassets`. Each size is rasterized directly from the vector master. Preserve the SVG as the editable source.
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,43 @@
|
||||
# Traccar Client for macOS
|
||||
|
||||
An independent, unofficial native Traccar client for Apple Silicon Macs.
|
||||
|
||||
**Development status:** initial application shell for [issue #1](https://github.com/jayanezj/traccar-client-macos/issues/1). This build stays paused. Location access, tracking, server configuration and position/SOS delivery are not implemented; their menu actions are disabled.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Apple Silicon, starting with M1.
|
||||
- macOS 15.0 or later. Deployment target 15.0 does not by itself establish runtime test coverage.
|
||||
- Stable Xcode 27.1 for the initial development toolchain; Swift 6 language mode.
|
||||
|
||||
## Build and run
|
||||
|
||||
Open `TraccarClient.xcodeproj`, select the shared **TraccarClient** scheme and run the macOS target. Set Xcode's Derived Data and Archives locations to your external development volume before building if internal storage is limited.
|
||||
|
||||
For a terminal build, supply an absolute build directory on that volume:
|
||||
|
||||
```sh
|
||||
scripts/build.sh /path/to/external/build-directory Debug
|
||||
```
|
||||
|
||||
Replace the example path with your actual directory. The app is produced at `DerivedData/Build/Products/Debug/Traccar Client macOS.app` beneath it. Use `Release` instead of `Debug` for an optimized build. The shared scheme also supports archiving; configure Xcode's archive location separately.
|
||||
|
||||
The app uses ad hoc signing, with no Apple developer account, provisioning profile or paid certificate. It is not notarized. Downloaded application Gatekeeper behaviour and DMG installation will be validated in [issue #16](https://github.com/jayanezj/traccar-client-macos/issues/16).
|
||||
|
||||
## Initial shell smoke check
|
||||
|
||||
1. Launch the built app. It should show a menu-bar icon, no permanent Dock icon and a paused status.
|
||||
2. Confirm Start tracking, Send location now and Send SOS are disabled.
|
||||
3. Open Settings, close its window and reopen it from the menu. The process should remain running.
|
||||
4. Open About and check the version, unofficial-client statement and Apache-2.0 license information.
|
||||
5. Quit from the menu. The process should terminate.
|
||||
|
||||
No location permission request or server connection is part of this shell. Real-Mac UI checks remain distinct from automated compilation. Early CI is tracked in [issue #2](https://github.com/jayanezj/traccar-client-macos/issues/2), before subsequent functionality.
|
||||
|
||||
## Artwork
|
||||
|
||||
The application and menu-bar icons are derived from the editable SVG in [Artwork](Artwork/README.md). PNG assets are checked in; normal builds require no artwork tooling. The menu-bar image uses system template rendering for light and dark appearances.
|
||||
|
||||
## License
|
||||
|
||||
[Apache License 2.0](LICENSE). This project is independent of the official Traccar project and does not claim official affiliation.
|
||||
@@ -0,0 +1,33 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {};
|
||||
objectVersion = 77;
|
||||
objects = {
|
||||
A00000000000000000000001 = {isa = PBXBuildFile; fileRef = B00000000000000000000001; };
|
||||
B00000000000000000000001 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Application/TraccarClientApp.swift; sourceTree = "<group>"; };
|
||||
A00000000000000000000002 = {isa = PBXBuildFile; fileRef = B00000000000000000000002; };
|
||||
B00000000000000000000002 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Interface/TrackingMenu.swift; sourceTree = "<group>"; };
|
||||
A00000000000000000000003 = {isa = PBXBuildFile; fileRef = B00000000000000000000003; };
|
||||
B00000000000000000000003 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Interface/SettingsView.swift; sourceTree = "<group>"; };
|
||||
B00000000000000000000004 = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Resources/Info.plist; sourceTree = "<group>"; };
|
||||
A00000000000000000000004 = {isa = PBXBuildFile; fileRef = B00000000000000000000006; };
|
||||
B00000000000000000000006 = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Resources/Assets.xcassets; sourceTree = "<group>"; };
|
||||
B00000000000000000000005 = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Traccar Client macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C00000000000000000000001 = {isa = PBXGroup; children = (C00000000000000000000002, C00000000000000000000003); sourceTree = "<group>"; };
|
||||
C00000000000000000000002 = {isa = PBXGroup; children = (B00000000000000000000001, B00000000000000000000002, B00000000000000000000003, B00000000000000000000004, B00000000000000000000006); path = TraccarClient; sourceTree = "<group>"; };
|
||||
C00000000000000000000003 = {isa = PBXGroup; children = (B00000000000000000000005); name = Products; sourceTree = "<group>"; };
|
||||
D00000000000000000000001 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (A00000000000000000000001, A00000000000000000000002, A00000000000000000000003); runOnlyForDeploymentPostprocessing = 0; };
|
||||
D00000000000000000000002 = {isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = (); runOnlyForDeploymentPostprocessing = 0; };
|
||||
D00000000000000000000003 = {isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = (A00000000000000000000004); runOnlyForDeploymentPostprocessing = 0; };
|
||||
E00000000000000000000001 = {isa = PBXNativeTarget; buildConfigurationList = F00000000000000000000002; buildPhases = (D00000000000000000000001, D00000000000000000000002, D00000000000000000000003); buildRules = (); dependencies = (); name = TraccarClient; productName = "Traccar Client macOS"; productReference = B00000000000000000000005; productType = "com.apple.product-type.application"; };
|
||||
E00000000000000000000002 = {isa = PBXProject; attributes = {BuildIndependentTargetsInParallel = YES; LastUpgradeCheck = 2710; TargetAttributes = {E00000000000000000000001 = {CreatedOnToolsVersion = 27.1; }; }; }; buildConfigurationList = F00000000000000000000001; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = (en, Base); mainGroup = C00000000000000000000001; minimizedProjectReferenceProxies = 1; preferredProjectObjectVersion = 77; productRefGroup = C00000000000000000000003; projectDirPath = ""; projectRoot = ""; targets = (E00000000000000000000001); };
|
||||
F00000000000000000000001 = {isa = XCConfigurationList; buildConfigurations = (F00000000000000000000003, F00000000000000000000004); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
|
||||
F00000000000000000000002 = {isa = XCConfigurationList; buildConfigurations = (F00000000000000000000005, F00000000000000000000006); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
|
||||
F00000000000000000000003 = {isa = XCBuildConfiguration; buildSettings = {CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; SDKROOT = macosx; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone";}; name = Debug; };
|
||||
F00000000000000000000004 = {isa = XCBuildConfiguration; buildSettings = {CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; SDKROOT = macosx; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O";}; name = Release; };
|
||||
F00000000000000000000005 = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = TraccarClient/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 15.0; MARKETING_VERSION = 0.1.0; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.codigojose.traccar-client-macos; PRODUCT_NAME = "Traccar Client macOS"; SUPPORTED_PLATFORMS = macosx; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_MODULE_NAME = TraccarClient; SWIFT_VERSION = 6.0;}; name = Debug; };
|
||||
F00000000000000000000006 = {isa = XCBuildConfiguration; buildSettings = {ARCHS = arm64; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = NO; INFOPLIST_FILE = TraccarClient/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 15.0; MARKETING_VERSION = 0.1.0; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.codigojose.traccar-client-macos; PRODUCT_NAME = "Traccar Client macOS"; SUPPORTED_PLATFORMS = macosx; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_MODULE_NAME = TraccarClient; SWIFT_VERSION = 6.0;}; name = Release; };
|
||||
};
|
||||
rootObject = E00000000000000000000002;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme LastUpgradeVersion="2710" version="1.3">
|
||||
<BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry buildForTesting="NO" buildForRunning="YES" buildForProfiling="YES" buildForArchiving="YES" buildForAnalyzing="YES">
|
||||
<BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="E00000000000000000000001" BuildableName="Traccar Client macOS.app" BlueprintName="TraccarClient" ReferencedContainer="container:TraccarClient.xcodeproj"/>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<LaunchAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" launchStyle="0" useCustomWorkingDirectory="NO" ignoresPersistentStateOnLaunch="NO" debugDocumentVersioning="YES" debugServiceExtension="internal" allowLocationSimulation="NO">
|
||||
<BuildableProductRunnable runnableDebuggingMode="0">
|
||||
<BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="E00000000000000000000001" BuildableName="Traccar Client macOS.app" BlueprintName="TraccarClient" ReferencedContainer="container:TraccarClient.xcodeproj"/>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction buildConfiguration="Release" shouldUseLaunchSchemeArgsEnv="YES" savedToolIdentifier="" useCustomWorkingDirectory="NO" debugDocumentVersioning="YES">
|
||||
<BuildableProductRunnable runnableDebuggingMode="0">
|
||||
<BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="E00000000000000000000001" BuildableName="Traccar Client macOS.app" BlueprintName="TraccarClient" ReferencedContainer="container:TraccarClient.xcodeproj"/>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction buildConfiguration="Debug"/>
|
||||
<ArchiveAction buildConfiguration="Release" revealArchiveInOrganizer="YES"/>
|
||||
</Scheme>
|
||||
@@ -0,0 +1,29 @@
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct TraccarClientApp: App {
|
||||
@NSApplicationDelegateAdaptor(ApplicationDelegate.self) private var delegate
|
||||
|
||||
var body: some Scene {
|
||||
MenuBarExtra {
|
||||
TrackingMenu()
|
||||
} label: {
|
||||
Image("MenuBarIcon")
|
||||
.renderingMode(.template)
|
||||
.accessibilityLabel("Traccar Client — Paused")
|
||||
}
|
||||
.menuBarExtraStyle(.menu)
|
||||
|
||||
Settings {
|
||||
SettingsView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
final class ApplicationDelegate: NSObject, NSApplicationDelegate {
|
||||
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import SwiftUI
|
||||
|
||||
struct SettingsView: View {
|
||||
var body: some View {
|
||||
TabView {
|
||||
Form {
|
||||
LabeledContent("Status", value: "Paused")
|
||||
Text("Server and device configuration will be available in a later build.")
|
||||
}
|
||||
.tabItem { Label("Connection", systemImage: "network") }
|
||||
|
||||
Form {
|
||||
Text("Continuous tracking, manual location and SOS are not implemented yet.")
|
||||
Text("This build does not request your location or send positions.")
|
||||
}
|
||||
.tabItem { Label("Tracking", systemImage: "location") }
|
||||
|
||||
Form {
|
||||
Text("Login startup and tracking restoration are not enabled.")
|
||||
Text("Closing Settings keeps the app in the menu bar. Use Quit to exit.")
|
||||
}
|
||||
.tabItem { Label("General", systemImage: "gearshape") }
|
||||
|
||||
Form {
|
||||
LabeledContent("Status", value: "Paused")
|
||||
Text("No location or network activity is started by this application shell.")
|
||||
}
|
||||
.tabItem { Label("Diagnostics", systemImage: "waveform.path.ecg") }
|
||||
}
|
||||
.formStyle(.grouped)
|
||||
.padding()
|
||||
.frame(width: 560, height: 320)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
struct TrackingMenu: View {
|
||||
@Environment(\.openSettings) private var openSettings
|
||||
|
||||
var body: some View {
|
||||
Text("Paused")
|
||||
Text("Tracking is not available in this build.")
|
||||
|
||||
Divider()
|
||||
|
||||
Button("Start tracking") {}
|
||||
.disabled(true)
|
||||
Button("Send location now") {}
|
||||
.disabled(true)
|
||||
Button("Send SOS") {}
|
||||
.disabled(true)
|
||||
|
||||
Divider()
|
||||
|
||||
Button("Settings…") {
|
||||
NSApplication.shared.activate(ignoringOtherApps: true)
|
||||
openSettings()
|
||||
}
|
||||
.keyboardShortcut(",")
|
||||
|
||||
Button("About Traccar Client for macOS") {
|
||||
NSApplication.shared.activate(ignoringOtherApps: true)
|
||||
NSApplication.shared.orderFrontStandardAboutPanel(options: [
|
||||
.applicationName: "Traccar Client for macOS",
|
||||
.credits: NSAttributedString(
|
||||
string: "An independent, unofficial Traccar client.\nLicensed under Apache License 2.0."
|
||||
),
|
||||
])
|
||||
}
|
||||
|
||||
Divider()
|
||||
|
||||
Button("Quit Traccar Client macOS") {
|
||||
NSApplication.shared.terminate(nil)
|
||||
}
|
||||
.keyboardShortcut("q")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"images": [
|
||||
{
|
||||
"filename": "icon_16x16.png",
|
||||
"idiom": "mac",
|
||||
"size": "16x16",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_16x16@2x.png",
|
||||
"idiom": "mac",
|
||||
"size": "16x16",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_32x32.png",
|
||||
"idiom": "mac",
|
||||
"size": "32x32",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_32x32@2x.png",
|
||||
"idiom": "mac",
|
||||
"size": "32x32",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_128x128.png",
|
||||
"idiom": "mac",
|
||||
"size": "128x128",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_128x128@2x.png",
|
||||
"idiom": "mac",
|
||||
"size": "128x128",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_256x256.png",
|
||||
"idiom": "mac",
|
||||
"size": "256x256",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_256x256@2x.png",
|
||||
"idiom": "mac",
|
||||
"size": "256x256",
|
||||
"scale": "2x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_512x512.png",
|
||||
"idiom": "mac",
|
||||
"size": "512x512",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"filename": "icon_512x512@2x.png",
|
||||
"idiom": "mac",
|
||||
"size": "512x512",
|
||||
"scale": "2x"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"author": "xcode",
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 543 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 50 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info": {
|
||||
"author": "xcode",
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images": [
|
||||
{
|
||||
"filename": "menu.png",
|
||||
"idiom": "mac",
|
||||
"scale": "1x"
|
||||
},
|
||||
{
|
||||
"filename": "menu@2x.png",
|
||||
"idiom": "mac",
|
||||
"scale": "2x"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"author": "xcode",
|
||||
"version": 1
|
||||
},
|
||||
"properties": {
|
||||
"template-rendering-intent": "template"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 454 B |
|
After Width: | Height: | Size: 929 B |
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Traccar Client for macOS</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Licensed under the Apache License, Version 2.0.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
build_root="${1:?Usage: scripts/build.sh /absolute/path/to/external/build-directory [Debug|Release]}"
|
||||
configuration="${2:-Debug}"
|
||||
case "$build_root" in
|
||||
/*) ;;
|
||||
*) echo "The build directory must be an absolute path." >&2; exit 2 ;;
|
||||
esac
|
||||
case "$configuration" in
|
||||
Debug|Release) ;;
|
||||
*) echo "Configuration must be Debug or Release." >&2; exit 2 ;;
|
||||
esac
|
||||
repo_root="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
mkdir -p "$build_root"
|
||||
|
||||
exec xcodebuild \
|
||||
-project "$repo_root/TraccarClient.xcodeproj" \
|
||||
-scheme TraccarClient \
|
||||
-configuration "$configuration" \
|
||||
-destination 'platform=macOS,arch=arm64' \
|
||||
-derivedDataPath "$build_root/DerivedData" \
|
||||
"CLANG_MODULE_CACHE_PATH=$build_root/ModuleCache" \
|
||||
"SWIFT_MODULE_CACHE_PATH=$build_root/ModuleCache" \
|
||||
build
|
||||
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
// Optional artwork tooling only; Xcode builds use the checked-in PNGs.
|
||||
const fs = require('node:fs/promises');
|
||||
const path = require('node:path');
|
||||
const sharp = require('sharp');
|
||||
|
||||
const root = path.resolve(__dirname, '..');
|
||||
const assets = path.join(root, 'TraccarClient/Resources/Assets.xcassets');
|
||||
const info = { author: 'xcode', version: 1 };
|
||||
|
||||
async function writeJSON(file, value) {
|
||||
await fs.writeFile(file, `${JSON.stringify(value, null, 2)}\n`);
|
||||
}
|
||||
|
||||
async function render(svg, size, destination) {
|
||||
// Rasterize the vector at each output size, without enlarging a raster master.
|
||||
const input = svg.replace(/<svg\b[^>]*>/, (tag) => tag
|
||||
.replace(/\bwidth="[^"]*"/, `width="${size}px"`)
|
||||
.replace(/\bheight="[^"]*"/, `height="${size}px"`));
|
||||
await sharp(Buffer.from(input)).ensureAlpha().png().toFile(destination);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const svg = await fs.readFile(path.join(root, 'Artwork/AppIcon.svg'), 'utf8');
|
||||
const appIcon = path.join(assets, 'AppIcon.appiconset');
|
||||
const menuIcon = path.join(assets, 'MenuBarIcon.imageset');
|
||||
await fs.mkdir(appIcon, { recursive: true });
|
||||
await fs.mkdir(menuIcon, { recursive: true });
|
||||
await writeJSON(path.join(assets, 'Contents.json'), { info });
|
||||
|
||||
const images = [];
|
||||
for (const size of [16, 32, 128, 256, 512]) {
|
||||
for (const scale of [1, 2]) {
|
||||
const filename = `icon_${size}x${size}${scale === 2 ? '@2x' : ''}.png`;
|
||||
await render(svg, size * scale, path.join(appIcon, filename));
|
||||
images.push({ filename, idiom: 'mac', size: `${size}x${size}`, scale: `${scale}x` });
|
||||
}
|
||||
}
|
||||
await writeJSON(path.join(appIcon, 'Contents.json'), { images, info });
|
||||
|
||||
const menuImages = [];
|
||||
const templateSVG = svg.replaceAll('#2d7930', '#000000');
|
||||
for (const scale of [1, 2]) {
|
||||
const filename = `menu${scale === 2 ? '@2x' : ''}.png`;
|
||||
await render(templateSVG, 18 * scale, path.join(menuIcon, filename));
|
||||
menuImages.push({ filename, idiom: 'mac', scale: `${scale}x` });
|
||||
}
|
||||
await writeJSON(path.join(menuIcon, 'Contents.json'), {
|
||||
images: menuImages,
|
||||
info,
|
||||
properties: { 'template-rendering-intent': 'template' },
|
||||
});
|
||||
console.log(`Generated 10 app icon slots and 2 menu images with sharp ${sharp.versions.sharp}.`);
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(error.message);
|
||||
process.exitCode = 1;
|
||||
});
|
||||