Skip to content

Commit

Permalink
website: rework install quick tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Aug 10, 2024
1 parent 28e39ef commit af3a1e1
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 69 deletions.
46 changes: 12 additions & 34 deletions website/docs/install/_automatic-install-quick-test.mdx
Original file line number Diff line number Diff line change
@@ -1,38 +1,16 @@
import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import customField from '@site/src/libs/customField';
import AutomaticInstallQuickTest from './_common/_automatic-install-quick-test.mdx'

{/* ------------------------------------------------------------------------ */}

### Quick test

To check if the xPack GCC installed by **xpm** starts properly, use something like:

<Tabs groupId="operating-systems">
<TabItem value="windows" label="Windows" default>

<CodeBlock language="console"> {
`C:\\> %USERPROFILE%\\AppData\\Roaming\\xPacks\\@xpack-dev-tools\\gcc\\${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }\\.content\\bin\\gcc.exe --version
gcc (xPack GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>
export const appName = 'GCC';
export const appLcName = 'gcc';
export const programName = 'gcc';
export const branding = 'gcc (xPack GCC x86_64) ';

</TabItem>
<TabItem value="macos" label="macOS">

<CodeBlock language="console"> {
`$ ~/Library/xPacks/@xpack-dev-tools/gcc/${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }/.content/bin/gcc --version
gcc (xPack GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
<TabItem value="linux" label="GNU/Linux">

<CodeBlock language="console"> {
`$ ~/.local/xPacks/@xpack-dev-tools/gcc/${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }/.content/bin/gcc --version
gcc (xPack GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>
{/* ------------------------------------------------------------------------ */}

</TabItem>
</Tabs>
<AutomaticInstallQuickTest
appName={ appName }
appLcName={ appLcName }
programName={ programName }
branding={ branding }
/>
41 changes: 41 additions & 0 deletions website/docs/install/_common/_automatic-install-quick-test.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{/* DO NOT EDIT! */}
{/* Automatically generated from xbb-helper/templates/docusaurus/common. */}

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import customField from '@site/src/libs/customField';

{/* ------------------------------------------------------------------------ */}

### Quick test

To check if the { props.appName } installed by **xpm** starts properly, use something like:

<Tabs groupId="operating-systems">
<TabItem value="windows" label="Windows" default>

<CodeBlock language="console"> {
`C:\\> %USERPROFILE%\\AppData\\Roaming\\xPacks\\@xpack-dev-tools\\${ props.appLcName }\\${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }\\.content\\bin\\${ props.programName }.exe --version
${ props.branding }${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
<TabItem value="macos" label="macOS">

<CodeBlock language="console"> {
`% ~/Library/xPacks/@xpack-dev-tools/${ props.appLcName }/${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }/.content/bin/${ props.programName } --version
${ props.branding }${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
<TabItem value="linux" label="GNU/Linux">

<CodeBlock language="console"> {
`$ ~/.local/xPacks/@xpack-dev-tools/${ props.appLcName }/${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }/.content/bin/${ props.programName } --version
${ props.branding }${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
</Tabs>
41 changes: 41 additions & 0 deletions website/docs/install/_common/_manual-install-quick-test.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{/* DO NOT EDIT! */}
{/* Automatically generated from xbb-helper/templates/docusaurus/common. */}

import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import customField from '@site/src/libs/customField';

{/* ------------------------------------------------------------------------ */}

### Quick test {#manual-install-quick-test}

To check if the { props.appName } installed manually starts properly, use something like:

<Tabs groupId="operating-systems">
<TabItem value="windows" label="Windows" default>

<CodeBlock language="console"> {
`C:\\> %USERPROFILE%\\AppData\\Roaming\\xPacks\\${ props.appLcName }\\xpack-${ props.appLcName }-${ customField('upstreamVersion') }-${ customField('xpackSubversion') }\\bin\\${ props.programName }.exe --version
${ props.branding }${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
<TabItem value="macos" label="macOS">

<CodeBlock language="console"> {
`% ~/Library/xPacks/${ props.appLcName }/xpack-${ props.appLcName }-${ customField('upstreamVersion') }-${ customField('xpackSubversion') }/bin/${ props.programName } --version
${ props.branding }${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
<TabItem value="linux" label="GNU/Linux">

<CodeBlock language="console"> {
`$ ~/.local/xPacks/${ props.appLcName }/xpack-${ props.appLcName }-${ customField('upstreamVersion') }-${ customField('xpackSubversion') }/bin/${ props.programName } --version
${ props.branding }${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
</Tabs>
45 changes: 11 additions & 34 deletions website/docs/install/_manual-install-quick-test.mdx
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import ManualInstallQuickTest from './_common/_manual-install-quick-test.mdx'

import customField from '@site/src/libs/customField';
export const appName = 'GCC';
export const appLcName = 'gcc';
export const programName = 'gcc';
export const branding = 'gcc (xPack GCC x86_64) ';

{/* ------------------------------------------------------------------------ */}

### Quick test {#manual-install-quick-test}

To check if the xPack GCC installed manually starts properly, use something like:

<Tabs groupId="operating-systems">
<TabItem value="windows" label="Windows" default>

<CodeBlock language="console"> {
`C:\\> %USERPROFILE%\\AppData\\Roaming\\xPacks\\gcc\\xpack-gcc-${ customField('upstreamVersion') }-${ customField('xpackSubversion') }\\bin\\gcc.exe --version
gcc (xPack GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
<TabItem value="macos" label="macOS">

<CodeBlock language="console"> {
`$ ~/Library/xPacks/gcc/xpack-gcc-${ customField('upstreamVersion') }-${ customField('xpackSubversion') }/bin/gcc --version
gcc (xPack GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
<TabItem value="linux" label="GNU/Linux">

<CodeBlock language="console"> {
`$ ~/.local/xPacks/gcc/xpack-gcc-${ customField('upstreamVersion') }-${ customField('xpackSubversion') }/bin/gcc --version
gcc (xPack GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>

</TabItem>
</Tabs>
<ManualInstallQuickTest
appName={ appName }
appLcName={ appLcName }
programName={ programName }
branding={ branding }
/>
3 changes: 2 additions & 1 deletion website/docs/install/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ Download the latest version named like:

* <code>xpack-gcc-{ customField('upstreamVersion') }-{ customField('xpackSubversion') }-darwin-x64.tar.gz</code>
* <code>xpack-gcc-{ customField('upstreamVersion') }-{ customField('xpackSubversion') }-darwin-arm64.tar.gz</code>
* <code>xpack-gcc-{ customField('upstreamVersion') }-{ customField('xpackSubversion') }-darwin-arm.tar.gz</code>

:::note

Expand Down Expand Up @@ -608,7 +609,7 @@ chmod -R -w xpack-gcc-${ customField('upstreamVersion') }-${ customField('xpackS
For manual installs, the recommended
install location is slightly different then the folders created by `xpm install`,
which use the `@xpack-dev-tools` scope to group different tools,
and `.content` to store the unpacked archive."
and `.content` to store the unpacked archive.

:::

Expand Down

0 comments on commit af3a1e1

Please sign in to comment.