Skip to content

Commit 221ad83

Browse files
committed
[client] Add macOS support with README and launcher script
- Add macOS required Eclipse plugins (debug.core, e4.ui.workbench.renderers.swt.cocoa) - Add README-macOS.md and run-scouter.command script - Configure maven-antrun-plugin for macOS package assembly - Add Eclipse m2e lifecycle-mapping configuration
1 parent f538ad0 commit 221ad83

8 files changed

Lines changed: 189 additions & 13 deletions

File tree

scouter.client.build/pom.xml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>scouter.client</groupId>
@@ -63,5 +63,65 @@
6363
</configuration>
6464
</plugin>
6565
</plugins>
66+
<pluginManagement>
67+
<plugins>
68+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
69+
<plugin>
70+
<groupId>org.eclipse.m2e</groupId>
71+
<artifactId>lifecycle-mapping</artifactId>
72+
<version>1.0.0</version>
73+
<configuration>
74+
<lifecycleMappingMetadata>
75+
<pluginExecutions>
76+
<pluginExecution>
77+
<pluginExecutionFilter>
78+
<groupId>org.eclipse.tycho</groupId>
79+
<artifactId>target-platform-configuration</artifactId>
80+
<versionRange>[2.0.0,)</versionRange>
81+
<goals>
82+
<goal>target-platform</goal>
83+
</goals>
84+
</pluginExecutionFilter>
85+
<action>
86+
<ignore/>
87+
</action>
88+
</pluginExecution>
89+
<pluginExecution>
90+
<pluginExecutionFilter>
91+
<groupId>org.eclipse.tycho</groupId>
92+
<artifactId>tycho-compiler-plugin</artifactId>
93+
<versionRange>[2.0.0,)</versionRange>
94+
<goals>
95+
<goal>compile</goal>
96+
<goal>testCompile</goal>
97+
<goal>validate-classpath</goal>
98+
</goals>
99+
</pluginExecutionFilter>
100+
<action>
101+
<ignore/>
102+
</action>
103+
</pluginExecution>
104+
<pluginExecution>
105+
<pluginExecutionFilter>
106+
<groupId>org.eclipse.tycho</groupId>
107+
<artifactId>tycho-packaging-plugin</artifactId>
108+
<versionRange>[2.0.0,)</versionRange>
109+
<goals>
110+
<goal>build-qualifier</goal>
111+
<goal>build-qualifier-aggregator</goal>
112+
<goal>validate-id</goal>
113+
<goal>validate-version</goal>
114+
</goals>
115+
</pluginExecutionFilter>
116+
<action>
117+
<ignore/>
118+
</action>
119+
</pluginExecution>
120+
</pluginExecutions>
121+
</lifecycleMappingMetadata>
122+
</configuration>
123+
</plugin>
124+
</plugins>
125+
</pluginManagement>
66126
</build>
67127
</project>

scouter.client.feature/feature.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@
8383
version="0.0.0"
8484
unpack="false"/>
8585

86+
<plugin
87+
id="org.eclipse.debug.core"
88+
download-size="0"
89+
install-size="0"
90+
version="0.0.0"
91+
unpack="false"/>
92+
8693
<plugin
8794
id="org.eclipse.core.variables"
8895
download-size="0"
@@ -131,4 +138,13 @@
131138
version="0.0.0"
132139
unpack="false"/>
133140

141+
<plugin
142+
id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa"
143+
os="macosx"
144+
download-size="0"
145+
install-size="0"
146+
version="0.0.0"
147+
fragment="true"
148+
unpack="false"/>
149+
134150
</feature>

scouter.client.product/pom.xml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

@@ -58,6 +58,42 @@
5858
</execution>
5959
</executions>
6060
</plugin>
61+
<!-- macOS 배포 패키지에 README와 실행 스크립트 복사 -->
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-antrun-plugin</artifactId>
65+
<version>3.1.0</version>
66+
<executions>
67+
<execution>
68+
<id>copy-macos-scripts</id>
69+
<phase>package</phase>
70+
<goals>
71+
<goal>run</goal>
72+
</goals>
73+
<configuration>
74+
<target>
75+
<!-- macOS x86_64 -->
76+
<copy file="${project.basedir}/readme/README-macOS.md"
77+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/x86_64/scouter.client"
78+
failonerror="false"/>
79+
<copy file="${project.basedir}/scripts/run-scouter.command"
80+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/x86_64/scouter.client"
81+
failonerror="false"/>
82+
<!-- macOS aarch64 (Apple Silicon) -->
83+
<copy file="${project.basedir}/readme/README-macOS.md"
84+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/aarch64/scouter.client"
85+
failonerror="false"/>
86+
<copy file="${project.basedir}/scripts/run-scouter.command"
87+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/aarch64/scouter.client"
88+
failonerror="false"/>
89+
<!-- 실행 권한 부여 -->
90+
<chmod file="${project.build.directory}/products/scouter.client.product/macosx/cocoa/x86_64/scouter.client/run-scouter.command" perm="755" failonerror="false"/>
91+
<chmod file="${project.build.directory}/products/scouter.client.product/macosx/cocoa/aarch64/scouter.client/run-scouter.command" perm="755" failonerror="false"/>
92+
</target>
93+
</configuration>
94+
</execution>
95+
</executions>
96+
</plugin>
6197
</plugins>
6298
</build>
63-
</project>
99+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Scouter Client for macOS
2+
3+
## 🚨 처음 실행 전 필수 작업
4+
5+
macOS의 보안 정책(Gatekeeper)으로 인해 서명되지 않은 앱은 실행이 차단됩니다.
6+
처음 실행하기 전에 아래 명령어를 **한 번만** 실행해주세요.
7+
8+
### 방법 1: 터미널 명령어 (권장)
9+
10+
```bash
11+
cd /Applications # 또는 scouter.client.app이 있는 디렉토리
12+
xattr -cr scouter.client.app
13+
```
14+
15+
### 방법 2: 실행 스크립트 사용
16+
17+
패키지에 포함된 `run-scouter.command` 파일을 더블클릭하면 자동으로 처리됩니다.
18+
19+
### 방법 3: 시스템 환경설정에서 허용
20+
21+
1. scouter.client.app 더블클릭 (경고 발생)
22+
2. **시스템 환경설정****보안 및 개인 정보 보호****일반**
23+
3. "scouter.client.app이(가) 차단되었습니다" 옆의 **"확인 없이 열기"** 클릭
24+
25+
## ⚠️ 왜 이런 작업이 필요한가요?
26+
27+
Apple은 인터넷에서 다운로드한 앱에 `quarantine` 속성을 추가합니다.
28+
Apple Developer 인증서로 서명되지 않은 앱은 Gatekeeper가 실행을 차단합니다.
29+
`xattr -cr` 명령어는 이 quarantine 속성을 제거합니다.
30+
31+
## 📋 시스템 요구사항
32+
33+
- macOS 10.14 (Mojave) 이상
34+
- Java 11 이상 (내장됨)
35+

scouter.client.product/scouter.client.product

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656

5757
<features>
5858
<feature id="org.eclipse.rcp"/>
59+
<feature id="org.eclipse.platform"/>
5960
<feature id="scouter.client.feature"/>
6061
<feature id="org.eclipse.emf.ecore"/>
6162
<feature id="org.eclipse.emf.common"/>
@@ -64,8 +65,8 @@
6465
</features>
6566

6667
<configurations>
67-
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
6868
<plugin id="org.apache.felix.scr" autoStart="true" startLevel="2" />
69+
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
6970
</configurations>
7071

7172
<preferencesInfo>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
#
3+
# Scouter Client Launcher for macOS
4+
# 이 스크립트는 quarantine 속성을 제거하고 Scouter Client를 실행합니다.
5+
#
6+
7+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
8+
APP_NAME="scouter.client.app"
9+
APP_PATH="$SCRIPT_DIR/$APP_NAME"
10+
11+
# 앱이 존재하는지 확인
12+
if [ ! -d "$APP_PATH" ]; then
13+
echo "❌ 오류: $APP_NAME 을 찾을 수 없습니다."
14+
echo "이 스크립트를 $APP_NAME 과 같은 폴더에 위치시켜 주세요."
15+
read -p "Press Enter to exit..."
16+
exit 1
17+
fi
18+
19+
# quarantine 속성 제거
20+
echo "🔓 보안 속성을 제거하는 중..."
21+
xattr -cr "$APP_PATH"
22+
23+
# 앱 실행
24+
echo "🚀 Scouter Client를 실행합니다..."
25+
open "$APP_PATH"
26+

scouter.client/.classpath

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src"/>
43
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
54
<attributes>
65
<attribute name="module" value="true"/>
76
</attributes>
87
</classpathentry>
98
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
9+
<classpathentry kind="src" path="src/"/>
1010
<classpathentry kind="lib" path="lib/scouter.common.jar" sourcepath="/scouter.common"/>
11-
<classpathentry kind="lib" path="lib/scouter.server.jar"/>
12-
<classpathentry kind="lib" path="lib/hibernate-core-3.3.2.GA.jar"/>
13-
<classpathentry kind="lib" path="lib/opencsv-2.4.jar"/>
14-
<classpathentry kind="lib" path="lib/opal-1.0.3.jar"/>
15-
<classpathentry kind="lib" path="lib/activation-1.1.1.jar"/>
16-
<classpathentry kind="lib" path="lib/jaxb-api-2.3.1.jar"/>
17-
<classpathentry kind="lib" path="lib/jaxb-core-2.3.0.1.jar"/>
18-
<classpathentry kind="lib" path="lib/jaxb-impl-2.3.0.1.jar"/>
11+
<classpathentry exported="true" kind="lib" path="lib/scouter.server.jar"/>
12+
<classpathentry exported="true" kind="lib" path="lib/hibernate-core-3.3.2.GA.jar"/>
13+
<classpathentry exported="true" kind="lib" path="lib/opencsv-2.4.jar"/>
14+
<classpathentry exported="true" kind="lib" path="lib/opal-1.0.3.jar"/>
15+
<classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
16+
<classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.3.1.jar"/>
17+
<classpathentry exported="true" kind="lib" path="lib/jaxb-core-2.3.0.1.jar"/>
18+
<classpathentry exported="true" kind="lib" path="lib/jaxb-impl-2.3.0.1.jar"/>
1919
<classpathentry kind="output" path="target/classes"/>
2020
</classpath>

scouter.client/src/scouter/client/Application.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public Object start(IApplicationContext context) throws Exception {
8686
}
8787

8888
private boolean openLoginDialog(Display display) {
89+
8990
LoginDialog2 dialog = new LoginDialog2(display.getActiveShell(), (serverAddr, serverId) -> {
9091
Server server = ServerManager.getInstance().getServer(serverId);
9192
ServerPrefUtil.storeDefaultServer(server.getIp()+":"+server.getPort());
@@ -94,6 +95,7 @@ private boolean openLoginDialog(Display display) {
9495
return (dialog.open() == Window.OK);
9596
}
9697

98+
9799
private boolean loginAutomaticallyWhenAutoLoginEnabled() {
98100
boolean autoLogined = false;
99101
String[] serverList = ServerPrefUtil.getStoredServerList();

0 commit comments

Comments
 (0)