런처 설치 프로그램 이름 설정 방법

작동 방식

런처 설치 프로그램 파일은 기본적으로 독립 실행 형 버전의 경우 installer.exe이고 웹 버전의 경우 web_installer.exe입니다. 웹사이트 코드에서 이름을 설정할 수 있습니다. 사용자가 다운로드 버튼이나 링크를 클릭하면 브라우저가 자동으로 설치 파일의 이름을 교체합니다.

획득 방법

  1. 아래 예시와 같이 웹사이트 코드에 보이지 않는 iframe을 추가하면 그 안에 수정된 이름으로 설치 파일을 다운로드하는 링크가 형성됩니다.

예시:

Copy
Full screen
Small screen
     1<body>
     2  ...
     3  <script>
     4    const frame = document.createElement("IFRAME");
     5    frame.id = "xsolla-installer-renamer";
     6    frame.src = `https://installer.launcher.xsolla.com/launcher-installer-renamer-prod/v1/renamer.html?cache=${Date.now()}`;
     7    frame.style = "display: none";
     8    document.body.append(frame);
     9  </script>
    10  ...
    11<body>
    

    1. 링크 또는 버튼을 클릭할 때 iframe에 매개변수를 전달하는 postMessage() 메소드 구현하기:
      • <LINK TO INSTALLER> - 설치 파일의 URL. 런처 > 설정 > 런처 빌드 섹션의 계시자 계정에있습니다. 예시: https://installer.launcher.xsolla.com/xlauncher-builds/xsolla-launcher-update/123456789/bin/web_installer.exe
      • <NEW INSTALLER NAME> - 설치 파일의 이름

    예시:

    Copy
    Full screen
    Small screen
      1postMessage(
      2  {
      3    type: "download",
      4    href: "<LINK TO INSTALLER>",
      5    name: "<NEW INSTALLER NAME>",
      6  },
      7  "https://installer.launcher.xsolla.com"
      8)
      

      다음은 설치 파일을 다운로드하는 다운로드 링크와 버튼의 예시 코드입니다.

      설치 파일 다운로드 링크의 예시 코드:

      Copy
      Full screen
      Small screen
         1<body>
         2  ...
         3  <a
         4      href="#"
         5      onclick="document.getElementById('xsolla-installer-renamer').contentWindow.postMessage({ type: 'download', href: '<LINK TO INSTALLER>', name: '<NEW INSTALLER NAME>' }, 'https://installer.launcher.xsolla.com');"
         6  >
         7    Donwload
         8  </a>
         9  ...
        10<body>
        

        설치 파일 다운로드 버튼의 예시 코드:

        Copy
        Full screen
        Small screen
           1<body>
           2  ...
           3  <button id="button-download">Download</button>
           4  <script>
           5    const btn = document.getElementById("button-download");
           6    btn.onclick = () => {
           7      document
           8        .getElementById("xsolla-installer-renamer")
           9        .contentWindow.postMessage(
          10          {
          11            type: "download",
          12            href: "<LINK TO INSTALLER>",
          13            name: "<NEW INSTALLER NAME>",
          14          },
          15          "https://installer.launcher.xsolla.com"
          16        );
          17    };
          18  </script>
          19  ...
          20<body>
          
          이 기사가 도움이 되었나요?
          감사합니다!
          개선해야 할 점이 있을까요? 메시지
          유감입니다
          이 기사가 도움이 안 된 이유를 설명해 주세요. 메시지
          의견을 보내 주셔서 감사드립니다!
          메시지를 검토한 후 사용자 경험 향상에 사용하겠습니다.
          마지막 업데이트: 2025년 6월 12일

          오자 또는 기타 텍스트 오류를 찾으셨나요? 텍스트를 선택하고 컨트롤+엔터를 누르세요.

          문제 보고
          콘텐츠를 항상 검토합니다. 여러분의 피드백은 콘텐츠를 개선에 도움이 됩니다.
          후속 조치를 위해 이메일을 제공해 주세요
          의견을 보내 주셔서 감사드립니다!
          피드백을 보내는 중 문제가 발생했습니다
          잠시 후 다시 시도하거나 doc_feedback@xsolla.com으로 연락해 주세요.