- commit
- 31137f531006e585350a4fb1fb38424a1c45d638
- parent
- f799a54e97fc730c85d7c6dbca9d6ed94799fedb
- parent
- d62ff1bdb070cd87e6690e133701b483696643f0
- author
- Dami <dami.etoile@gmail.com>
| A | .github/ | 150 | ++++++++++++++++++++++ |
| M | .gitignore | 3 | + |
| A | LICENSE | 202 | ++++++++++++++++++++++++++++++ |
| M | README.md | 25 | +++- |
| M | go.mod | 6 | +- |
| M | go.sum | 7 | +- |
@@ -0,0 +1,150 @@
1+name: CI2+3+on:4+ push:5+ branches: [main]6+ tags: ["v*"]7+ pull_request:8+9+permissions:10+ contents: read11+12+concurrency:13+ group: ci-${{ github.ref }}14+ cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}15+16+env:17+ GOFLAGS: -trimpath -buildvcs=false18+19+jobs:20+ checks:21+ runs-on: ubuntu-24.0422+ steps:23+ - uses: actions/checkout@v524+ - uses: actions/setup-go@v525+ with:26+ go-version-file: go.mod27+ - uses: actions/setup-node@v428+ with:29+ node-version: 2430+ cache: npm31+ cache-dependency-path: frontend/package-lock.json32+ - name: Rebuild frontend and confirm committed assets match33+ run: |34+ npm --prefix frontend ci35+ npm --prefix frontend run build36+ git diff --exit-code -- assets/37+ test -z "$(git status --porcelain assets/)"38+ - name: Install GTK and WebKitGTK headers39+ run: |40+ sudo apt-get update41+ sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev42+ - name: Vet and test43+ run: |44+ go vet -tags "desktop,production,webkit2_41" ./...45+ go test -tags "desktop,production,webkit2_41" ./...46+47+ build-linux:48+ runs-on: ubuntu-24.0449+ steps:50+ - uses: actions/checkout@v551+ - uses: actions/setup-go@v552+ with:53+ go-version-file: go.mod54+ - name: Install GTK and WebKitGTK headers55+ run: |56+ sudo apt-get update57+ sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev58+ - name: Build59+ run: |60+ VERSION="${GITHUB_REF_NAME}"61+ [[ "${GITHUB_REF}" == refs/tags/v* ]] || VERSION="dev-$(git rev-parse --short HEAD)"62+ go build -tags "desktop,production,webkit2_41" -ldflags "-w -s" -o Atlas .63+ tar -czf "Atlas-${VERSION}-linux-amd64.tar.gz" Atlas64+ - uses: actions/upload-artifact@v465+ with:66+ name: atlas-linux-amd6467+ path: Atlas-*-linux-amd64.tar.gz68+ if-no-files-found: error69+70+ build-windows:71+ runs-on: ubuntu-24.0472+ steps:73+ - uses: actions/checkout@v574+ - uses: actions/setup-go@v575+ with:76+ go-version-file: go.mod77+ - name: Cross-compile for Windows78+ env:79+ GOOS: windows80+ GOARCH: amd6481+ CGO_ENABLED: "0"82+ run: |83+ VERSION="${GITHUB_REF_NAME}"84+ [[ "${GITHUB_REF}" == refs/tags/v* ]] || VERSION="dev-$(git rev-parse --short HEAD)"85+ go build -tags "desktop,production" -ldflags "-w -s -H windowsgui" -o Atlas.exe .86+ zip "Atlas-${VERSION}-windows-amd64.zip" Atlas.exe87+ - uses: actions/upload-artifact@v488+ with:89+ name: atlas-windows-amd6490+ path: Atlas-*-windows-amd64.zip91+ if-no-files-found: error92+93+ build-macos:94+ runs-on: macos-1595+ steps:96+ - uses: actions/checkout@v597+ - uses: actions/setup-go@v598+ with:99+ go-version-file: go.mod100+ - name: Build and assemble Atlas.app101+ run: |102+ VERSION="${GITHUB_REF_NAME}"103+ [[ "${GITHUB_REF}" == refs/tags/v* ]] || VERSION="dev-$(git rev-parse --short HEAD)"104+ go build -tags "desktop,production" -ldflags "-w -s" -o Atlas .105+ mkdir -p Atlas.app/Contents/MacOS106+ cp Atlas Atlas.app/Contents/MacOS/Atlas107+ cat > Atlas.app/Contents/Info.plist <<EOF108+ <?xml version="1.0" encoding="UTF-8"?>109+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">110+ <plist version="1.0">111+ <dict>112+ <key>CFBundleExecutable</key><string>Atlas</string>113+ <key>CFBundleIdentifier</key><string>dev.felinestatemachine.atlas</string>114+ <key>CFBundleName</key><string>Atlas</string>115+ <key>CFBundlePackageType</key><string>APPL</string>116+ <key>CFBundleInfoDictionaryVersion</key><string>6.0</string>117+ <key>CFBundleShortVersionString</key><string>${VERSION#v}</string>118+ <key>LSMinimumSystemVersion</key><string>12.0</string>119+ <key>NSHighResolutionCapable</key><true/>120+ </dict>121+ </plist>122+ EOF123+ ditto -c -k --keepParent Atlas.app "Atlas-${VERSION}-darwin-arm64.zip"124+ - uses: actions/upload-artifact@v4125+ with:126+ name: atlas-darwin-arm64127+ path: Atlas-*-darwin-arm64.zip128+ if-no-files-found: error129+130+ release:131+ if: startsWith(github.ref, 'refs/tags/v')132+ needs: [checks, build-linux, build-windows, build-macos]133+ runs-on: ubuntu-latest134+ permissions:135+ contents: write136+ steps:137+ - uses: actions/checkout@v5138+ - uses: actions/download-artifact@v4139+ with:140+ path: dist141+ merge-multiple: true142+ - name: Create GitHub Release143+ env:144+ GH_TOKEN: ${{ github.token }}145+ run: |146+ PRERELEASE=""147+ [[ "${GITHUB_REF_NAME}" == *-* ]] && PRERELEASE="--prerelease"148+ gh release create "${GITHUB_REF_NAME}" dist/* \149+ --title "Atlas ${GITHUB_REF_NAME}" \150+ --generate-notes --verify-tag ${PRERELEASE}@@ -0,0 +1,202 @@
1+2+ Apache License3+ Version 2.0, January 20044+ http://www.apache.org/licenses/5+6+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION7+8+ 1. Definitions.9+10+ "License" shall mean the terms and conditions for use, reproduction,11+ and distribution as defined by Sections 1 through 9 of this document.12+13+ "Licensor" shall mean the copyright owner or entity authorized by14+ the copyright owner that is granting the License.15+16+ "Legal Entity" shall mean the union of the acting entity and all17+ other entities that control, are controlled by, or are under common18+ control with that entity. For the purposes of this definition,19+ "control" means (i) the power, direct or indirect, to cause the20+ direction or management of such entity, whether by contract or21+ otherwise, or (ii) ownership of fifty percent (50%) or more of the22+ outstanding shares, or (iii) beneficial ownership of such entity.23+24+ "You" (or "Your") shall mean an individual or Legal Entity25+ exercising permissions granted by this License.26+27+ "Source" form shall mean the preferred form for making modifications,28+ including but not limited to software source code, documentation29+ source, and configuration files.30+31+ "Object" form shall mean any form resulting from mechanical32+ transformation or translation of a Source form, including but33+ not limited to compiled object code, generated documentation,34+ and conversions to other media types.35+36+ "Work" shall mean the work of authorship, whether in Source or37+ Object form, made available under the License, as indicated by a38+ copyright notice that is included in or attached to the work39+ (an example is provided in the Appendix below).40+41+ "Derivative Works" shall mean any work, whether in Source or Object42+ form, that is based on (or derived from) the Work and for which the43+ editorial revisions, annotations, elaborations, or other modifications44+ represent, as a whole, an original work of authorship. For the purposes45+ of this License, Derivative Works shall not include works that remain46+ separable from, or merely link (or bind by name) to the interfaces of,47+ the Work and Derivative Works thereof.48+49+ "Contribution" shall mean any work of authorship, including50+ the original version of the Work and any modifications or additions51+ to that Work or Derivative Works thereof, that is intentionally52+ submitted to Licensor for inclusion in the Work by the copyright owner53+ or by an individual or Legal Entity authorized to submit on behalf of54+ the copyright owner. For the purposes of this definition, "submitted"55+ means any form of electronic, verbal, or written communication sent56+ to the Licensor or its representatives, including but not limited to57+ communication on electronic mailing lists, source code control systems,58+ and issue tracking systems that are managed by, or on behalf of, the59+ Licensor for the purpose of discussing and improving the Work, but60+ excluding communication that is conspicuously marked or otherwise61+ designated in writing by the copyright owner as "Not a Contribution."62+63+ "Contributor" shall mean Licensor and any individual or Legal Entity64+ on behalf of whom a Contribution has been received by Licensor and65+ subsequently incorporated within the Work.66+67+ 2. Grant of Copyright License. Subject to the terms and conditions of68+ this License, each Contributor hereby grants to You a perpetual,69+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable70+ copyright license to reproduce, prepare Derivative Works of,71+ publicly display, publicly perform, sublicense, and distribute the72+ Work and such Derivative Works in Source or Object form.73+74+ 3. Grant of Patent License. Subject to the terms and conditions of75+ this License, each Contributor hereby grants to You a perpetual,76+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable77+ (except as stated in this section) patent license to make, have made,78+ use, offer to sell, sell, import, and otherwise transfer the Work,79+ where such license applies only to those patent claims licensable80+ by such Contributor that are necessarily infringed by their81+ Contribution(s) alone or by combination of their Contribution(s)82+ with the Work to which such Contribution(s) was submitted. If You83+ institute patent litigation against any entity (including a84+ cross-claim or counterclaim in a lawsuit) alleging that the Work85+ or a Contribution incorporated within the Work constitutes direct86+ or contributory patent infringement, then any patent licenses87+ granted to You under this License for that Work shall terminate88+ as of the date such litigation is filed.89+90+ 4. Redistribution. You may reproduce and distribute copies of the91+ Work or Derivative Works thereof in any medium, with or without92+ modifications, and in Source or Object form, provided that You93+ meet the following conditions:94+95+ (a) You must give any other recipients of the Work or96+ Derivative Works a copy of this License; and97+98+ (b) You must cause any modified files to carry prominent notices99+ stating that You changed the files; and100+101+ (c) You must retain, in the Source form of any Derivative Works102+ that You distribute, all copyright, patent, trademark, and103+ attribution notices from the Source form of the Work,104+ excluding those notices that do not pertain to any part of105+ the Derivative Works; and106+107+ (d) If the Work includes a "NOTICE" text file as part of its108+ distribution, then any Derivative Works that You distribute must109+ include a readable copy of the attribution notices contained110+ within such NOTICE file, excluding those notices that do not111+ pertain to any part of the Derivative Works, in at least one112+ of the following places: within a NOTICE text file distributed113+ as part of the Derivative Works; within the Source form or114+ documentation, if provided along with the Derivative Works; or,115+ within a display generated by the Derivative Works, if and116+ wherever such third-party notices normally appear. The contents117+ of the NOTICE file are for informational purposes only and118+ do not modify the License. You may add Your own attribution119+ notices within Derivative Works that You distribute, alongside120+ or as an addendum to the NOTICE text from the Work, provided121+ that such additional attribution notices cannot be construed122+ as modifying the License.123+124+ You may add Your own copyright statement to Your modifications and125+ may provide additional or different license terms and conditions126+ for use, reproduction, or distribution of Your modifications, or127+ for any such Derivative Works as a whole, provided Your use,128+ reproduction, and distribution of the Work otherwise complies with129+ the conditions stated in this License.130+131+ 5. Submission of Contributions. Unless You explicitly state otherwise,132+ any Contribution intentionally submitted for inclusion in the Work133+ by You to the Licensor shall be under the terms and conditions of134+ this License, without any additional terms or conditions.135+ Notwithstanding the above, nothing herein shall supersede or modify136+ the terms of any separate license agreement you may have executed137+ with Licensor regarding such Contributions.138+139+ 6. Trademarks. This License does not grant permission to use the trade140+ names, trademarks, service marks, or product names of the Licensor,141+ except as required for reasonable and customary use in describing the142+ origin of the Work and reproducing the content of the NOTICE file.143+144+ 7. Disclaimer of Warranty. Unless required by applicable law or145+ agreed to in writing, Licensor provides the Work (and each146+ Contributor provides its Contributions) on an "AS IS" BASIS,147+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or148+ implied, including, without limitation, any warranties or conditions149+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A150+ PARTICULAR PURPOSE. You are solely responsible for determining the151+ appropriateness of using or redistributing the Work and assume any152+ risks associated with Your exercise of permissions under this License.153+154+ 8. Limitation of Liability. In no event and under no legal theory,155+ whether in tort (including negligence), contract, or otherwise,156+ unless required by applicable law (such as deliberate and grossly157+ negligent acts) or agreed to in writing, shall any Contributor be158+ liable to You for damages, including any direct, indirect, special,159+ incidental, or consequential damages of any character arising as a160+ result of this License or out of the use or inability to use the161+ Work (including but not limited to damages for loss of goodwill,162+ work stoppage, computer failure or malfunction, or any and all163+ other commercial damages or losses), even if such Contributor164+ has been advised of the possibility of such damages.165+166+ 9. Accepting Warranty or Additional Liability. While redistributing167+ the Work or Derivative Works thereof, You may choose to offer,168+ and charge a fee for, acceptance of support, warranty, indemnity,169+ or other liability obligations and/or rights consistent with this170+ License. However, in accepting such obligations, You may act only171+ on Your own behalf and on Your sole responsibility, not on behalf172+ of any other Contributor, and only if You agree to indemnify,173+ defend, and hold each Contributor harmless for any liability174+ incurred by, or claims asserted against, such Contributor by reason175+ of your accepting any such warranty or additional liability.176+177+ END OF TERMS AND CONDITIONS178+179+ APPENDIX: How to apply the Apache License to your work.180+181+ To apply the Apache License to your work, attach the following182+ boilerplate notice, with the fields enclosed by brackets "[]"183+ replaced with your own identifying information. (Don't include184+ the brackets!) The text should be enclosed in the appropriate185+ comment syntax for the file format. We also recommend that a186+ file or class name and description of purpose be included on the187+ same "printed page" as the copyright notice for easier188+ identification within third-party archives.189+190+ Copyright [yyyy] [name of copyright owner]191+192+ Licensed under the Apache License, Version 2.0 (the "License");193+ you may not use this file except in compliance with the License.194+ You may obtain a copy of the License at195+196+ http://www.apache.org/licenses/LICENSE-2.0197+198+ Unless required by applicable law or agreed to in writing, software199+ distributed under the License is distributed on an "AS IS" BASIS,200+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.201+ See the License for the specific language governing permissions and202+ limitations under the License.@@ -1,22 +1,28 @@
11 # Atlas22 33 Atlas is a standalone, offline game-map explorer built with4-[Allons](../allons), Wails, and OpenLayers. The executable carries only the4+[Allons](https://github.com/FelineStateMachine/allons), Wails, and5+OpenLayers. The executable carries only the56 application shell; each game travels as a self-contained `.atlas` bundle --67 its maps, packed locations, raster tile pyramids, and category icons in one78 zip archive. Drop a bundle into the application's `bundles` directory and the89 game appears; drop in a newer build of the same game and it updates. There910 are no sidecars, CDNs, or runtime network dependencies.1011 11-Keep the three repositories beside one another:12+Allons is an ordinary module dependency, fetched by version. Building13+bundles additionally wants the `gamemap` corpus beside this repository:1214 1315 ```text1416 ~/Developer/15-├── allons/1617 ├── atlas/1718 └── gamemap/1819 ```1920 21+To hack on Allons itself, point a workspace at a local checkout rather22+than editing `go.mod` — `go work init . ../allons` — since `go.work` is23+ignored and a committed `replace` directive would break anyone without24+the sibling checkout.25+2026 Run Atlas from this repository:2127 2228 ```sh@@ -37,6 +43,19 @@ Wails requires a desktop build tag even when it is invoked through `go run`.
3743 Atlas supplies the additional macOS `UniformTypeIdentifiers` linker flag3844 itself, so no shell environment setup is needed.3945 46+## Released builds47+48+Tagged releases carry portable builds for Windows (x64), macOS (Apple49+Silicon), and Linux (x64); each reads `.atlas` bundles from the library50+directory above. Two platform notes:51+52+- **macOS**: the app is unsigned. After unzipping, clear the quarantine53+ with `xattr -dr com.apple.quarantine Atlas.app`, or approve it under54+ System Settings → Privacy & Security → "Open Anyway".55+- **Linux**: the binary links GTK 3 and WebKitGTK 4.1 at runtime56+ (`libgtk-3-0`, `libwebkit2gtk-4.1-0`) — present on Ubuntu 24.04+,57+ Debian 13, and recent Fedora.58+4059 The app supports scroll/pinch zoom, drag panning, pin search, map and tile-set4160 selection, compact category toggles, group-level show/hide controls, floating4261 `display_type: "text"` labels, optional region polygons and names, and pin@@ -3,9 +3,10 @@ module github.com/FelineStateMachine/atlas
33 go 1.26.044 55 require (6- github.com/FelineStateMachine/allons v0.0.06+ github.com/FelineStateMachine/allons v0.0.177 github.com/fsnotify/fsnotify v1.10.188 github.com/wailsapp/wails/v2 v2.13.09+ golang.org/x/image v0.44.0910 )1011 1112 require (@@ -38,7 +39,6 @@ require (
3839 github.com/wailsapp/go-webview2 v1.0.22 // indirect3940 github.com/wailsapp/mimetype v1.4.1 // indirect4041 golang.org/x/crypto v0.51.0 // indirect41- golang.org/x/image v0.44.0 // indirect4242 golang.org/x/net v0.54.0 // indirect4343 golang.org/x/sys v0.46.0 // indirect4444 golang.org/x/text v0.40.0 // indirect@@ -48,5 +48,3 @@ require (
4848 modernc.org/memory v1.11.0 // indirect4949 modernc.org/sqlite v1.55.0 // indirect5050 )51-52-replace github.com/FelineStateMachine/allons => ../allons-pinned@@ -1,5 +1,7 @@
11 git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 h1:N3IGoHHp9pb6mj1cbXbuaSXV/UMKwmbKLf53nQmtqMA=22 git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3/go.mod h1:QtOLZGz8olr4qH2vWK0QH0w0O4T9fEIjMuWpKUsH7nc=3+github.com/FelineStateMachine/allons v0.0.1 h1:17VBxKWwj3A8jFZRx+rjBYYx6hRfKqSZnd7NonP9TPo=4+github.com/FelineStateMachine/allons v0.0.1/go.mod h1:Ad4bvIhjgTL5yhrYwk1a4/Dn8Tc5ynX8wUxMf0CGB/s=35 github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=46 github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=57 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=@@ -84,9 +86,8 @@ golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0=
8486 golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=8587 golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w=8688 golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ=87-golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=88-golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=8989 golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=90+golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=9091 golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=9192 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=9293 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=@@ -97,8 +98,6 @@ golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
9798 golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=9899 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=99100 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=100-golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=101-golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=102101 golang.org/x/text v0.40.0 h1:Ub2Z6/xjgF1WrYQz2nuITOEegKFtiIy+rieRJ5lHZKs=103102 golang.org/x/text v0.40.0/go.mod h1:hpnzDAfGV753zIKo+wk3u1bVKCGPbrnF7+7LBF/UHVY=104103 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=