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 18ede8f commit 354dffd
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 68 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 MinGW-w64 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\\mingw-w64-gcc\\${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }\\.content\\bin\\x86_64-w64-mingw32-gcc.exe --version
x86_64-w64-mingw32-gcc (xPack MinGW-w64 GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>
export const appName = 'MinGW-w64 GCC';
export const appLcName = 'mingw-w64-gcc';
export const programName = 'x86_64-w64-mingw32-gcc';
export const branding = 'x86_64-w64-mingw32-gcc (xPack MinGW-w64 GCC x86_64) ';

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

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

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

<CodeBlock language="console"> {
`$ ~/.local/xPacks/@xpack-dev-tools/mingw-w64-gcc/${ customField('upstreamVersion') }-${ customField('xpackSubversion') }.${ customField('npmSubversion') }/.content/bin/x86_64-w64-mingw32-gcc --version
x86_64-w64-mingw32-gcc (xPack MinGW-w64 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: 12 additions & 33 deletions website/docs/install/_manual-install-quick-test.mdx
Original file line number Diff line number Diff line change
@@ -1,38 +1,17 @@
import CodeBlock from '@theme/CodeBlock';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

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

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

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

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

<Tabs groupId="operating-systems">
<TabItem value="windows" label="Windows" default>
export const appName = 'MinGW-w64 GCC';
export const appLcName = 'mingw-w64-gcc';
export const programName = 'x86_64-w64-mingw32-gcc';
export const branding = 'x86_64-w64-mingw32-gcc (xPack MinGW-w64 GCC x86_64) ';

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

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

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

</TabItem>
<TabItem value="linux" label="GNU/Linux">
{/* ------------------------------------------------------------------------ */}

<CodeBlock language="console"> {
`$ ~/.local/xPacks/mingw-w64-gcc/xpack-mingw-w64-gcc-${ customField('upstreamVersion') }-${ customField('xpackSubversion') }/bin/x86_64-w64-mingw32-gcc --version
x86_64-w64-mingw32-gcc (xPack MinGW-w64 GCC x86_64) ${ customField('upstreamVersion') }`
} </CodeBlock>
<ManualInstallQuickTest
appName={ appName }
appLcName={ appLcName }
programName={ programName }
branding={ branding }
/>

</TabItem>
</Tabs>
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-mingw-w64-gcc-{ customField('upstreamVersion') }-{ customField('xpackSubversion') }-darwin-x64.tar.gz</code>
* <code>xpack-mingw-w64-gcc-{ customField('upstreamVersion') }-{ customField('xpackSubversion') }-darwin-arm64.tar.gz</code>
* <code>xpack-mingw-w64-gcc-{ customField('upstreamVersion') }-{ customField('xpackSubversion') }-darwin-arm.tar.gz</code>

:::note

Expand Down Expand Up @@ -608,7 +609,7 @@ chmod -R -w xpack-mingw-w64-gcc-${ customField('upstreamVersion') }-${ customFie
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 354dffd

Please sign in to comment.